Commit Graph

74 Commits

Author SHA1 Message Date
Eugen Gorbunov
e9398f3f8c Add HTTP Headers option (#6820)
* Add new strings to lang files

* Add HTTP headers field to feed forms

* A few improvements

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-09-21 10:34:38 +02:00
Alexandre Alapetite
dfac9f5813 PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions

* Uniformisation
2024-09-11 17:14:53 +02:00
maTh
154a36700c Refactoring: Rename dotpath into dotnotation (#6369)
* KIND_JSON_DOTPATH -> KIND_JSON_DOTNOTATION

* TYPE_JSON_DOTPATH => TYPE_JSON_DOTNOTATION

* json_dotpath => json_dotnotation

* dotPathsForStandardJsonFeed => dotNotationForStandardJsonFeed

* TYPE_JSON_DOTNOTATION = 'JSON+DotPath' => 'JSON+DotNotation'

* documentation: OPML.md

* convertJsonToRss()

* $dotpaths => $dotnotations

* FreshRSS_Feed_Exception

* comment

* Compatibility TYPE_JSON_DOTPATH

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-04-25 08:28:42 +02:00
Alexandre Alapetite
350edf398c PHP 8.3 #[\Override] (#6273)
* PHP 8.3 #[\Override]
https://php.watch/versions/8.3/override-attr

With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute

And modified the call to phpstan-next on the model of https://github.com/FreshRSS/Extensions/pull/228 (more robust than the find method, which gave some strange errors)

* Update extension example accordingly
2024-04-10 15:33:43 +02:00
Alexandre Alapetite
39cc1c11ec New feature: shareable user query (#6052)
* New feature: shareable user query
Share the output of a user query by RSS / HTML / OPML with other people through unique URLs.
Replaces the global admin token, which was the only option (but unsafe) to share RSS outputs with other people.
Also add a new HTML output for people without an RSS reader.

fix https://github.com/FreshRSS/FreshRSS/issues/3066#issuecomment-648977890
fix https://github.com/FreshRSS/FreshRSS/issues/3178#issuecomment-769435504

* Remove unused method

* Fix token saving

* Implement HTML view

* Update i18n for master token

* Revert i18n get_favorite

* Fix missing i18n for user queries from before this PR

* Remove irrelevant tests

* Add link to RSS version

* Fix getGet

* Fix getState

* Fix getSearch

* Alternative getSearch

* Default getOrder

* Explicit default state

* Fix test

* Add OPML sharing

* Remove many redundant SQL queries from original implementation of user queries

* Fix article tags

* Use default user settings

* Prepare public search

* Fixes

* Allow user search on article tags

* Implement user search

* Revert filter bug

* Revert wrong SQL left outer join change

* Implement checkboxes

* Safe check of OPML

* Fix label

* Remove RSS button to favour new sharing method
That sharing button was using a global admin token

* First version of HTTP 304

* Disallow some recusrivity
fix https://github.com/FreshRSS/FreshRSS/issues/6086

* Draft of nav

* Minor httpConditional

* Add support for offset for pagination

* Fix offset pagination

* Fix explicit order ASC

* Add documentation

* Help links i18n

* Note about deprecated master token

* Typo

* Doc about format
2024-02-26 09:01:03 +01:00
eta-orionis
9c97d8ca72 JSONFeeds, JSON scraping, and POST requests for feeds (#5662)
* allow POST requests for feeds

* added json dotpath and jsonfeed subscriptions. No translation strings yet

* debug and fix jsonfeed parser

* bugfix params saved when editing feed

* added translations for JSON features

* Update docs for web scraping

* make fix-all
and revert unrelated changes, plus a few manual fixes, but there are still several type errors

* Fix some i18n

* refactor json parsing for both feed types

* cleanup unnecessary comment

* refactored generation of SimplePie for XPath and JSON feeds

* Fix merge error

* Update to newer FreshRSS code

* A bit of refactoring

* doc, whitespace

* JSON Feed is in two words

* Add support for array syntax

* Whitespace

* Add OPML export/import

* Work on i18n

* Accept application/feed+json

* Rework POST

* Fix update

* OPML for cURL options

* Fix types

* Fix Typos

---------

Co-authored-by: Erion Elmasllari <elmasllari@factorsixty.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-01-10 08:23:45 +01:00
Alexandre Alapetite
a80a5f48a1 Pass PHPStan level 8 (#5946)
* Pass PHPStan level 8
And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels

* Revert wrong replace in comment

* Fix PHPStan level 8

* Update PHPStan and other dev dependencies

* Remove obsolete comment

* noVariableVariables and towards bleedingEdge
https://github.com/phpstan/phpstan-strict-rules
https://phpstan.org/blog/what-is-bleeding-edge

* More bleedingEdge

* A bit more PHPStan level 9

* More PHPStan level 9

* Prepare for booleansInConditions
Ignore int and null

* Revert wrong line

* More fixes

* Fix keep_max_n_unread

* Stricter attribute functions

* Stricter callHooks and more PHPStan level 9

* More typing

* A tiny more
2023-12-18 17:59:16 +01:00
Alexandre Alapetite
6bb45a8726 Add filter actions (auto mark read) at category and global levels (#5942)
* Add filter actions (auto mark read) at category level
fix https://github.com/FreshRSS/FreshRSS/issues/3497

* Add filter actions (auto mark read) at global level
fix https://github.com/FreshRSS/FreshRSS/issues/2788

* Fix feed category ID

* Minor comment
2023-12-15 23:04:29 +01:00
Alexandre Alapetite
a3ed826913 Remove variable default_category (#5945)
Not really used, and causing bug in https://github.com/FreshRSS/FreshRSS/pull/5942

```
Fatal error: Uncaught Error: Typed property FreshRSS_View::$default_category must not be accessed before initialization in /var/www/FreshRSS/app/views/helpers/category/update.phtml:218 Stack trace: #0 /var/www/FreshRSS/lib/Minz/View.php(93): include() #1 /var/www/FreshRSS/lib/Minz/View.php(143): Minz_View->includeFile() #2 /var/www/FreshRSS/app/views/category/update.phtml(9): Minz_View->renderHelper() #3 /var/www/FreshRSS/lib/Minz/View.php(93): include('...') #4 /var/www/FreshRSS/lib/Minz/View.php(115): Minz_View->includeFile() #5 /var/www/FreshRSS/lib/Minz/View.php(75): Minz_View->render() #6 /var/www/FreshRSS/lib/Minz/Dispatcher.php(59): Minz_View->build() #7 /var/www/FreshRSS/lib/Minz/FrontController.php(61): Minz_Dispatcher->run() #8 /var/www/FreshRSS/p/i/index.php(59): Minz_FrontController->run() #9 {main} thrown in /var/www/FreshRSS/app/views/helpers/category/update.phtml on line 218
```
2023-12-14 22:11:04 +01:00
Alexandre Alapetite
f0d4f2762d Rework keepmax (#5905)
* Rework keepmax
fix https://github.com/FreshRSS/FreshRSS/issues/5702
fix https://github.com/FreshRSS/FreshRSS/issues/5870

* More WIP

* Minor progress

* Progress

* Beta

* Improved debug message

* Revert noCommit

* Fix variable reset

* Remove debug syslogs
2023-12-03 19:52:02 +01:00
Luc SANCHEZ
30c7a61a9b Use strict_types (#5830)
* Little's optimisations and booleans in conditions

* Apply strict type

* Apply strict type

* Apply strict type

* Fix multiple bugs with PHP 8.2 and 8.3

* Many declares missing, more errors fixed

* Apply strict type

* Another approach

* Stronger typing for Minz_Session

* Fix case of SQLite

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-16 22:43:00 +01:00
Alexandre Alapetite
98559cebc3 Remove obsolete TTL migration code (#5625)
Remove `updateTTL` function used to help migration to 5+ year-old FreshRSS 1.10 and FreshRSS 0.7.3 https://github.com/FreshRSS/FreshRSS/pull/1750
This function contributed to locking the database https://github.com/FreshRSS/FreshRSS/pull/5574
Subset of https://github.com/FreshRSS/FreshRSS/pull/3558
2023-09-06 21:41:17 +02:00
Luc SANCHEZ
f8f163d054 Chore/processing of depreciations and updating code to php72 minimum (#5504)
* processing of depreciations and updating of code to php7.2 minimum

* Autoformat many strange array indenting
And revert a few unwanted changes

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-07-07 22:36:27 +02:00
Alexandre Alapetite
228d7adfdb Fix slider views (#5469)
* Fix slider titles
And fix full-page view of category configuration.
FIx https://github.com/FreshRSS/FreshRSS/pull/5449#issuecomment-1590021947

* Fix user queries and user management
Implement https://github.com/FreshRSS/FreshRSS/pull/5469#issuecomment-1591957935
2023-06-15 12:47:47 +02:00
Alexandre Alapetite
f3760f138d Complete PHPStan Level 6 (#5305)
* Complete PHPStan Level 6
Fix https://github.com/FreshRSS/FreshRSS/issues/4112
And initiate PHPStan Level 7

* PHPStan Level 6 for tests
* Use phpstan/phpstan-phpunit
* Update to PHPStan version 1.10

* Fix mixed bug

* Fix mixed return bug

* Fix paginator bug

* Fix FreshRSS_UserConfiguration

* A couple more Minz_Configuration bug fixes

* A few trivial PHPStan Level 7 fixes

* A few more simple PHPStan Level 7

* More files passing PHPStan Level 7
Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251

* A few more PHPStan Level 7 preparations

* A few last details
2023-04-17 08:30:21 +02:00
Alexandre Alapetite
b2ee8a660f Fix feed priority (#5274)
Fix https://github.com/FreshRSS/FreshRSS/issues/5273
2023-04-08 13:39:48 +02:00
Luc SANCHEZ
d23d10bcde Phpstan Level6 for View.php (#5269)
* Remarque's from Alkarex

* indentation

* indentation

* Apply suggestions from code review

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Remarque's from Alkarex

* A few improvements

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Fixes and improvments

* Fix getTagsForEntry

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-07 12:32:10 +02:00
Alexandre Alapetite
6c01e4e7d6 Use typed access to request parameters (#5267)
* Use typed access to request parameters
This was a big source of mixed datatypes in many places

* Fix notifications

* Fix bookmarkAction
2023-04-07 00:13:49 +02:00
Luc SANCHEZ
247215ffaa Typehint some Controllers (#5106)
* Typehint to Controllers

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-03-21 18:57:57 +01:00
Alexandre Alapetite
05ae1b0d26 XML+XPath (#5076)
* XML+XPath
#fix https://github.com/FreshRSS/FreshRSS/issues/5075
Implementation allowing to take an XML document as input using an XML parser (instead of an HTML parser for HTML+XPath)

* Remove noise from another PR

* Better MIME for XML

* And add glob *.xml for cache cleaning

* Minor syntax

* Add glob json for clean cache
2023-02-09 13:57:20 +01:00
Alexandre Alapetite
64d68a691c Fix disabling proxy (#5082)
#fix https://github.com/FreshRSS/FreshRSS/issues/5081
Allow disabling curl proxy for specific feed, when proxy is defined globally
2023-02-08 17:52:51 +01:00
Alexandre Alapetite
07efaf71ea Fix error handling when updating URL (#5039)
Fix 3 related error handling when updating the feed URL with an invalid URL. Previously leading to unclear 500 page with additional PHP errors.
2023-01-26 08:59:34 +01:00
Sadetdin EYILI
914bc62aef fix: favicon after editing feed url (#4975)
refactor: replace `$cat` variable by the `$values['category']` values
2022-12-31 15:57:37 +01:00
Alexandre Alapetite
4881e126ee Fix encoding CSS filter (#4707)
#fix https://github.com/FreshRSS/FreshRSS/issues/4705
2022-10-11 00:47:31 +02:00
Alexandre Alapetite
648a876d77 Add support for custom XPath date/time format (#4703)
* Add support for custom XPath date/time format
#fix https://github.com/FreshRSS/FreshRSS/issues/4701
Improvement of https://github.com/FreshRSS/FreshRSS/pull/4220

* Format is not XPath

* Remove TODOs in en-GB
2022-10-09 15:43:30 +02:00
maTh
a9d4c78931 Improved: Subscription Management: Show the position number (#4679)
* the code

* improvement

* fix doubled parameter
2022-10-03 16:26:53 +02:00
Roman D
0ec65788f9 Implemented advanced feed settings to allow cookies and HTTP redirects. (#4470)
* Implemented advanced feed settings to allow cookies and HTTP redirects.

* i18n fr

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-08-20 12:06:24 +02:00
Alexandre Alapetite
1603c10bba XPath ability to define the UID manually (#4507)
* XPath ability to define the UID manually

* Fix error in i18n
2022-08-18 12:10:55 +02:00
papaschloss
8587efa621 Article css filtering (#4501)
* Update feedController.php

* Update subscriptionController.php

* Update DatabaseDAO.php

* Update Entry.php

* Update Feed.php

* Update FeedDAO.php

* Update install.sql.mysql.php

* Update install.sql.pgsql.php

* Update install.sql.sqlite.php

* Update sub.php

* Update opml.phtml

* Update ImportService.php

* Update update.phtml

* Update feed.js

* Update install.sql.mysql.php

* Update install.sql.pgsql.php

* Update install.sql.sqlite.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update sub.php

* Update FeedDAO.php

* Update feedController.php

* Update subscriptionController.php

* Update Entry.php

* Update Feed.php

* Update feedController.php

* Update subscriptionController.php

* Update ImportService.php

* Update opml.phtml

* Update update.phtml

* Update update.phtml

* Update update.phtml

* Update DatabaseDAO.php

* Update app/Models/Entry.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update app/i18n/fr/sub.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update p/scripts/feed.js

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update app/Controllers/feedController.php

* make fix-all

* Update documentation

* css_path_filter help message

* i18n en-us ignore

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-08-15 21:01:18 +02:00
Alexandre Alapetite
82ac1d1e67 Refactor entry-to-GReader API format (#4490)
* Refactor entry to GReader API format
Some code was copied in two locations and not completely uniform.
Cleaning of related variables and functions (e.g. better types for entries and categories as objects vs. as IDs).
Usecase: I need to call the same GReader-compatible serialization from an extension

* Fixed some edge cases

* Keep summary instead of content
`summary` and `content` seems to be used interchangeably in the Google Reader API. We have been using `summary` for our client API and  `content` in our export/import, so stick to that.
2022-08-08 12:04:02 +02:00
Alexandre Alapetite
509c8cae63 Dynamic OPML (#4407)
* Dynamic OPML draft
#fix https://github.com/FreshRSS/FreshRSS/issues/4191

* Export dynamic OPML
http://opml.org/spec2.opml#1629043127000

* Restart with simpler approach

* Minor revert

* Export dynamic OPML also for single feeds

* Special category type for importing dynamic OPML

* Parameter for excludeMutedFeeds

* Details

* More draft

* i18n

* Fix update

* Draft manual import working

* Working manual refresh

* Draft automatic update

* Working Web refresh + fixes

* Import/export dynamic OPML settings

* Annoying numerous lines in SQL logs

* Fix minor JavaScript error

* Fix auto adding new columns

* Add require

* Add missing 🗲

* Missing space

* Disable adding new feeds to dynamic categories

* Link from import

* i18n typo

* Improve theme icon function

* Fix pink-dark
2022-07-04 09:53:26 +02:00
Alexandre Alapetite
d785ddde2a New option to automatically mark as read gone articles (#4426)
* New option to automatically mark as read gone articles
Option to automatically and immediately mark as read entries / articles that are no longer provided in their upstream RSS / ATOM / XPath feed

* Reduce SQL queries
Optimisation: Perform cache update only once
2022-06-25 11:15:51 +02:00
maTh
807ea755e0 fix preview (#4291)
* fix

* Update extra.js

* reorga the scripts

* Update extra.js

* Several fixes
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1125472321

* More fixes

* Cleaning

* fix pr 4291

* Reorganise some script functions

* Remove unused popup-txt
And associated function openPopupWithMessage

* Fix archiving categories
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126924602

* Fix stats
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126983134

* Fix direct subscription
E.g. http://localhost/i/?c=subscription&id=735

* Fix subscription add
https://github.com/FreshRSS/FreshRSS/pull/4291#issuecomment-1126991621

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-05-15 21:52:52 +02:00
maTh
7d00ad8ed7 Improve: manage feed in view within a slider (#4226)
* it works

* small improvements

* Update slider.js

* fixed JS syntax

* slider.js included in main.js

* fix syntax

* delete including of slider.js

* Update extra.js
2022-03-22 23:09:50 +01:00
Alexandre Alapetite
a9e23bd120 Remove XPath title in feed update (#4259)
* Remove XPath title in feed update
#fix https://github.com/FreshRSS/FreshRSS/issues/4253

* Pre-fill //title
https://github.com/FreshRSS/FreshRSS/issues/4253#issuecomment-1059746286

Co-authored-by: maTh <math-home@web.de>
2022-03-06 21:39:11 +01:00
Alexandre Alapetite
1fe66ad020 Implement Web scraping "HTML + XPath" (#4220)
* More PHP type hints for Fever
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4201
Related to https://github.com/FreshRSS/FreshRSS/issues/4200

* Detail

* Draft

* Progress

* More draft

* Fix thumbnail PHP type hint
https://github.com/FreshRSS/FreshRSS/issues/4215

* More types

* A bit more

* Refactor FreshRSS_Entry::fromArray

* Progress

* Starts to work

* Categories

* Fonctional

* Layout update

* Fix relative URLs

* Cache system

* Forgotten files

* Remove a debug line

* Automatic form validation of XPath expressions

* data-leave-validation

* Fix reload action

* Simpler examples

* Fix column type for PostgreSQL

* Enforce HTTP encoding

* Readme

* Fix get full content

* target="_blank"

* gitignore

* htmlspecialchars_utf8

* Implement HTML <base>
And fix/revert `xml:base` support in SimplePie e49c578817

* SimplePie upstream PR merged
https://github.com/simplepie/simplepie/pull/723
2022-02-28 20:22:43 +01:00
maTh
be9c06fd5c Improved: Idle feeds list in a new layout (#4192)
* that should work fine

* fixed phpcs

* fixed phpcs
2022-02-05 10:57:36 +01:00
Thomas Renes
916df412f5 Fix various typos and spelling errors in documentation, comments and code. (#4134) 2022-01-08 16:25:17 +01:00
Alexandre Alapetite
1335a0e3cf PHPStan level 5 (#4110)
* Fix most PHPDocs errors
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103
https://phpstan.org/writing-php-code/phpdoc-types

* Avoid func_get_args
Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list
And avoid dynamic functions names when possible to more easily identify calls and unused functions.
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103

* PHPStan level 3

* PHPStand level 4

* Update default to PHPStan level 4

* Towards level 5

* Fix level 4 regression

* Towards level 5

* Pass PHPStan level 5

* Towards level 6

* Remove erronenous regression from changelog
https://github.com/FreshRSS/FreshRSS/pull/4116
2022-01-04 13:59:09 +01:00
Alexandre Alapetite
77e9877316 Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00
maTh
3623a5421d enhancement subscription management page (#3893)
* wip

* wip2

* i18n

* Update app/views/helpers/category/update.phtml

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* fixed box layout

* Revert "i18n"

This reverts commit a2e4d8ace6.

* i18n

This reverts commit 55236930cf.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2021-10-19 15:08:32 +02:00
Alexandre Alapetite
a7aca6c0ab Improved feed action filters (#3303)
* Re-order some feed options
* Option to auto mark as read existing titles
* Option to keep at max n unread articles per feed
2021-09-19 10:56:38 +02:00
Alexandre Alapetite
a65097f1b3 Make SSL options available to non-admins (#3612)
#fix https://github.com/FreshRSS/FreshRSS/issues/3611
2021-05-07 17:21:16 +02:00
Jules-Bertholet
800a42172d Add an option to set a custom user agent to retrieve individual feeds (#3494)
* Add an option to set a custom user agent to retrieve individual feeds

This allows retrieving the original RSS feed when websites use services like FeedBurner.

* Use !== instead of != in subscriptionController.php

* Add proxy and user-agent to subscription/add

Co-authored-by: Georgelemental <georgelemental@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-03-09 20:51:09 +01:00
Alexis Degrugillier
fe1fba9828 Add a content action parameter to work with CSS selector (#3453)
Before, when retrieving article contents with CSS selector, the content
of the RSS feed was replaced by the content of the CSS selector. It works
well in most of the cases but if there is a different content in the feed
and in the selector, the former is lost.
Now, there is a parameter to decide which action is performed after retrieving
the content. By default, the previous behavior is kept. But now, it is
possible to append or prepend the CSS selector content to the feed content.

See #3451
2021-02-16 18:00:49 +01:00
Eris
ee175dd616 CURLOPT parameters per feed (#3367)
* Working curlopt_params

* Examples

* curl_params for fetching the article

* cleanup

* clarification

* Remove debugging

* Options corrected

* Removed Debugging

* i18n not needed (right now)

* Translations and UI rework

* Checks in update.phtml

* Unset Proxy&Cookies

* remove clutter

* minor fuckup

* i18n added properly

* resolve Errors

* linting errors

* linting errors, again

* Review

* Minor revert

* Minor i18n: de

Co-authored-by: maru <maru@nyx.im>
Co-authored-by: Aeris <a3x@eris.cc>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-16 22:32:18 +01:00
Alexandre Alapetite
48345403df Trim whitespace for feed passwords (#3158)
We output a space by default in the user interface for setting feed
passwords, in order to prevent aggressive password autocompletion
https://github.com/FreshRSS/FreshRSS/pull/881
However, user might not always override this white space when entering
the password. So here we trim.
(I believe legitimate leading / trailing spaces in passwords are
sufficiently rare not to be a problem)
2020-08-29 12:16:20 +02:00
Alexis Degrugillier
d4554fa087 Change add feed action (#3027)
* Docker Alpine 3.12 (#3025)

https://alpinelinux.org/posts/Alpine-3.12.0-released.html
With PHP 7.3.18 (from 7.3.17) (and Apache 2.4.43 unchanged).
No other significant change spotted

* Ensure feed attributes are used before load

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-06-05 10:09:31 +02:00
Alexis Degrugillier
f6e10579f2 Add category order (#2592)
* Add category order

Each category has a new 'priority' attribute. It is used to sort categories in
views. Categories with the same priority are sorted alphabetically. Categories
with no priority are displayed after those with one.

For example, if we have the following categories:
- A (priority: 2)
- B (no priority)
- C (priority: 1)
- D (priority: 2)
- E (no priority)
- F (priority: 1)

They will be displayed in the following order:
- C
- F
- A
- D
- B
- E

See #190

* Shorten help text

It took too much room and will not be so necessary once we have drag &
drop
2019-10-26 13:16:15 +02:00
Alexis Degrugillier
cc0db9af4f Feature/new archiving (#2335)
* Change archiving config page layout

I've changed some wording and moved actions into a
maintenance section.

* Update purge action

Now we have more control on the purge action. The configuration allows
us to choose what to keep and what to discard in a more precise way.
At the moment, the configuration applies for all feeds.

* Add purge configuration on feed level

Now the extend purge configuration is available on feed level.
It is stored as attributes and will be used in the purge action.

* Update purge action

Now the purge action uses the feed configuration if it exists and
defaults on user configuration if not.

* Add empty option in period list

* Fix configuration warnings

* Add archiving configuration on categories

See #2369

* Add user info back

* Add explanations in UI

* Fixes for SQLite + error + misc.

* Fix invalid feed reference

* Short array syntax

Only for new code, so far

* Fix prefix error

* Query performance, default values

Work in progress

* Fix default values and confirm before leaving

Form cancel and confirm changes before leaving were broken.
And start taking advantage of the short echo syntax `<?= ?>` as we have
moved to PHP 5.4+

* More work

* Tuning SQL

* Fix MariaDB + performance issue

* SQL performance

* Fix SQLite bug

* Fix some attributes JSON encoding bugs

Especially for SQLite export/import

* More uniform, fix bugs

More uniform between global, category, feed settings

* Drop special cases for old articles during refresh

Instead will use lastSeen date with the new archiving logic.
This was generating problems anyway
https://github.com/FreshRSS/FreshRSS/issues/2154

* Draft drop index keep_history

Not needed anymore

* MySQL typo

Now properly tested with MySQL, PostgreSQL, SQLite

* More work for legacy values

Important to avoid overriding user's preference and risking deleting
data erroneously

* Fix PHP 7.3 / 7.4 warnings

@aledeg "Trying to use values of type null, bool, int, float or resource
as an array (such as $null["key"]) will now generate a notice. "
https://php.net/migration74.incompatible

* Reintroduce min articles and take care of legacy parameters

* A few changes forgotten

* Draft of migration + DROP of feed.keep_history

* Fix several errors

And give up using const for SQL to allow multiple database types (and we
cannot redefine a const)

* Add keep_min to categories + factorise archiving logic

* Legacy fix

* Fix bug yield from

* Minor: Use JSON_UNESCAPED_SLASHE for attributes

And make more uniform

* Fix sign and missing variable

* Fine tune the logic
2019-10-23 00:52:15 +02:00