aboutsummaryrefslogtreecommitdiff
path: root/app/Models
AgeCommit message (Collapse)Author
2021-05-18Fix array_chunk key index bug (#3631)Gravatar Alexandre Alapetite
* Fix array_chunk key index bug #fix https://github.com/FreshRSS/FreshRSS/issues/3630 We still want array entries indexed sequentially from zero https://php.net/function.array-chunk * One missing
2021-05-08Fix several comments syntaxes (#3615)Gravatar Alexandre Alapetite
Mainly wrong `@return` types in comments
2021-05-08More cases of max SQL variable number (#3586)Gravatar Alexandre Alapetite
Follow up of https://github.com/FreshRSS/FreshRSS/pull/3553
2021-03-27Fix regression media attachments (#3565)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3564 Bug introduced by https://github.com/FreshRSS/FreshRSS/pull/3361
2021-03-26Suport standard HTTP 410 Gone (#3561)Gravatar Alexandre Alapetite
When a feed returns an HTTP 410 Gone, mute the corresponding feed, i.e. stop refreshing it. Example of such feed, Les Décodeurs (Libération) https://rss.liberation.fr/rss/100893/
2021-03-24Fix TT-RSS import (#3553)Gravatar Alexandre Alapetite
2021-03-23Fix DB lock bug during refresh (MariaDB) (#3559)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3552
2021-03-23Check pdo_sqlite for export/import SQLite (#3545)Gravatar Alexandre Alapetite
2021-03-09SimplePie prevent cache pollution (#3502)Gravatar Alexandre Alapetite
* SimplePie prevent cache polution #fix https://github.com/FreshRSS/FreshRSS/pull/3367#issuecomment-766250249 #fix https://github.com/FreshRSS/FreshRSS/pull/3494#issuecomment-790113663 * Fix bug * Minor improvement * Update cache filename in FreshRSS (1/2) * cacheFilename temp * New SimplePie get_cache_filename() * Fix typos * Update lib/SimplePie/SimplePie.php Typo * Include user-agent and timeout * fix array_merge * Declaration * force_feed was lost in a commit
2021-03-09Reload full content when changed (#3506)Gravatar Alexandre Alapetite
* Reload full content when changed If an article is changed, reload also its full content when applicable. * Compute hash before getting full content * Revert mix two PRs * Update app/Controllers/feedController.php
2021-03-07fix updateEntryPrepared (#3500)Gravatar Alexandre Alapetite
2021-03-07SQLite: fix updateEntry (#3461)Gravatar Alexandre Alapetite
* Draft of fix for updateEntry #fix https://github.com/FreshRSS/FreshRSS/issues/3130 * Fix for SQLite * Update app/Models/EntryDAO.php Fixed in https://github.com/FreshRSS/FreshRSS/pull/3500 * Unbuffered streaming only for MySQL
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-27Remove + conversion in search except for tags (#3489)Gravatar Alexis Degrugillier
Before, every + sign was converted to a space to allow to search for spaces. But the documentation stated that to search for space one has to enclose the string in quotes. This has a confusing behavior when searching for a string containing a + sign. Now, the + conversion is kept only for the tag search since it's the only one documented that way. See #3454
2021-02-26"Show all" option on labels (#3472)Gravatar Alexis Degrugillier
It uses the favorite option to keep a similar experience through out the application and also to limit the number of options. See #3263
2021-02-20Fix feed sort order (#3466)Gravatar Alexis Degrugillier
Before, the feeds in the list weren't properly ordered. Uppercase values were before lowercase values. Now, the feed order is forced to ignore the case. See #3228
2021-02-20Add full content delimiter and action (#3463)Gravatar Alexis Degrugillier
Before, when appending or prepending the content of the CSS selector content, it was added to the content. It was working fine for the first call but every subsequent calls were pilling the retrieved content on top of the already retrieved content. Thus we had an ever growing content with a lot of duplication. Now, the CSS selector content is identified by an HTML comment which is used to remove the content for every subsequent calls. The bug was introduced in #3453
2021-02-16Add a content action parameter to work with CSS selector (#3453)Gravatar Alexis Degrugillier
Before, when retrieving article contents with CSS selector, the content of the RSS feed was replaced by the content of the CSS selector. It works well in most of the cases but if there is a different content in the feed and in the selector, the former is lost. Now, there is a parameter to decide which action is performed after retrieving the content. By default, the previous behavior is kept. But now, it is possible to append or prepend the CSS selector content to the feed content. See #3451
2021-02-02INSERT ... ON CONFLIT DO NOTHING for addEntry (#3409)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3402 Explicit `INSERT OR IGNORE` / `ON CONFLICT DO NOTHING` for the `addEntry()` method, which does expect some duplicates.
2021-01-16CURLOPT parameters per feed (#3367)Gravatar Eris
* Working curlopt_params * Examples * curl_params for fetching the article * cleanup * clarification * Remove debugging * Options corrected * Removed Debugging * i18n not needed (right now) * Translations and UI rework * Checks in update.phtml * Unset Proxy&Cookies * remove clutter * minor fuckup * i18n added properly * resolve Errors * linting errors * linting errors, again * Review * Minor revert * Minor i18n: de Co-authored-by: maru <maru@nyx.im> Co-authored-by: Aeris <a3x@eris.cc> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-12Fix images in enclosures without MIME type (#3361)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3358 Assume enclosures without a mime type, without a length, but with either a width or a height are images
2021-01-11Fix commitNewEntries query (#3357)Gravatar Craig Andrews
There was an erroneous '; at the end of the commitNewEntries DELETE query, resulting in an exception during actualization with this output: ``` FreshRSS starting feeds actualization at 2021-01-11T14:06:09+00:00 FreshRSS actualize candrews... PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' at line 1 in /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php:45 Stack trace: #0 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php(45): PDO->exec() #1 /var/www/localhost/htdocs/FreshRSS/app/Models/EntryDAO.php(167): Minz_Pdo->exec() #2 /var/www/localhost/htdocs/FreshRSS/app/Controllers/feedController.php(505): FreshRSS_EntryDAO->commitNewEntries() #3 /var/www/localhost/htdocs/FreshRSS/app/Controllers/feedController.php(548): FreshRSS_feed_Controller::actualizeFeed() #4 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Dispatcher.php(119): FreshRSS_feed_Controller->actualizeAction() #5 /var/www/localhost/htdocs/FreshRSS/lib/Minz/Dispatcher.php(47): Minz_Dispatcher->launchAction() #6 /var/www/localhost/htdocs/FreshRSS/lib/Minz/FrontController.php(81): Minz_Dispatcher->run() #7 /var/www/localhost/htdocs/FreshRSS/app/actualize_script.php(75): Minz_FrontController->run() #8 {main} thrown in /var/www/localhost/htdocs/FreshRSS/lib/Minz/Pdo.php on line 45 Results: ```
2021-01-09Do not import feed causing DB error (#3347)Gravatar Alexandre Alapetite
* Do not import feed causing DB error The DB error might be that the new feed tries to redirect to an already existing feed, in which case #fix https://github.com/FreshRSS/FreshRSS/issues/3339 * Add feed bug
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
2021-01-03Fix share option sort (#3331)Gravatar Alexis Degrugillier
Before, share options were displayed in the order defined in the configuration file. So the order reflected the share history and was not really usable. Now, share options are displayed in alphabetical order which makes much more sense.
2021-01-02Avoid manual initialisations of system or user configuration (#3070)Gravatar Alexandre Alapetite
* Avoid manual intialisations of system or user configuration More consistent use of Context * Simplify FreshRSS_Context::initUser * Remove a few manual get_user_configuration * A bit of debugging * Fix context user init * Fix install * Fix concurrency Concurrent requests could lead to bad race condition * Fix actualize cron Fix case when system i initialised several times
2020-12-29Add a file for each PDO class (#3301)Gravatar Alexis Degrugillier
Before, we had 5 classes in the ModelPdo file. It was bad for 2 reasons. The first reason is that it is considered bad practice to have multiple class in one file. This is especially true when using autoloading. On top of that it is less readable considering the size of the file. The second reason is that so far we were lucky. Everytime we needed to access the database, it was through the ModelPdo class which loads all the other classes. If we want to access directly the connection, it wont be loaded. On top of that, the system is configured to work on a single database, but as we have every connection definition in a single file, all classes were loaded at the same time. Thus using memory and processing time for nothing. Now, we have a file for each class. To work with autoloading, classes were slightly renamed to match autoloading rules.
2020-12-28Revert "Add a file for each PDO class (#3297)"Gravatar Alexandre Alapetite
This reverts commit e1ee58816ba76734e4115fc12898b13de665b220.
2020-12-28Add a file for each Auth class (#3298)Gravatar Alexis Degrugillier
It's a follow-up of what was started in #3297.
2020-12-28Add a file for each PDO class (#3297)Gravatar Alexis Degrugillier
Before, we had 5 classes in the ModelPdo file. It was bad for 2 reasons. The first reason is that it is considered bad practice to have multiple class in one file. This is especially true when using autoloading. On top of that it is less readable considering the size of the file. The second reason is that so far we were lucky. Everytime we needed to access the database, it was through the ModelPdo class which loads all the other classes. If we want to access directly the connection, it wont be loaded. On top of that, the system is configured to work on a single database, but as we have every connection definition in a single file, all classes were loaded at the same time. Thus using memory and processing time for nothing. Now, we have a file for each class. To work with autoloading, classes were slightly renamed to match autoloading rules.
2020-12-28Auto-renew cookie (#3287)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3169#issuecomment-685983797 Supplement https://github.com/FreshRSS/FreshRSS/pull/3170 When we get the long-term login cookie (i.e. when starting a new session), renew it at the same time for the same duration
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-11-23Ensure maximum date int (#3259)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3258
2020-11-02Remember open categories (#3185)Gravatar Prashant Tholia
* feature(normal) - Remember opened categories in the left menu Session storage based implementation to remember opened categories in left menu Issue Ref: #2248 * lib_phpQuery updates * Updates covering feedback points and functionality fixes * Feedback updates * Revert "lib_phpQuery updates" This reverts commit dcd23b9418405a2d14ee03c1fcadf90c04b267e1. * First review Change variable name to "remember" instead of "open". Start using localStorage instead of sessionStorage. Simplify code. * Simplify remember categories init function Replace 'session' with 'local' in function names and comment Set open categories CSS as same as when category is opened in 'active' unfold mode * Remove URLSearchParams check in remember categories init function * Delete open categories on login and logout * JSHint check fix * Second review * Make new mode the default for new users * Always open active category * Reduce / simplify code * i18n French * Revert default value Wait a bit more for this decision / change Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-10-11Fix sanitize feed description (#3222)Gravatar Alexandre Alapetite
* Fix sanitize feed description #fix https://github.com/FreshRSS/FreshRSS/issues/3221 * Simplification
2020-10-06Minz allow parallel sessions (#3096)Gravatar Alexandre Alapetite
* Minz allow parallel sessions #fix https://github.com/FreshRSS/FreshRSS/issues/3093 * Array optimisation * Array optimisation missing * Reduce direct access to $_SESSION except in install process * Fix session start headers warning * Use cookie only the first time the session is started: `PHP Warning: session_start(): Cannot start session when headers already sent in /var/www/FreshRSS/lib/Minz/Session.php on line 39` * New concept of volatile session for API calls Optimisation: do not use cookies or local storage at all for API calls without a Web session Fix warning: ``` PHP Warning: session_destroy(): Trying to destroy uninitialized session in Unknown on line 0 ``` * Only call Minz_Session::init once in our index It was called twice (once indirectly via FreshRSS->init()) * Whitespace * Mutex for notifications Implement mutex for notifications https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499509809 * Typo * Install script is not ready for using Minz_Session
2020-09-03When ssl_verify is false, decrease SSL security (#3171)Gravatar Alexandre Alapetite
When ssl_verify option is set to false for a feed, allow lower security such as SHA-1 signatures. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900984 https://stackoverflow.com/questions/58342699/php-curl-curl-error-35-error1414d172ssl-routinestls12-check-peer-sigalgwr Fix error of type `cURL error 35: error:1414D172:SSL routines:tls12_check_peer_sigalg:wrong signature` Example of feeds: https://www.version2.dk/it-nyheder/rss https://ing.dk/rss/nyheder
2020-09-02Fix tag in user query (#3168)Gravatar Alexandre Alapetite
* Fix tag in user query #fix https://github.com/FreshRSS/FreshRSS/issues/3163 * Fix Travis
2020-09-01Fix variable undeclared ($sql) (#3165)Gravatar Luc SANCHEZ
* Fix variable undeclared ($sql) * Update DatabaseDAOSQLite.php modify
2020-08-05Change feed order in a category (#3131)Gravatar Alexis Degrugillier
Before, the sorting was not human readable. Lower-cased feed names were displayed after upper-cased feed names. Now, the sorting is human readable. The sorting is done without taking into account the name case. See #3128
2020-07-31Relaxed to allow underscore _ in URL hostnames (#3133)Gravatar Alexandre Alapetite
* Relaxed to allow underscore _ in URL hostnames #fix https://github.com/FreshRSS/FreshRSS/issues/3132 https://bugs.php.net/bug.php?id=64948 * Minor fix in favicons redirect * Minor fix in relative HREF for favicons
2020-07-23Add tag management page (#3121)Gravatar Alexis Degrugillier
The new page allows to create, delete and rename tags. See #3058
2020-07-14Add machine-readable dates in views (#3106)Gravatar Alexis Degrugillier
This will allow to make some transformations on dates when needed. See #3103 and #853
2020-07-07Hide feed credentials when adding a new feed (#3099)Gravatar Alexandre Alapetite
Avoid showing HTTP Basic Auth credentials in feed error log and in feed title (when there is no title provided)
2020-06-19Add auto-registration when using http_auth (#3003)Gravatar bpatath
* Add auto-registration when using http_auth * Document HTTP auth auto-registration * Check email variable for HTTP auth auto-registration * Auto-create HTTP users by default * Fix Context init (I will provide in another PR a better fix requiring a bit of global refactoring) * Init language Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-06-13Add error log (#3055)Gravatar Alexandre Alapetite
For https://github.com/FreshRSS/FreshRSS/issues/3054
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>
2020-05-30Fix display_categories upgrade from 1.16.0 again (#3019)Gravatar Alexandre Alapetite
* Fix display_categories upgrade from 1.16.0 again #fix https://github.com/FreshRSS/FreshRSS/issues/3017 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/3018 There were two bugs. I forgot that `ConfigurationSetter.php` is not called when reading `config.php` * Changelog 3019
2020-05-30Fix display_categories upgrade from 1.16.0 (#3018)Gravatar Alexandre Alapetite
* Fix display_categories upgrade from 1.16.0 #fix https://github.com/FreshRSS/FreshRSS/issues/3017 The property `'display_categories' => boolean,` in 1.16.0 is not properly converted to `'display_categories' => 'string',` in 1.16.1 due to a weak type comparison bug.