aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
AgeCommit message (Collapse)Author
2023-12-18Pass PHPStan level 8 (#5946)Gravatar Alexandre Alapetite
* 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-15Add filter actions (auto mark read) at category and global levels (#5942)Gravatar Alexandre Alapetite
* 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-03Rework keepmax (#5905)Gravatar Alexandre Alapetite
* 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-11-16Use strict_types (#5830)Gravatar Luc SANCHEZ
* 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-09-27Test if set_time_limit exists (#5675)Gravatar VYSE V.E.O
* Fix @set_time_limit as @-operator after PHP8 no longer suppresses disabled functions * preserve @ decorator * Fix whitespace --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-08-03Revert auto mark as read same titles for existing articles (#5561)Gravatar Alexandre Alapetite
Partial revert of https://github.com/FreshRSS/FreshRSS/pull/5505 We should not apply the auto mark as read rule based on existing titles for updated articles, because the match would most of the time be on that same article's title.
2023-08-03Fix cache refresh (#5562)Gravatar Alexandre Alapetite
Improvement of https://github.com/FreshRSS/FreshRSS/pull/4422 The main problem was due to `touch()` not automatically clearing the file status cache, and requiring a call to `clearstatcache()`. Example: ``` php > touch('/tmp/touch.txt'); php > echo date('c', filemtime('/tmp/touch.txt')); 2023-08-03T17:27:43+02:00 php > touch('/tmp/touch.txt'); php > echo date('c', filemtime('/tmp/touch.txt')); 2023-08-03T17:27:43+02:00 php > clearstatcache(true, '/tmp/touch.txt'); php > echo date('c', filemtime('/tmp/touch.txt')); 2023-08-03T17:28:21+02:00 ```
2023-07-07Chore/processing of depreciations and updating code to php72 minimum (#5504)Gravatar Luc SANCHEZ
* 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-05New extension hook entry_auto_read (#5505)Gravatar Alexandre Alapetite
* New extension hook entry_auto_read For extensions to be notified of articles being automatically marked as read for various reasons * Documentation + entry_auto_unread
2023-06-16Refactor lastSeen and markReadAsGone (#5470)Gravatar Alexandre Alapetite
* Refactor lastSeen and markReadAsGone Make the logic a bit more robust and explicit * Remove forgotten SQL param * Add test inTransaction * More robust transaction * Add a debug log * Add max timestamp to markAsReadUponGone * Reduce number of debug lines * typing * Better detection of when feed is empty * More explicit case for push
2023-05-16Fix again updateLastSeenUnchanged (#5404)Gravatar Alexandre Alapetite
* Fix again updateLastSeenUnchanged https://github.com/FreshRSS/FreshRSS/pull/5382 was not good enough to fix markAsReadUponGone and introduced a regression in `entry.lastSeen`. New approach. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5315 * Minor change of mind * Fix handling of lastSeen entry.lastSeen was not always correctly initialised, and sometimes overriden
2023-05-11A few additional PHPStan rules (#5388)Gravatar Alexandre Alapetite
A subset of https://github.com/phpstan/phpstan-strict-rules
2023-05-09Fix markAsReadUponGone (#5382)Gravatar Alexandre Alapetite
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/5315 which indroduced a bug for cached feeds. We now update the `lastSeen` property of entries to account for the fact that they are unchanged but still existing.
2023-05-07phpstan level 7 for feedController.php (#5373)Gravatar Luc SANCHEZ
* phpstan level 7 for feedController.php * phpstan level 7 for feedController.php * phpstan level 7 for feedController.php * phpstan level 7 for feedController.php * A few fixes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-02PHPStan Level 7 complete DAOs (#5354)Gravatar Alexandre Alapetite
* PHPStan Level 7 complete DAOs * Finalise PHPStan Level 7 for CategoryDAO * PHPStan Level 7 for Context and Search * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
2023-04-20Improve markAsReadUponGone (#5315)Gravatar Alexandre Alapetite
* Improve markAsReadUponGone Fix case when the uptream feed has zero article, then old articles would never be automatically marked as read with the "mark as read when gone" policy, which was only based on the timestamp of new articles from the uptream feed. * Fix typo * Simplify request Needs to be re-tested with SQLite + MySQL * While waiting to check syntax on all database types * Fix multiple errors In the case of WebSub, and in the case of invalid GUIDs
2023-04-17Complete PHPStan Level 6 (#5305)Gravatar Alexandre Alapetite
* 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-10PHPStan 6 for remaining controllers (#5279)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112
2023-04-07Fix login (#5271)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5270
2023-04-07Use typed access to request parameters (#5267)Gravatar Alexandre Alapetite
* Use typed access to request parameters This was a big source of mixed datatypes in many places * Fix notifications * Fix bookmarkAction
2023-04-04Fix extensions in actualize_script (#5243)Gravatar Alexandre Alapetite
* Fix extension freshrss_user_maintenance in actualize_script Follow-up of https://github.com/FreshRSS/FreshRSS/pull/3440 The hook was called before registering all the extensions for the current user * PHPStan Level 6 for extensions And remove 5-year old legacy format of enabled extensions < FreshRSS 1.11.1 * Fix multiple bugs in extensions * Minor typing * Don't change signature of methods supposed to be overridden * PHPStan Level 9 and compatibility Intelliphense * Set as final the methods not supposed to be overriden
2023-04-03Fix addFeed (#5253)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5252 Regression from https://github.com/FreshRSS/FreshRSS/pull/5239
2023-03-31PHPStan level 6 for all PDO and Exception classes (#5239)Gravatar Alexandre Alapetite
* PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface
2023-03-22Consistent entry ID type (32-bit compatibility) (#5213)Gravatar Alexandre Alapetite
* Remove FreshRSS_Searchable for better types The interface was not used, and it was preventing more precise types for the different `searchById()` methods, as they each have different input and output types. * Consistent entry ID Entry IDs (which are 64-bit integers) must be processed as string to be compatible with 32-bit platforms * Fix type * A few more related types * PHPStan level 6 * Some more casts needed * String cast for htmlspecialchars
2023-02-09XML+XPath (#5076)Gravatar Alexandre Alapetite
* 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-08Fix disabling proxy (#5082)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/5081 Allow disabling curl proxy for specific feed, when proxy is defined globally
2023-02-03Remove -x on some files not needing it (#5065)Gravatar Alexandre Alapetite
2023-01-06Better enclosures (#4944)Gravatar Alexandre Alapetite
* Better enclosures #fix https://github.com/FreshRSS/FreshRSS/issues/4702 Improvement of https://github.com/FreshRSS/FreshRSS/pull/2898 * A few fixes * Better enclosure titles * Improve thumbnails * Implement thumbnail for HTML+XPath * Avoid duplicate enclosures #fix https://github.com/FreshRSS/FreshRSS/issues/1668 * Fix regex * Add basic support for media:credit And use <figure> for enclosures * Fix link encoding + simplify code * Fix some SimplePie bugs Encoding errors in enclosure links * Remove debugging syslog * Remove debugging syslog * SimplePie fix multiple RSS2 enclosures #fix https://github.com/FreshRSS/FreshRSS/issues/4974 * Improve thumbnails * Performance with yield Avoid generating all enclosures if not used * API keep providing enclosures inside content Clients are typically not showing the enclosures to the users (tested with News+, FeedMe, Readrops, Fluent Reader Lite) * Lint * Fix API output enclosure * Fix API content strcut * API tolerate enclosures without a type
2022-11-07Fix path_entries encoding (#4823)Gravatar Alexandre Alapetite
* Fix path_entries encoding #fix https://github.com/FreshRSS/FreshRSS/issues/4815 * Fix preview
2022-10-09Add support for custom XPath date/time format (#4703)Gravatar Alexandre Alapetite
* 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-09-20Fix show settings page after adding new feed (#4612) (#4631)Gravatar Chris Francy
2022-08-20Implemented advanced feed settings to allow cookies and HTTP redirects. (#4470)Gravatar Roman D
* Implemented advanced feed settings to allow cookies and HTTP redirects. * i18n fr Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-08-18XPath ability to define the UID manually (#4507)Gravatar Alexandre Alapetite
* XPath ability to define the UID manually * Fix error in i18n
2022-08-15Article css filtering (#4501)Gravatar papaschloss
* 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-08Refactor entry-to-GReader API format (#4490)Gravatar Alexandre Alapetite
* 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-07-19Add database field attributes for entries (#4444)Gravatar Alexandre Alapetite
* Add database field attributes for entries Just like we already have for categories, feeds, etc. No core use yet, but allows in particular extensions to save per-entry data * Fix PHPStand * Fix wrong variable
2022-07-04Dynamic OPML (#4407)Gravatar Alexandre Alapetite
* 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-06-25New option to automatically mark as read gone articles (#4426)Gravatar Alexandre Alapetite
* 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-25Fix last update & archive logic (#4422)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4401
2022-05-19New limit option when reloading a feed (#4370)Gravatar Alexandre Alapetite
2022-05-13Fix favicons update (#4358)Gravatar Alexandre Alapetite
Better update the favicons when the URL changes
2022-04-26fix depending results after changing value of "entry->isRead" (#4331)Gravatar Clemens Neubauer
* fix depending results after changing value of "entry->isRead" inside of hook 'entry_before_insert' if anybody use the hook 'entry_before_insert' and change the value of the property 'entry->isRead', the depending results are correct now. In my case my config let all new entrys as "isRead=FALSE" as i will. A new extension which is in progress, can/should/must change the value of this property, but the depending results of this property are wrong before this fix. * Update app/Controllers/feedController.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-03-22Improve: manage feed in view within a slider (#4226)Gravatar maTh
* 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-21Set feed error state when XPath does not match (#4275)Gravatar Alexandre Alapetite
Gives the ability to filter HTML+XPath feeds that are not working
2022-02-28Implement Web scraping "HTML + XPath" (#4220)Gravatar Alexandre Alapetite
* 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 https://github.com/simplepie/simplepie/commit/e49c578817aa504d8d05cd7f33857aeda9d41908 * SimplePie upstream PR merged https://github.com/simplepie/simplepie/pull/723
2022-02-27fix (#4240)Gravatar maTh
2022-02-07Fix read-when-same-title bug (#4206)Gravatar Alexandre Alapetite
Made apparent by type hints
2022-02-06Fix Fever 32 bit ID issue + more PHP type hints (#4201)Gravatar Alexandre Alapetite
* Fix Fever 32 bit ID issue + more PHP type hints #fix https://github.com/FreshRSS/FreshRSS/issues/4200 Follow up and fix regression from https://github.com/FreshRSS/FreshRSS/pull/4110 * More PHP type hints with PHPStan * Fix pull problem * Avoid more nulls
2022-01-08Use typographic quotes (#4133)Gravatar Alexandre Alapetite
* Use typographic quotes * A few fixes * Fix * Fix not saved * Implement feedback * Detail * Revert spoken English fixes Left for a future dedicated discussion * More reverts * Final reverts * Final minor
2022-01-04PHPStan level 5 (#4110)Gravatar Alexandre Alapetite
* 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