aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/Controllers/categoryController.php
Commit message (Collapse)AuthorAge
* Fix issue where $keepMax is defaulted to const when non-zero value is ↵Bryan Butler2025-03-07
| | | | | | | | | | | | | 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.
* Reduce undeeded use of elvis operator ?: (#7204)Alexandre Alapetite2025-01-10
|
* PHPStan 2.0 (#7131)Alexandre Alapetite2024-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* New button to delete errored feeds from a category (#7030)Alexandre Alapetite2024-12-03
| | | | | | | | | | | * 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
* New option mark article as read if identical title in category (#6922)Alexandre Alapetite2024-10-21
| | | | | | * New mark articles as read if identical title in category fix https://github.com/FreshRSS/FreshRSS/issues/6143 * i18n todo forgotten
* Minor update whitespace PHPCS rules (#6666)Alexandre Alapetite2024-08-01
| | | | | | | | | | | * 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
* PHP 8.3 #[\Override] (#6273)Alexandre Alapetite2024-04-10
| | | | | | | | | | * 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
* Pass PHPStan level 8 (#5946)Alexandre Alapetite2023-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add filter actions (auto mark read) at category and global levels (#5942)Alexandre Alapetite2023-12-15
| | | | | | | | | | | * 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
* Use strict_types (#5830)Luc SANCHEZ2023-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Chore/processing of depreciations and updating code to php72 minimum (#5504)Luc SANCHEZ2023-07-07
| | | | | | | | | | | * 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>
* PHPStan Level 7 for more DAO PDO (#5328)Alexandre Alapetite2023-04-28
| | | | | | | | * 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
* Complete PHPStan Level 6 (#5305)Alexandre Alapetite2023-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Use typed access to request parameters (#5267)Alexandre Alapetite2023-04-07
| | | | | | | | * Use typed access to request parameters This was a big source of mixed datatypes in many places * Fix notifications * Fix bookmarkAction
* Typehint some Controllers (#5106)Luc SANCHEZ2023-03-21
| | | | | | | | | | | | | | | | | | | * 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>
* Feedback when tag with same name as new category exists (#5181)obrenckle2023-03-08
|
* Dynamic OPML (#4407)Alexandre Alapetite2022-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* PHPStan level 5 (#4110)Alexandre Alapetite2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Travis: Enforce phpcs line length + whitespace (#3488)Alexandre Alapetite2021-02-28
| | | | | | | | | | | | | * 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
* Change add feed action (#3027)Alexis Degrugillier2020-06-05
| | | | | | | | | | | * 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>
* Custom labels (#2027)Alexandre Alapetite2018-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* [ci] Add Travis (#1619)Frans de Jonge2017-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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
* CLI import ZIP/OPML/JSON for userAlexandre Alapetite2016-10-23
| | | | | https://github.com/FreshRSS/FreshRSS/issues/1095 https://github.com/FreshRSS/FreshRSS/issues/851
* Fix calls to remove_query_by_get()Marien Fressinaud2015-01-07
| | | | | | The function has been moved into lib_rss.php See https://github.com/FreshRSS/FreshRSS/issues/730
* Change name of user configuration var in ContextMarien Fressinaud2015-01-05
| | | | | | | | - 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
* Fix i18n for auth and category controllersMarien Fressinaud2014-12-11
|
* Fix Minz_Error::error() -> use default valuesMarien Fressinaud2014-10-30
|
* Update i18n for limit of category.Marien Fressinaud2014-10-29
|
* Global limits for number of feeds and categoriesAlexandre Alapetite2014-10-27
| | | | | | | 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
* Use FreshRSS_Context::$conf onlyMarien Fressinaud2014-10-20
| | | | | - Replace $this->view->conf in controllers - Replace $this->conf in views
* Refactor authentication system.Marien Fressinaud2014-10-06
| | | | | | Big work, not finished. A lot of features have been removed. See https://github.com/marienfressinaud/FreshRSS/issues/655
* Fix problem when deleting default categoryMarien Fressinaud2014-10-01
| | | | | | This is not allowed! See https://github.com/marienfressinaud/FreshRSS/issues/646
* Fix links for feed managementMarien Fressinaud2014-10-01
| | | | See https://github.com/marienfressinaud/FreshRSS/issues/646
* Cat updating system worksMarien Fressinaud2014-09-30
| | | | | | | Add a submit button Each box contains a specific form See https://github.com/marienfressinaud/FreshRSS/issues/646
* Move deletion of categories into new ControllerMarien Fressinaud2014-09-30
| | | | | | Fix i18n (occured -> occurred) See https://github.com/marienfressinaud/FreshRSS/issues/646
* Move empty cat action in the new ControllerMarien Fressinaud2014-09-30
| | | | | | | feedController::delete is simpler than before. Improve coding style See https://github.com/marienfressinaud/FreshRSS/issues/646
* Move creation of categories in a new ControllerMarien Fressinaud2014-09-30
Category names are 255 chars max