aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz
AgeCommit message (Collapse)Author
2022-10-18Remove ajax parameter when modifying the request (#4743)Gravatar Alexis Degrugillier
Before, when clicking on the author name to use as a filter, the displayed page was a result page from the ajax query. This was due to the use of the ajax parameter in the query. Now, the ajax parameter is removed from the query before displaying the filters. Fix #4726
2022-10-03Allow redirection after login (#4654)Gravatar Alexis Degrugillier
Before, if you've tried to reach a page without being logged, you'll be automatically redirected to the index page after login. Now, the original page is used after login. Fix #3663
2022-08-21Improved: error page (#4465)Gravatar maTh
* error page: true HTML page * error page: http500 erorr * error page: add CSP header * 'log.txt' replaced by LOG_FILENAME * use ADMIN_LOG * log.txt => LOG_FILENAME * error message: add <title> * Docs created * delete: documentation on error message page * line break added * added: new line at the end * typo fixed * Update lib/lib_rss.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update lib/lib_rss.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Minz HTTP 500 Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-07-27Fix: logs page=0 error (#4460)Gravatar maTh
* add docs of function param() * page < 0 is impossible now * show prev/next only, when there is a prev/next page * set always page params * Revert "page < 0 is impossible now" This reverts commit fdb920ee50efe2c5cf64ca2dec936ec28ab2ee6c. * Update logs_pagination.phtml
2022-07-19Fix/Improved: Slider mobile (#4416)Gravatar maTh
* add close button, add content slider div * add &ajax=1#slider to the links * CSS * fix showPW functionality * open slider after received Ajax * do not show empty slider * RTL CSS * fixed code smell * improved: links prep via JS * Redirect anchor * enable #anchors in printuri() * enable #slider when config was saved * Active sliding via JS Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-06-21Better trim base_url (#4423)Gravatar Alexandre Alapetite
Avoid usual errors for instance with quotes, especially when provided through Docker / CLI
2022-06-19Initial support for PHP 8.2 (#4421)Gravatar Alexandre Alapetite
* Initial support for PHP 8.2 Using dev image `freshrss/freshrss:latest` https://github.com/FreshRSS/FreshRSS/pull/4420 * Deprecated string interpolation
2022-06-11Safer htmlspecialchars_utf8 (#4411)Gravatar Alexandre Alapetite
* Safer htmlspecialchars_utf8 #fix https://github.com/FreshRSS/FreshRSS/issues/4410 * Undefined variable
2022-05-23Custom logo HTML (#4369)Gravatar Alexandre Alapetite
* Custom logo HTML Add option for custom HTML logo/title in the main Web UI view. Can potentially be different per user. #fix https://github.com/FreshRSS/FreshRSS/pull/3830/files#r850472247 * logo_html in main config With new `./data/config.custom.php` to provide custom values before install * Docker documentation * whitespace * Auto relax CSP to allow images for HTML logo * Documentation
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-24Rename conflicting function (#4289)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4284
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-07PHPStan update to 1.4.6 (#4203)Gravatar Alexandre Alapetite
https://github.com/phpstan/phpstan/releases And compose udpdate
2022-02-04Fix root redirection (#4167)Gravatar Alexandre Alapetite
* Fix root redirection #fix https://github.com/FreshRSS/FreshRSS/issues/4126 * Smarter
2022-01-30Fix ctype_alnum (#4182)Gravatar Alexandre Alapetite
* Fix ctype_alnum #fix https://github.com/FreshRSS/FreshRSS/issues/4180 Ensure `ctype_alnum()` gets a string * Changelog
2022-01-17fix: Ignore non-PHP files in migrations/ folder (#4163)Gravatar berumuron
Some NAS create folders named `@eaDir` in the FreshRSS tree, including the `migrations/` folder. This broke the migration system which expected only valid PHP files to be present in this folder. Now, it ignores non-PHP files. Reference: https://github.com/FreshRSS/FreshRSS/issues/4044
2022-01-09Fix PHP 7.4 signature warnings (#4140)Gravatar Alexandre Alapetite
Revert some type hints creating warnings in PHP 7.4 (not in PHP 7.0 nor PHP 8.1)
2022-01-09Add spell checking with typos (#4138)Gravatar Alexandre Alapetite
* Add spell checking with typos Implement https://github.com/FreshRSS/FreshRSS/pull/4134#issuecomment-1008027558 * GitHub Actions attempt * Quiet wget * Makefile
2022-01-08Fix various typos and spelling errors in documentation, comments and code. ↵Gravatar Thomas Renes
(#4134)
2022-01-07Optimise Minz_ModelPdo::class (#4119)Gravatar Luc SANCHEZ
* - Fix typo, - remove unnecessary null in property, - remove unused property, - add phpDoc, - add ext PDO in composer.json, - use strict comparison, - indentation * Translate * Update lib/Minz/ModelPdo.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * The code is more explicite * Fix phpstan * Fix phpstan expect one * Fix phpstan * Return in back... * make fix-all * Fix exception and more types * Fix more types * Remove ext- in composer.json Co-authored-by: Luc SANCHEZ <l.sanchez-ext@ubitransport.com> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-01-06Fix several PHP8.1 warnings (#4123)Gravatar Alexandre Alapetite
* Fix several PHP8.1 warnings Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/4121 * Couple oh type hints missing * Compatibility PHP 7 * Fix variadic PHPDocs syntax
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
2022-01-01Avoid func_get_args (#4108)Gravatar Alexandre Alapetite
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
2022-01-01Fix most PHPDocs errors (#4107)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types
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-31Fix extensions_enabled (#4090)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4088
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-12-01Fix some PHP 8.1 warnings (#4012)Gravatar Alexandre Alapetite
* Fix some PHP 8.1 warnings The proper fix will have to wait till be drop PHP7. #fix https://github.com/FreshRSS/FreshRSS/issues/4010 * Another PHP8.1 fix
2021-09-11Mailer rename .txt to .txt.php (#3842)Gravatar Alexandre Alapetite
* Mailer rename .txt to .txt.php
2021-07-11Add system configuration for extension (#3626)Gravatar Alexis Degrugillier
Before, only the user configuration was supported by extensions. But it was limiting if one has to create a system extension with configuration. Now, both user and system configuration are supported.
2021-05-18Add a request method to extract arrays (#3629)Gravatar Alexis Degrugillier
2021-05-16Minz provide action name in controller exception (#3624)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/3584
2021-05-15git update auto change to edge branch (#3589)Gravatar Alexandre Alapetite
* git update auto change to edge branch For existing installations using automatic git update, checkout *edge* branch if it was still using *master* or *dev*. * One more prune * Fix several small issues * theirs does not work here * Use migration mechanism * Better handling of Migration errors * Test details * Fix tests * Do not use new migration system for now
2021-05-08Fix several comments syntaxes (#3615)Gravatar Alexandre Alapetite
Mainly wrong `@return` types in comments
2021-04-17Show start error (#3590)Gravatar Alexandre Alapetite
* Show start error #fix https://github.com/FreshRSS/FreshRSS/issues/3581 We were not showing the actual error for several types of exceptions, e.g. database connection error. Possible regression since https://github.com/FreshRSS/FreshRSS/pull/3407 * Try to make the error message less confusing
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-26Add support for extension user files (#3433)Gravatar Alexis Degrugillier
Extension user files can be stored easily in the user folder instead of the static folder.
2021-02-17Add user maintenance hooks (#3440)Gravatar Alexis Degrugillier
The new hook allows to add maintenance extensions at the user level. See #3398
2021-02-08Fix configuration local cache (#3431)Gravatar Alexis Degrugillier
Before, setting values did not refresh the configuration cache. Thus generating some weird behavior when configuring extensions. Now, the cache is updated with the most recent values when the configuration is modified.
2021-02-05Better error message on failure (#3407)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 * Better error message * inconsistent dot with the other message * Better error message * add errorMessage() * fix style * html escape the error title * also html escape error message * remove spaces before parentheses * rework the error message * Minz-friendly * Update message Do not advise running this script as wrong user * Update lib/lib_rss.php Co-authored-by: Martin <spleefer90@gmail.com> Co-authored-by: Martin Rys <martin@rys.pw> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-02-05Add a method to retrieve a configuration value (#3422)Gravatar Alexis Degrugillier
This will simplify extension code by removing a lot of logic from the extension itself when it's not needed. I've tested it on one of my extension with all the other recent extension modifications and I could remove half of the code needed before.
2021-02-02Fix user configuration in extension (#3412)Gravatar Alexis Degrugillier
Before, only one extension could be configured at a time. Thus we were loosing the configuration for other extensions when saving. Now, each extension can be saved without overriding data. See #3397
2021-02-02Add comprehensive user configuration in extensions (#3397)Gravatar Alexis Degrugillier
Before, the extension configuration was handled by its author. There was discrepancies between extensions on how the configuration was stored. Now, we could rely on a single way of storing configuration. This won't invalidate how the extensions are storing their configuration but will allow authors to focus on what is important.
2021-01-30Explicit PDO::ERRMODE_SILENT (#3408)Gravatar Alexandre Alapetite
`PDO::ERRMODE_SILENT` is the default value https://php.net/pdo.error-handling We just make it explicit #fix https://github.com/FreshRSS/FreshRSS/issues/3402 But in the issue above, it looks like it is in `PDO::ERRMODE_EXCEPTION` mode
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-11Possiblity to autoinstall in Docker Compose (#3353)Gravatar Alexandre Alapetite
* Possiblity to autoinstall in Docker Compose #fix https://github.com/FreshRSS/FreshRSS/issues/3349 It is simply calling our existing CLI: do-install.php and create-user.php https://github.com/FreshRSS/FreshRSS/tree/master/cli FreshRSS will typically be ready a few seconds before the database, so introduce a tolerance when the database is not available / up (yet) by trying a few times to connect. Also useful to avoid service interruption when DB service is restarted. Example: ```yml freshrss-app: image: freshrss/freshrss container_name: freshrss-app hostname: freshrss-app restart: unless-stopped ports: - "8080:80" depends_on: - freshrss-db volumes: - data:/var/www/FreshRSS/data - extensions:/var/www/FreshRSS/extensions environment: CRON_MIN: '*/20' FRESHRSS_ENV: development FRESHRSS_INSTALL: |- --api_enabled --base_url https://rss.example.net --db-base freshrss --db-host freshrss-db --db-password freshrss --db-type pgsql --db-user freshrss --default_user admin --language en FRESHRSS_USER: |- --api_password freshrss --email user@example.net --language en --password freshrss --user admin TZ: Europe/Paris ``` * Minor type f in find * shellcheck
2021-01-09Add class autoload for extension (#3350)Gravatar Alexis Degrugillier
When an extension defines an `autoload` method, it will be registered automatically before enabling the extension. For the extension creator, it's easier because there is no need to register it manually.
2021-01-07two new hooks (#3342)Gravatar Clemens Neubauer
* add two new hooks I develop a new extension and i need 2 new hooks for it * update EN documentation * Correct typing errors * Update app/views/helpers/javascript_vars.phtml Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-07Change base extension class type (#3333)Gravatar Alexis Degrugillier
Before, there were some guidelines on how to use the extension class and how to extend it. Those guidelines were defined as comments. Now, those guidelines are enforced by the code itself. There is no need for those comments anymore.