summaryrefslogtreecommitdiff
path: root/app/Controllers/configureController.php
AgeCommit message (Collapse)Author
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-05-13PHPStan Level 7 for Share userController logs_pagination (#5393)Gravatar Alexandre Alapetite
2023-04-20PHPStan Level 7 for FreshRSS_UserQuery (#5319)Gravatar Alexandre Alapetite
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5318
2023-04-20PHPStan 7 configureController (#5318)Gravatar Alexandre Alapetite
And fix bugs for saving user queries
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-13Fix save shortcuts (#5294)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5293 Regression from https://github.com/FreshRSS/FreshRSS/pull/5267
2023-04-08Fix display options (#5278)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5276
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-04feat: create config to display website icon only / name only / icon and name ↵Gravatar Sadetdin EYILI
/ none on feeds (#4969) * feat: create config to display website icon only / name only / icon and name / none on feeds * fix title hovering * reverted: column in .phtml * Update app/i18n/fr/conf.php --------- Co-authored-by: mathContao <math-home@web.de> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-02-03Remove -x on some files not needing it (#5065)Gravatar Alexandre Alapetite
2023-01-20Use paramBoolean consistently (#5025)Gravatar Alexandre Alapetite
* Use paramBoolean consistently So that we have cleaner values (true booleans) everywhere in user's config.php
2023-01-09Added: Dark mode for Origine +Origine compact themes (#4843)Gravatar maTh
* first draft * fix: theme slider: properties box * improved colors * option to enable/disable dark mode * fixes * Update app/i18n/fr/conf.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * i18n english improved * fix dark background color for favorites + hover colors * select list: no, auto Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-11-29User-defined time zone (#4906)Gravatar Alexandre Alapetite
* User-defined time zone #fix https://github.com/FreshRSS/FreshRSS/issues/2754 * Update app/i18n/nl/conf.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Timezone when creating a new user Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2022-07-17Improved: Article header (#4101)Gravatar maTh
* First draft for normal view * Revert changes on the entry header * Update normal.phtml * Update normal.phtml * RTL CSS * CSS fixes * Better tags style * fix * Update swage.scss * fix * Update swage.scss * fixed .content header * font-size in rem * improved template * dropdown menu if more than 7 tags * configuration: show tags in topline * Simplify loop logic * Minor space * config tags via reading (i18n still missed) * fixed the whitespaces * optimizations * optimize header+footer * Update normal.phtml * fix css * new config: show author+date in footer * config feed name display * improve HTML * fix whitespaces * i18n * i18n: German translations * fix i18n German * fixed: uncouple from bottomline config * reverted: tobline_tags * equalities * fixed: author in footer * fixed data-leave-validation * improved max numbers i18n label * Config works now also in the reader view * fix: footer border * reader view: style article-header-topline * fixed whitespace * i18n fr * Minor i18n fr * Fix mistake i18n fr * i18n fr more precise expression * Fix JavaScript * removed the link icon in the title * clean CSS Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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-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-02Minz request avoid custom methods (#4020)Gravatar Alexandre Alapetite
Take advantage of PHP7+ null-coalescing operator `??` to make code more standard, shorter, and faster instead of custom function with no extra functionality. Allows code to be better tested and fix two PHPstan errors: ``` ------ ----------------------------------------- Line app/Controllers/configureController.php ------ ----------------------------------------- 410 Cannot unset offset 'rid' on string. ------ ----------------------------------------- ------ ------------------------------------ Line lib/Minz/FrontController.php ------ ------------------------------------ 70 Cannot unset offset 'c' on string. 71 Cannot unset offset 'a' on string. ------ ------------------------------------ ``` https://github.com/FreshRSS/FreshRSS/issues/4016
2021-09-19Improved feed action filters (#3303)Gravatar Alexandre Alapetite
* Re-order some feed options * Option to auto mark as read existing titles * Option to keep at max n unread articles per feed
2021-08-30UI: Add optional thumbnail and summary on feed items (#3805)Gravatar ORelio
* UI: Add optional thumbnail and summary on feed items Implements #561 * UI: Thumbnail: Own column, Custom size, Lazy load * UI: Thumbnail: Remove unnecessary CSS rule Remove rule already defined in base theme, no override needed * CSS lint + RTL * Improve thumbail and summary generation * Support img alt * Missing htmlspecialchars Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-03-21Remove shortcut validation (#3548)Gravatar Alexis Degrugillier
Before, only standard shortcuts were supported. When other shortcuts were configured, they were filtered out. Now, those shortcuts are stored in the configuration and an alert message is displayed to alert the user that he is using non-standard shortcuts. See #3481
2021-03-19Fix search param encoding in user query (#3541)Gravatar Alexis Degrugillier
Before, the chosen encoding was not the best for the task since some part of the value was truncated when used with quotes. Now, the encoding allows to work smoothly with quotes. See #3538
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-01-24Fix load default action on shortcuts (#3394)Gravatar Alexis Degrugillier
See #3388
2021-01-16Change integration configuration page (#3372)Gravatar Alexis Degrugillier
I've refactored the user query code to be able to use it also on the integration configuration page. Now, items can be re-organized as in the user query list.
2021-01-15Add a query configuration page (#3366)Gravatar Alexis Degrugillier
* Add a query configuration page Before, there was no way to modify a user query. Thus you need to create a new one and delete the old one afterward. Now, every user query can be modified if needed. They have their own configuration page on which it can be modified or deleted. * Change drag and drop action on queries Before, the drag and drop action needed to be validated by submitting the form to be persisted. Now, it's done automatically after the query is dropped to its final location.
2021-01-14Add constant for PHP requirements (#3369)Gravatar Alexis Degrugillier
* Add constant for PHP requirements This new constant is used for PHP version check. This way, we won't forget to modify some part of the code base. * Remove PHP version checks Some checks were obsolete because they were checking unsupported PHP versions.
2021-01-09Add user query manual sorting (#3346)Gravatar Alexis Degrugillier
* Add user query manual sorting Before, to change the user query order, you'll have to delete them and recreate them. It was not really efficient. Now, you can drag and drop them to ease reordering. See #2216 and #2015 * Remove cancel action on user query configuration Before, the cancel action was useless since it was not wired. Now, there is no cancel action. See #2015
2021-01-07Update user query feature (#3338)Gravatar Alexis Degrugillier
* Change user query wording There was some misunderstanding in the use of the user query feature, probably because of the wording. I've change it to make it more obvious. * Fix feedback when a query is bookmarked Before, the displayed query name was not the one intended. Now, the name is the one of the current bookmark * Document user queries I've added a few words on how to use the user queries because it seems there was some misunderstanding. See #3219
2020-12-29Trim rid param from user query (#3306)Gravatar Alexandre Alapetite
Caused by https://github.com/FreshRSS/FreshRSS/pull/3208 Before, the 'rid' parameter was saved as part of the user query.
2020-12-26bump default logout from 30 days to 3 months (#3170)Gravatar Martin
* bump default logout from 30 to 365 days * * Change cookie duration to constant * Change cookie duration to three months * use class * use 90 days (otherwise login form says 91.3 days) * change class * also this works now Co-authored-by: Martin Rys <martin@rys.pw> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2020-12-26Fix user queries with labels (#3285)Gravatar Alexis Degrugillier
Before user queries with labels were not translated. Actually, it was not even processed. Now those user queries are translated properly. See #3215
2020-10-05Minz: Attach a notification to a request (#3208)Gravatar Alexandre Alapetite
* Minz: Attach a notification to a request Notifications should be attached to a request, not to a global session. Fix https://github.com/FreshRSS/FreshRSS/pull/3096#issuecomment-654891906 Prepare https://github.com/FreshRSS/FreshRSS/pull/3096 * Rename array * Avoid string constants Implement https://github.com/FreshRSS/FreshRSS/pull/3208#issuecomment-703243863 * Improved logic * Simplify storage https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499511213 * Fix notification bug in configuration/system
2020-07-14Add a way to disable shortcuts (#3114)Gravatar Alexis Degrugillier
When the user do not want to use a shortcut, he can let the shortcut value empty. This will save an empty configuration thus disabling the shortcut. The load default action allows to use default shortcut only for disabled shortcuts. See #3110
2020-06-06Fix user queries when they contain " (#3037)Gravatar Alexis Degrugillier
Before, the user queries were working filter-wise but they failed at being displayed properly in the configuration page. Thus they were stored without the search param. Now, the search is URL encoded to avoid that kind of behavior and keep the search param through out the user query's life.
2020-04-16Option to control which categories to unfold (#2888)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/2324
2020-01-16Show Favorites as Unread (#2766)Gravatar Offerel
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2019-11-08Rename sharing action (#2643)Gravatar Alexis Degrugillier
Before, some ad-blocker rules were preventing to display the sharing page because of its name. I've renamed that page to integration but kept every thing else identical. So it's still called sharing through out the application. If needed, this can be addressed as well. See #2509 and #2419
2019-10-23Feature/new archiving (#2335)Gravatar Alexis Degrugillier
* Change archiving config page layout I've changed some wording and moved actions into a maintenance section. * Update purge action Now we have more control on the purge action. The configuration allows us to choose what to keep and what to discard in a more precise way. At the moment, the configuration applies for all feeds. * Add purge configuration on feed level Now the extend purge configuration is available on feed level. It is stored as attributes and will be used in the purge action. * Update purge action Now the purge action uses the feed configuration if it exists and defaults on user configuration if not. * Add empty option in period list * Fix configuration warnings * Add archiving configuration on categories See #2369 * Add user info back * Add explanations in UI * Fixes for SQLite + error + misc. * Fix invalid feed reference * Short array syntax Only for new code, so far * Fix prefix error * Query performance, default values Work in progress * Fix default values and confirm before leaving Form cancel and confirm changes before leaving were broken. And start taking advantage of the short echo syntax `<?= ?>` as we have moved to PHP 5.4+ * More work * Tuning SQL * Fix MariaDB + performance issue * SQL performance * Fix SQLite bug * Fix some attributes JSON encoding bugs Especially for SQLite export/import * More uniform, fix bugs More uniform between global, category, feed settings * Drop special cases for old articles during refresh Instead will use lastSeen date with the new archiving logic. This was generating problems anyway https://github.com/FreshRSS/FreshRSS/issues/2154 * Draft drop index keep_history Not needed anymore * MySQL typo Now properly tested with MySQL, PostgreSQL, SQLite * More work for legacy values Important to avoid overriding user's preference and risking deleting data erroneously * Fix PHP 7.3 / 7.4 warnings @aledeg "Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice. " https://php.net/migration74.incompatible * Reintroduce min articles and take care of legacy parameters * A few changes forgotten * Draft of migration + DROP of feed.keep_history * Fix several errors And give up using const for SQL to allow multiple database types (and we cannot redefine a const) * Add keep_min to categories + factorise archiving logic * Legacy fix * Fix bug yield from * Minor: Use JSON_UNESCAPED_SLASHE for attributes And make more uniform * Fix sign and missing variable * Fine tune the logic
2019-09-29PDO refactoring for code simplification (#2522)Gravatar Alexandre Alapetite
* PDO refactor * Automatic prefix when using the syntax `_tableName` * Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query * Use PDO methods exec(), query(), prepare() + execute() in a more efficient way * Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old) * The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language) * Rename `->bd` to `->pdo` (less of a frenshism, and more informative) * Fix some requests, which were not compatible with MySQL prepared statements * Whitespace * Fix syntax for PostgreSQL sequences + MySQL install * Minor formatting * Fix lastInsertId for PostgreSQL * Use PHP 5.6+ const Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527 https://www.php.net/manual/en/migration56.new-features.php * A bit of forgotten PHP 5.6 simplification for cURL * Forgotten $s * Mini fix custom user config https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346 * More work on install.php but not finished * install.php working * More cleaning of PDO in install * Even more simplification Take advantage of PDO->exec() to run multiple statements * Disallow changing the name of the default category https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-08-29Provide email address verification feature (#2481)Gravatar Marien Fressinaud
* Add an email field to the profile page I reuse the `mail_login` from the configuration. I'm not sure if it's useful today (I would say it was used when Persona login was available). A good improvement would be to rename `mail_login` into `email` so it would be more intuitive to use. * Add boolean to the conf to force email validation This commit only adds a configuration item. * Add email during registration if email must be validated * Set email token to validate when email changes * Block access to FreshRSS if email is not validated * Send email when address is changed * Allow to resend the validation email * Allow the user to change its email while blocked * Document the email validation feature * fixup! Allow the user to change its email while blocked * tec: Autoload PHPMailer lib * Validate email address format * Add feedback on validation email resend action * Allow to logout when user is blocked * fix: Change default email "from" * Reorganize i18n keys * Complete all the locales with default english * Hide sidebar (profile page) if email is not validated * Check email requirements on registration * Allow admin to specify email when creating users * Don't check email format if value is empty * Remove trailing comma in userController Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr> * Set PHPMailer validator to html5 before sending email * fixup! Remove trailing comma in userController
2019-08-14Added option to display authors under article titles (#2487)Gravatar Joris Kinable
This feature is particularly useful to display authors underneath scientific articles.
2019-04-07Fix PHP 5.5 compat for array const (#2360)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2359
2019-04-02Shortcuts legacy (#2320)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2316
2018-11-18Edit cookie_duration from GUI (#2137)Gravatar Patrick Crandol
* Use cookie_duration correctly * WIP allow cookie_duration to be modified from GUI * Allow cookie_duration to actually be updated * Update view to properly display cookie_duration * Add new strings in Translation Files * Fix typo * Fix trailing whitespace * I18n: French translation * I18n fr: Forgot todo
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
2018-02-19Option to hide nav_entries (#1764)Gravatar Matt DeMoss
* put nav_entries in a div so they can be hidden, add config option, no labels yet * add English text for hide_nav_entries, choose better name * Update conf.php add comma to last item * hide nav_entries by optionally not rendering in normal.phtml * fix logic, remove containing div * apply phpcbf to ConfigurationSetter.php * Make navigation buttons options positive And add TODOs for i18n, and add default config.
2018-01-01Add mute strategy configuration (#1750)Gravatar Alexis Degrugillier