aboutsummaryrefslogtreecommitdiff
path: root/p/api
AgeCommit message (Collapse)Author
2024-06-05Modernize code to php7.4 (#6043)Gravatar Luc SANCHEZ
* Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Consistency --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-06-05add image and description to user query share (#6541)Gravatar Thomas White
* add description to user queries and rss feed * add image url to user queries and rss feed * Fix i18n * remove itunes image tag and xml definition --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-04-01greader.php: only return 'OK' on greader.php without query parameters (#6238)Gravatar Frans de Jonge
It'd be clearer if the API endpoint didn't return `OK` when adding the `Email` and `Passwd` parameters. Whether it should indeed return `OK` if they're correct is debatable. In reply to <https://github.com/FreshRSS/FreshRSS/issues/5856#issuecomment-2019814077>.
2024-03-01Reduce API memory consumption (#6137)Gravatar Alexandre Alapetite
`echo json_encode(...)` is very memory demanding for large responses, so optimised. Contributes to https://github.com/FreshRSS/FreshRSS/issues/6136 https://github.com/FreshRSS/FreshRSS/pull/6013#discussion_r1506779881
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-02API allow negative feed IDs (#6010)Gravatar Alexandre Alapetite
For future features (e.g. save articles by URL, save a manual note, ...), it would be good to allow special feeds, and to use negative integers for that. The rest of FreshRSS seems to be already ready, and there was only the Google Reader API, which required positive integers for feed IDs. I quickly tested apps such as News+, EasyRSS, Rreadrops, which seem fine with that, but help welcome to test compatibility more thoroughly.
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-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-11-14API fix add feed with title (#5868)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5866
2023-11-08Update WebSub documentation a bit (#5829)Gravatar Alexandre Alapetite
* Update WebSub documentation a bit * Marien prefers not to promote his hub too much :-)
2023-11-08New feature important feeds (#5782)Gravatar Alexandre Alapetite
* New feature important feeds * Fix PHPStan * Initial style for important feeds + keep unread * Change UI order * Count important unread * Never mark as read important feeds during scroll * Fix i18n conf.iew.normal regression * Fix reader view * More fix reader view * Create important.svg * Fix title * Fix counter * Account for important during mark-all-as-read * Fix underline colour * 📌 * Changelog --------- Co-authored-by: math-gh <> Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
2023-10-30Require PHP 7.4+ (#5720)Gravatar Alexandre Alapetite
* Require PHP 7.4+ https://github.com/FreshRSS/FreshRSS/discussions/5474 * Update Docker oldest Alpine 3.13 with PHP 7.4.26 * Add missing packets to Docker oldest * Update to typed properties https://php.net/migration74.new-features#migration74.new-features.core.typed-properties * More types
2023-09-04Fix JSON export/import (#5626)Gravatar Alexandre Alapetite
* Fix import with empty content fix https://github.com/FreshRSS/FreshRSS/issues/5622 Cherry picks on https://github.com/FreshRSS/FreshRSS/pull/5584 * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix bug with many labels * Better typing * Comments
2023-07-07fix many "Only booleans are allowed in an if condition" (#5501)Gravatar Luc SANCHEZ
* fix many "Only booleans are allowed in an if condition" * Update cli/create-user.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update cli/i18n/I18nUsageValidator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Fix several regressions and other minor things * Fix another regression * Update lib/http-conditional.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-11A few additional PHPStan rules (#5388)Gravatar Alexandre Alapetite
A subset of https://github.com/phpstan/phpstan-strict-rules
2023-05-01Fix API starred (#5366)Gravatar Alexandre Alapetite
* Fix API starred Fix https://github.com/FreshRSS/FreshRSS/issues/5363 https://github.com/FreshRSS/FreshRSS/commit/c72914bba2363e436574204b3d6093a6f3cfce89#commitcomment-111220080 * Minor type fix * Additional check * Minor syntax change * Forgotten type change
2023-04-28PHPStan Level 7 for more DAO PDO (#5328)Gravatar Alexandre Alapetite
* PHPStan Level 7 for more DAO PDO With new function to address common type and check problems * A bit more * PHPStan Level 7 for FreshRSS_Entry
2023-04-23PHPStan Level 7 for ten more files (#5327)Gravatar Alexandre Alapetite
* PHPStan Level 7 for nine more files * Minor syntax * One more
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-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-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-03-26Modernize Constants and use new constant for string 'currentUser' (#5089)Gravatar Luc SANCHEZ
* Modernize Constants and use new constant 'currentUser' * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Models/Auth.php * Update p/api/greader.php * Update p/api/greader.php * Update p/api/greader.php * Update app/Models/Context.php * Update app/Models/LogDAO.php * Update lib/Minz/Log.php * Update p/api/greader.php * Update app/layout/header.phtml * Update app/views/helpers/export/articles.phtml * Update cli/do-install.php * Remarque's from Alkarex * Remarque's from Alkarex * Refactor using new Minz_User class * Consistent naming of public constants --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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-03-22Remove FreshRSS_Searchable for better types (#5212)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. * Fix type
2023-03-19FeverAPI fix enclosures (#5214)Gravatar Alexandre Alapetite
Fix regression: provide enclosures as part of HTML content body in FeverAPI #fix https://github.com/FreshRSS/FreshRSS/issues/5209
2023-03-09Fever API fix mark-all-as-read (#5185)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/5183 And set protected methods as private since there is no subclass, and in order to get warnings for unused methods, which would have spotted the bug.
2023-03-08Typehint to greader.php file (#5108)Gravatar Luc SANCHEZ
* Typehint to greader.php file * remark from aledeg * fix phpstan * Remarque's from Alkarex * Revert switch case --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-01-29PHPStan level 9 for ./p/ and lib_rss.php (#5049)Gravatar Alexandre Alapetite
And app/FreshRSS.php Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112
2023-01-11API avoid logging passwords (#5001)Gravatar Alexandre Alapetite
* API avoid logging passwords * Strip passwords and tokens from API logs * Only log failed requests information when in debug mode * Remove debug SHA * Clean also Apache logs * Better comments * Redact also token parameters * shfmt * Simplify whitespace * redacted
2022-11-14Typing function checkToken (#4561)Gravatar Luc SANCHEZ
* Typing function checkToken * Typing function and rename Co-authored-by: Luc SANCHEZ <luc.sanchez@zol.fr>
2022-10-23GReader API doc and improvements (#4763)Gravatar Alexandre Alapetite
* GReader API doc and improvements #fix https://github.com/FreshRSS/FreshRSS/issues/4762 * Minor slash * HTTPS for web.archive.org
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-19Update all test dependencies (#4419)Gravatar Alexandre Alapetite
* Update all test dependencies * Remove old false-positive * Minor update lock files * Increase PHPStan memory for Fedora https://github.com/FreshRSS/FreshRSS/pull/4400#issuecomment-1159514197 * Require PHP8+ for tests Due to small changes of signature in `ob_implicit_flush` and `simplexml_load_string`, cf. https://github.com/FreshRSS/FreshRSS/pull/4123 * Missing lint in CSS files
2022-06-02New search engine (#4378)Gravatar Alexandre Alapetite
* New possibility to invoke user queries from a search expression From the search field: `S:"My query"`. Can be combined with other filters such as `S:"My query" date:P3d` as long as the user queries do not contain `OR`. A use-case is to have an RSS filter with a stable address or an external API call with the ability to update the user query. * Draft of parenthesis logic * More draft * Working parenthesis (a OR b) (c OR d) * Working (A) OR (B) * Support nested parentheses + unit tests + documentation * search:MySearch and S:3
2022-03-22WebSub: Use hash instead of base64 to handle long URLs (#4282)Gravatar Alexandre Alapetite
* WebSub: Use hash instead of base64 to handle long URLs * Use 410 Gone (Part of the WebSub specification https://www.w3.org/TR/websub/ )
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-07More PHP type hints for Fever (#4202)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
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-08Fix various typos and spelling errors in documentation, comments and code. ↵Gravatar Thomas Renes
(#4134)
2022-01-05[CI] PHPCS: check for opening brace on same line (#4122)Gravatar Frans de Jonge
* [CI] PHPCS: check for opening brace on same line * make fix-all * Minor comments Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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
2021-12-31Add PHPStan (#4021)Gravatar Alexandre Alapetite
* 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-12fever: fix warning of unset array key (#4056)Gravatar Felix Bühler
2021-03-24Compatibility ORIG_PATH_INFO (#3560)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3542
2021-02-28Travis: Enforce phpcs line length + whitespace (#3488)Gravatar Alexandre Alapetite
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
2021-02-06API implement OPML import/export (#3424)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3421
2021-01-22GReader API add canonical information (#3391)Gravatar Alexandre Alapetite
For fluent-reader #fix https://github.com/FreshRSS/FreshRSS/issues/3389 Better compatibility InoReader https://www.inoreader.com/developers/stream-contents