aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/subscriptionController.php
AgeCommit message (Collapse)Author
2025-03-05Fix regression cURL HTTP headers (#7403)Gravatar Alexandre Alapetite
* Fix regression cURL HTTP headers fix https://github.com/FreshRSS/FreshRSS/issues/6712#issuecomment-2697961491 We would sometimes wrongly override the default HTTP headers of SimplePie https://github.com/FreshRSS/simplepie/pull/33 https://github.com/simplepie/simplepie/pull/912 * Sync SimplePie https://github.com/FreshRSS/simplepie/pull/33
2025-01-25Improve cURL proxy options (#7231)Gravatar Alexandre Alapetite
3 is now used for CURLPROXY_HTTPS2 https://github.com/curl/curl/blob/f07612cd9ae1ec50b9bedd749171ad75203c9e7e/include/curl/curl.h#L789 Related to https://github.com/FreshRSS/FreshRSS/issues/7209
2025-01-10Reduce undeeded use of elvis operator ?: (#7204)Gravatar Alexandre Alapetite
2024-12-28Fix regressions on some array structures (#7155)Gravatar Alexandre Alapetite
regressions from https://github.com/FreshRSS/FreshRSS/pull/7131 fix https://github.com/FreshRSS/FreshRSS/issues/7154
2024-12-11Improved CSS filter (#7091)Gravatar Alexandre Alapetite
* Improved CSS filter Remove unwanted elements both before and after sanitizing fix https://github.com/FreshRSS/FreshRSS/issues/7084 Improved fix bug in https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35#commitcomment-150152171 * fix typing
2024-12-10OPML export/import for cssFullContentConditions (#7082)Gravatar Alexandre Alapetite
Follow-up of https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35, which should have been a PR.
2024-12-10Conditional retrievalGravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6149
2024-10-15Fix PHPCS ControlSignature (#6896)Gravatar Alexandre Alapetite
Regression from https://github.com/FreshRSS/FreshRSS/pull/6666 We were not checking anymore for whitespace rules in e.g. `if (true) {`
2024-10-14New unicity policies for feeds with bad GUIDs (#4487)Gravatar Alexandre Alapetite
New set of unicity criteria options. New tolerance heuristic: > `$invalidGuidsTolerance` (default 0.05) The maximum ratio (rounded) of invalid GUIDs to tolerate before degrading the unicity criteria. > Example for 0.05 (5% rounded): tolerate 0 invalid GUIDs for up to 9 articles, 1 for 10, 2 for 30, 3 for 50, 4 for 70, 5 for 90, 6 for 110, etc. > The default value of 5% rounded was chosen to allow 1 invalid GUID for feeds of 10 articles, which is a frequently observed amount of articles.
2024-10-13New feed mode: HTML + XPath + JSON dot notation (JSON in HTML) (#6888)Gravatar Alexandre Alapetite
* New feed mode: HTML + XPath + JSON dot notation (JSON in HTML) Same as `JSON+DotNotation` but first extracting the JSON string from an HTML document thanks to an XPath expression. Example: `//script[@type='application/json']` fix https://github.com/FreshRSS/FreshRSS/discussions/6876 * JavaScript UI to show/hide new field * Casing xPathToJson * Slight renaming
2024-09-22Fix HTML encodings in e.g. cURL options (#6821)Gravatar Alexandre Alapetite
* Fix HTML encodings in e.g. cURL options * Trim headers whitespace
2024-09-21Add HTTP Headers option (#6820)Gravatar Eugen Gorbunov
* 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-11PHPStan booleansInConditions (#6793)Gravatar Alexandre Alapetite
* PHPStan booleansInConditions * Uniformisation
2024-04-25Refactoring: Rename dotpath into dotnotation (#6369)Gravatar maTh
* 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-10PHP 8.3 #[\Override] (#6273)Gravatar Alexandre Alapetite
* 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-02-26New feature: shareable user query (#6052)Gravatar Alexandre Alapetite
* 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-01-10JSONFeeds, JSON scraping, and POST requests for feeds (#5662)Gravatar eta-orionis
* 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>
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-14Remove variable default_category (#5945)Gravatar Alexandre Alapetite
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-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-06Remove obsolete TTL migration code (#5625)Gravatar Alexandre Alapetite
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-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-06-15Fix slider views (#5469)Gravatar Alexandre Alapetite
* 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-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-08Fix feed priority (#5274)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5273
2023-04-07Phpstan Level6 for View.php (#5269)Gravatar Luc SANCHEZ
* 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-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-03-21Typehint some Controllers (#5106)Gravatar Luc SANCHEZ
* 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-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-01-26Fix error handling when updating URL (#5039)Gravatar Alexandre Alapetite
Fix 3 related error handling when updating the feed URL with an invalid URL. Previously leading to unclear 500 page with additional PHP errors.
2022-12-31fix: favicon after editing feed url (#4975)Gravatar Sadetdin EYILI
refactor: replace `$cat` variable by the `$values['category']` values
2022-10-11Fix encoding CSS filter (#4707)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4705
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-10-03Improved: Subscription Management: Show the position number (#4679)Gravatar maTh
* the code * improvement * fix doubled parameter
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-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-05-15fix preview (#4291)Gravatar maTh
* 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-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-06Remove XPath title in feed update (#4259)Gravatar Alexandre Alapetite
* 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-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-05Improved: Idle feeds list in a new layout (#4192)Gravatar maTh
* that should work fine * fixed phpcs * fixed phpcs
2022-01-08Fix various typos and spelling errors in documentation, comments and code. ↵Gravatar Thomas Renes
(#4134)
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