aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/categoryController.php
AgeCommit message (Collapse)Author
9 daysImplement sort order per feed (#8234)Gravatar PeterVavercak
* added local feed sorting Addresses https://github.com/FreshRSS/FreshRSS/issues/4761 - Added number of sorted feeds and associative array for feed sorting option in Context. - Number of sorted feeds and local sorting option by its index saved into Minz Request Parameters. - Number of sorted feeds and local sorting options deleted when choosing another Option Of Global Sorting. - Added option of allowing sorting by feed in configuration. - Added variable for allowing local sorting in userConf. - Added function to get feeds by current get in context. - Added menu button for all individual feed sorting. - New database options for individual feed sorting in EntryDAO. - Considered choosing new entries based on chosen load limit. - Local sorting parameter saved into continuation value in Index Controller. How to test the feature manually: 1. At the bottom of Reading Configuration menu turn on individual sorting option menu 2. Choose Sorting by feed option 3. Choose feed at next sorting menu and choose sorting option for that feed * added feed sorting option * added sort feeds display * added template for sort feed name * added title to feed sorting button * added comments * added local sorting option * Added Docs * css reset * added getter and seter for local sort * added getter and seter for local sort * allowed sorting per feed * allowed sorting per feed * added sorting option for category * deleted changes from NetryDAO * add setting up sorting for category * docs reset * i18 reset * updated i18 for category * added i18 for categories * added i18 for category * added setting sorting for feeds and category * removing userConf.allow-local-sort * removing userConf.allow-local-sort * removing white space * added credits * removed feeds_by_get * removed whitespace * changed escaping for values * added escaping to user set values * added in_array * added secondary sort and order * added secondary sort and order * fixed readme * removed whitespace change * reseted i18n * added translations * added feed setting translations * fixed i18n * fixed i18n * changes in sort order per feed * changes in sort order per feed * added secondary sort order * primary sort * changed to preferred sort order * i18n * Revert wrong whitespace changes * Re-order new options * added blank option * fixed escaping * fixed default sort in feed * fixed default sort recovery * siplyfied option * added rand option * Revert unrelated change * Minor plaintext * Whitespace and formatting fixes * Avoid unneeded SQL requests and processing * Improve syntax * Improve logic * Reuse existing translations as much as possible * i18n * Remove some options that make little sense * Separators * Fix old transation key * Add help messages * Progress on secondary sort * raw name * Pass parameters. Add TODO * Progress * Minor ordering * Fix parenthesis --------- Co-authored-by: root <root@LAPTOP-C8TCHHPN.localdomain> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-12-17Rework encoding of search filters (#8324)Gravatar Alexandre Alapetite
Rework: * https://github.com/FreshRSS/FreshRSS/pull/8222 now that we have: * https://github.com/FreshRSS/FreshRSS/pull/8293 Follow-up of: * https://github.com/FreshRSS/FreshRSS/pull/8311 * More simplification * Deprecate getRawInput
2025-12-04Fix HTML encoding in preview filters (alternative) (#8259)Gravatar Alexandre Alapetite
Alternative to https://github.com/FreshRSS/FreshRSS/pull/8222 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8222 Co-authored-by: Inverle <inverle@proton.me>
2025-11-11Housekeeping lib_rss.php (#8193)Gravatar Alexandre Alapetite
* Housekeeping lib_rss.php `lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924 Moved most functions to other places. Mostly no change of code otherwise (see comments). * Extension: composer run-script phpstan-third-party
2025-10-22Add option to apply filter actions to existing articles (#7959)Gravatar Tommaso Ferrari
* Add option to apply filter actions to existing articles * make fix-all * Fixes * Another approach with preview New approach: https://github.com/FreshRSS/FreshRSS/pull/7959/commits/20479475c90ac954b991b3703c3cc76c16aa2d5c <img width="666" height="202" alt="image" src="https://github.com/user-attachments/assets/bb68ede4-60c8-4e0c-9317-c5ed7a6ad7df" /> Additional improvements: * Also implemented at category level, and at global level * Also implemented for favourites at global level Shortcomings: * Does not always work reliably with advanced regex, since the DB's flavour is not necessarily the same than PHP's Related: https://github.com/FreshRSS/FreshRSS/pull/8141 * make fix-all --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-10-01configurable notification timeout (#7942)Gravatar maTh
Ref #7931 Ref #5466 Ref #6409 added configuration in "Display" <img width="636" height="167" alt="grafik" src="https://github.com/user-attachments/assets/7bbc9f26-d91b-4dd2-b715-1d3f9b7a9ad3" /> * i18n: fr * Update app/i18n/pl/conf.php Co-authored-by: Inverle <inverle@proton.me> * make fix-all * max() * Minor whitespace (I am not a fan of excessive vertical indenting) --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Inverle <inverle@proton.me>
2025-08-25Fix fetching OPML url with special characters (#7843)Gravatar Inverle
* Decode dynamic OPML url during fetch * add ENT_QUOTES * Store as plaintext instead of decoding
2025-03-07Fix issue where $keepMax is defaulted to const when non-zero value is ↵Gravatar Bryan Butler
compared. (#7416) Fix issue where $keepMax is defaulted to const when non-zero value is compared. Fix an issue where $keepMax var is set to ARCHIVING_RETENTION_COUNT_LIMIT when a user sets "Archiving" -> "Maximum number of articles to keep per feed" to a non-zero value for a given category. [EXAMPLE]: User sets value to 50 (int), This matches the !== comparison and thus is overridden by ARCHIVING_RETENTION_COUNT_LIMIT.
2025-01-10Reduce undeeded use of elvis operator ?: (#7204)Gravatar Alexandre Alapetite
2024-12-27PHPStan 2.0 (#7131)Gravatar Alexandre Alapetite
* PHPStan 2.0 fix https://github.com/FreshRSS/FreshRSS/issues/6989 https://github.com/phpstan/phpstan/releases/tag/2.0.0 https://github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md * More * More * Done * fix i18n CLI * Restore a PHPStan Next test For work towards PHPStan Level 10 * 4 more on Level 10 * fix getTagsForEntry * API at Level 10 * More Level 10 * Finish Minz at Level 10 * Finish CLI at Level 10 * Finish Controllers at Level 10 * More Level 10 * More * Pass bleedingEdge * Clean PHPStan options and add TODOs * Level 10 for main config * More * Consitency array vs. list * Sanitize themes get_infos * Simplify TagDAO->getTagsForEntries() * Finish reportAnyTypeWideningInVarTag * Prepare checkBenevolentUnionTypes and checkImplicitMixed * Fixes * Refix * Another fix * Casing of __METHOD__ constant
2024-12-03New button to delete errored feeds from a category (#7030)Gravatar Alexandre Alapetite
* New button to delete errored feeds from a category fix https://github.com/FreshRSS/FreshRSS/issues/7025 fix https://github.com/FreshRSS/FreshRSS/issues/7026 * Remove English TODO * in error state * Feeds with errors
2024-10-21New option mark article as read if identical title in category (#6922)Gravatar Alexandre Alapetite
* New mark articles as read if identical title in category fix https://github.com/FreshRSS/FreshRSS/issues/6143 * i18n todo forgotten
2024-08-01Minor update whitespace PHPCS rules (#6666)Gravatar Alexandre Alapetite
* Minor update whitespace PHPCS rules To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12. Does not change our current conventions, but just a bit more consistent. * Forgotten *.phtml * Sort exclusion patterns + add a few for Extensions repo * Relaxed some rules
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
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-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-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-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-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-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-03-08Feedback when tag with same name as new category exists (#5181)Gravatar obrenckle
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-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-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
2020-06-05Change add feed action (#3027)Gravatar Alexis Degrugillier
* 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>
2018-09-29Custom labels (#2027)Gravatar Alexandre Alapetite
* First draft of custom tags https://github.com/FreshRSS/FreshRSS/issues/928 https://github.com/FreshRSS/FreshRSS/issues/1367 * SMALLINT to BIGINT for id_entry And uppercase SQL types * Fix layout for unreads * Start UI menu * Change menu order * Clean database helpers https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535 * Travis rules do not understand PostgreSQL constants Grrr * Tag controller + UI * Add column attributes to tags * Use only favicon for now, for label * Fix styling for different themes * Constant for maximum InnoDB index length in Unicode https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200 (I would have personnally prefered keeping the readability of a real value instead of a constant, in this case of many SQL fields) * Use FreshRSS_Factory::createCategoryDao * Add view of all articles containing any tag * Fix search in tags * Mark as read tags * Partial auto-update unread tags * More auto update tag unreads * Add tag deletion * Do not purge tagged articles * Minor comment * Fix SQLite and UI bug * Google Reader API support for user tags Add SQL check that tag names must be distinct from category names * whitespace * Add missing API for EasyRSS * Compatibility SQLite Problematic parentheses * Add SQL DISTINCT for cases with multiple tags * Fix for PostgreSQL PostgreSQL needs some additional type hint to avoid "could not determine data type of parameter $1" http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2017-09-22[ci] Add Travis (#1619)Gravatar Frans de Jonge
* [ci] Add Travis * Exclude some libs * Semi-auto whitespace fixes * line length in SQLite * Exclude tests from line length * Feed.php line length * Feed.php: get rid of unnecessary concat * Feed.php: line length * bootstrap.php: no newline at end of file * Allow concatenating across multiple lines * Add Travis badge * do-install line length * update-or-create-user line length * cli/create-user line length * tests/app/Models/SearchTest.php fix indentation * tests/app/Models/UserQueryTest.php fix indentation * tests/app/Models/CategoryTest.php fix indentation * [fix] PHP 5.3 on precise * cli/do-install no spaces * cli/list-users line length * cli/reconfigure line length * empty catch statements * api/index line length nonsense * spaces before semicolon * app/Models/EntryDAO bunch of indentation * extra blank lines * spaces before comma in function call * testing tabwidth * increase to 10 * comment out tabwidth line * try older phpcs version 3.0.0RC4 * line length exception for app/install.php * proper spaces * stray spaces in i18n * Minz/ModelPdo line length * Minz whitespace * greader line length * greader elseif placement * app/Models/Feed.php spacing in function argument * ignore php 5.3 * app/Models/ConfigurationSetter.php stray whitespace * EntryDAOSQLite line length * I vote for higher max line length =P * ignore SQL * remove classname complaint * line length/more legible SQL * ignore line length nonsense * greader line length * feedController issues * uppercase TRUE, FALSE, NULL * revert * importExportController lowercase null * Share.php default value not necessary because ! is_array () a few lines down * CategoryDAO constants should be UPPERCASE * EntryDAO reduce line length * contentious autofix * Allow failures on all versions of PHP except 7.1 because reasons
2016-10-23CLI import ZIP/OPML/JSON for userGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1095 https://github.com/FreshRSS/FreshRSS/issues/851
2015-01-07Fix calls to remove_query_by_get()Gravatar Marien Fressinaud
The function has been moved into lib_rss.php See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-05Change name of user configuration var in ContextGravatar Marien Fressinaud
- FreshRSS_Context::$conf is replaced by FreshRSS_Context::$user_conf - Introduce FreshRSS_Context::$system_conf - Remove FreshRSS_Configuration object See https://github.com/FreshRSS/FreshRSS/issues/730
2014-12-11Fix i18n for auth and category controllersGravatar Marien Fressinaud
2014-10-30Fix Minz_Error::error() -> use default valuesGravatar Marien Fressinaud
2014-10-29Update i18n for limit of category.Gravatar Marien Fressinaud
2014-10-27Global limits for number of feeds and categoriesGravatar Alexandre Alapetite
New 'limits' sub-array in config.php with 'max_feeds' and 'max_categories'. If the values are < 0, then it is the default value (16384). https://github.com/marienfressinaud/FreshRSS/issues/680
2014-10-20Use FreshRSS_Context::$conf onlyGravatar Marien Fressinaud
- Replace $this->view->conf in controllers - Replace $this->conf in views
2014-10-06Refactor authentication system.Gravatar Marien Fressinaud
Big work, not finished. A lot of features have been removed. See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-01Fix problem when deleting default categoryGravatar Marien Fressinaud
This is not allowed! See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-10-01Fix links for feed managementGravatar Marien Fressinaud
See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-09-30Cat updating system worksGravatar Marien Fressinaud
Add a submit button Each box contains a specific form See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-09-30Move deletion of categories into new ControllerGravatar Marien Fressinaud
Fix i18n (occured -> occurred) See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-09-30Move empty cat action in the new ControllerGravatar Marien Fressinaud
feedController::delete is simpler than before. Improve coding style See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-09-30Move creation of categories in a new ControllerGravatar Marien Fressinaud
Category names are 255 chars max