aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
AgeCommit message (Collapse)Author
2024-12-15New state: favorite or unread (#7088)Gravatar Alexandre Alapetite
* New state: favorite or unread https://github.com/FreshRSS/FreshRSS/discussions/7078#discussioncomment-11526292 * Experiment using this state by default * Rework state * Allow ANDS for typos * Revert change unrelated to this PR * Revert change of default state * Add option *unread_or_favorite* * Fix hide_read_feeds * i18n: it Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com> * Update app/i18n/pl/conf.php Co-authored-by: Zic <55097497+ZicPL@users.noreply.github.com> * Update app/i18n/pl/conf.php Co-authored-by: Zic <55097497+ZicPL@users.noreply.github.com> * Fix i18n * Fix auto_remove_article * Fix mark_unread_enabled --------- Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com> Co-authored-by: Zic <55097497+ZicPL@users.noreply.github.com>
2024-12-11Improved CSS filter (#7091)Gravatar Alexandre Alapetite
* Improved CSS filter Remove unwanted elements both before and after sanitizing fix https://github.com/FreshRSS/FreshRSS/issues/7084 Improved fix bug in https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35#commitcomment-150152171 * fix typing
2024-12-10OPML export/import for cssFullContentConditions (#7082)Gravatar Alexandre Alapetite
Follow-up of https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35, which should have been a PR.
2024-12-10Fix string conditionGravatar Alexandre Alapetite
Follow-up of https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35 , which should have been a PR
2024-12-10Conditional retrievalGravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6149
2024-12-10Fix regression CSS filter encoding (#7081)Gravatar Alexandre Alapetite
fix Unicode of https://github.com/FreshRSS/FreshRSS/pull/7073 Plus optimisation of XPath by keeping it into a variable.
2024-12-08Sanitize before CSS manipulation (#7073)Gravatar Alexandre Alapetite
Allows using the same CSS filters for content coming from RSS feeds and from Web scraping fix https://github.com/FreshRSS/FreshRSS/issues/7039 https://github.com/FreshRSS/FreshRSS/issues/7014#issuecomment-2508987606 https://github.com/FreshRSS/FreshRSS/pull/7037
2024-12-03Fallback to GUID if article link is empty (#7051)Gravatar Alexandre Alapetite
* Fallback to GUID is entry link is empty fix https://github.com/FreshRSS/FreshRSS/issues/7050 * FILTER_NULL_ON_FAILURE
2024-11-30Fix CSS selector for removing elements (#7037)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/7014 Case of negative filter matching the positive filter
2024-11-28Upgrade code to php 8.1 (#6748)Gravatar Luc SANCHEZ
* revert Fix code indentation Fix code Upgrade code to php 8.1 * fix remarques * code review * code review * code review * Apply suggestions from code review * code review * Fixes * Many remainging updates of array syntax * Lost case 'reading-list' * Uneeded PHPDoc --------- Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-10-14New unicity policies for feeds with bad GUIDs (#4487)Gravatar Alexandre Alapetite
New set of unicity criteria options. New tolerance heuristic: > `$invalidGuidsTolerance` (default 0.05) The maximum ratio (rounded) of invalid GUIDs to tolerate before degrading the unicity criteria. > Example for 0.05 (5% rounded): tolerate 0 invalid GUIDs for up to 9 articles, 1 for 10, 2 for 30, 3 for 50, 4 for 70, 5 for 90, 6 for 110, etc. > The default value of 5% rounded was chosen to allow 1 invalid GUID for feeds of 10 articles, which is a frequently observed amount of articles.
2024-09-14Allow SimplePie updates with composer (#4374)Gravatar Artur Weigandt
* rename lib/SimplePie to lib/CustomSimplePie * add test for autoloading SimplePie with PSR-0 * install SimplePie 1.6.0 * Add SimplePie CHANGELOG.md, ignore irrelevant files * remove unmodified custom classes * rename all customized SimplePie classes * Add autoloading for SimplePie PSR-0 and CustomSimplePie classes * let CustomSimplePie extends SimplePie, remove unchanged code * let CustomSimplePieMisc extends SimplePie\Misc, remove unchanged code * Add tests for autoloading * let CustomSimplePieContentTypeSniffer extends Sniffer, remove unchanged code * remove unchanged CustomSimplePieEnclosure class The fixed typos are commited to SimplePie See https://github.com/simplepie/simplepie/pull/722/commits/133eac158cddaf5d2ddf9d9e5f42d92f944f885d * let CustomSimplePieFile extends SimplePie\File, remove unchanged code * let CustomSimplePieParser extends SimplePie\Parser, remove unchanged code * let CustomSimplePieSanitize extends SimplePie\Sanitize, remove unchanged code * let CustomSimplePieHttpParser extends SimplePie\HTTP\Parser, remove unchanged code * Remove CustomSimplePie * Switch SimplePie repo to https://github.com/FreshRSS/simplepie.git * move to latest branch, update all SimplePie source files * Use namespaced SimplePie classes, remove SimplePie library folder * Update to latest SimplePie version with FreshRSS modifications * Bump SimplePie Tests expected to fail due to missing a backport of functionalities * Add fork-specific readme * Re-implement initial syslog SimplePie GET https://github.com/FreshRSS/FreshRSS/pull/815 Lacks https://github.com/FreshRSS/FreshRSS/pull/6061 * Closer backport of syslog SimplePie GET https://github.com/FreshRSS/FreshRSS/pull/6061 But the requests logs will be in the wrong order in case of redirections * Fixes * lib update * SimplePie include a few more files * Try with cache-hash branch * Point to newer commit * Point to newer commit * Finalise logs * Finalise * Bump SimplePie commit * Bump SimplePie commit * Readme SimplePie fork * Bump SimplePie commit * Better logging * Bump SimplePie commit * Reworked approach to work with SimplePie cache Simpler FreshRSS patches * Bump SimplePie commit https://github.com/FreshRSS/simplepie/pull/22 * Simplepie846 https://github.com/FreshRSS/simplepie/pull/23 And additional fixes * Remove log * Cherry pick relevant unmerged SimplePie PRs --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-09-14Improve CSS filter to exclude content (#6807)Gravatar Alexandre Alapetite
* Improve CSS filter to exclude content Improve https://github.com/FreshRSS/FreshRSS/pull/6786 Fix bug when changing the CSS filter and reloading article, because original content was lost. Fix similar bug with pathEntries. * Forgotten i18n * Type check
2024-09-11PHPStan booleansInConditions (#6793)Gravatar Alexandre Alapetite
* PHPStan booleansInConditions * Uniformisation
2024-09-09Apply CSS selector filter also when not using full content (#6786)Gravatar Alexandre Alapetite
Before, removing content from articles was only possible when fetching full article contents. With this PR, the same cleaning can be applied to the normal content provided by RSS feeds.
2024-09-09Fix auto-read tags (#6790)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6788
2024-09-06Regex search (#6706)Gravatar Alexandre Alapetite
* Regex search fix https://github.com/FreshRSS/FreshRSS/issues/3549 * Fix PHPStan * Fix escape * Fix ungreedy * Initial support for regex search in PostgreSQL and MySQL * Improvements, support MySQL * Fix multiline * Add support for SQLite * A few tests * Added author: and inurl: support, documentation * author example * Remove \b for now * Disable regex sanitization for now * Fix getInurlRegex * getNotInurlRegex * Quotes for inurl: * Fix test * Fix quoted tags + regex for tags https://github.com/FreshRSS/FreshRSS/issues/6761 * Fix wrong regex detection * Add MariaDB * Fix logic * Increase requirements for MySQL and MariaDB Check support for multiline mode in MySQL * Remove sanitizeRegexes() * Allow searching HTML code Allow searching for instance `/<pre>/` Fix https://github.com/FreshRSS/FreshRSS/issues/6775#issuecomment-2331769883 * Doc regex search HTML * Fix Doctype
2024-09-06Upgrade to PHP 8.1 (#6711)Gravatar Alexandre Alapetite
* Upgrade to PHP 8.1 As discussed in https://github.com/FreshRSS/FreshRSS/discussions/5474 https://www.php.net/releases/8.0/en.php https://www.php.net/releases/8.1/en.php Upgrade to available native type declarations https://php.net/language.types.declarations Upgrade to https://phpunit.de/announcements/phpunit-10.html which requires PHP 8.1+ (good timing, as version 9 was not maintained anymore) Upgrade `:oldest` Docker dev image to oldest Alpine version supporting PHP 8.1: Alpine 3.16, which includes PHP 8.1.22. * Include 6736 https://github.com/FreshRSS/FreshRSS/pull/6736
2024-09-04Fix XPath for HTML documents with broken root (#6774)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6773 The default `.//` prefix for the XPath does not to work for documents, which have content after the end of their main node
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-08-01Fix parentheses for complex `OR` boolean search expressions (#6672)Gravatar Alexandre Alapetite
* Fix OR parentheses * Pass all tests * Forgotten comment * Minor whitespace * Fix several cases envolving negation * Line length * Fix `OR NOT`
2024-07-24Extend regex for enclosure images (#6653)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/discussions/6652
2024-06-09Pass PHPStan level 9 (#6544)Gravatar Alexandre Alapetite
* More PHPStan * More, passing * 4 more files * Update to PHPStan 1.11.4 Needed for fixed bug: Consider numeric-string types after string concat https://github.com/phpstan/phpstan/releases/tag/1.11.4 * Pass PHPStan level 9 Start tracking booleansInConditions * Fix mark as read * Fix doctype * ctype_digit
2024-06-05Modernize code to php7.4 (#6043)Gravatar Luc SANCHEZ
* Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Consistency --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-06-05Empty title guid or first words (#6240)Gravatar maTh
* settings * add comments for better understanding * Update reading.phtml * overhaul the code * i18n * typo * add a constant to configure the amount of chars * fix * simplify * Update Entry.php * clean * Update Entry.php * Update app/Models/Entry.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update constants.php * Update app/Models/Entry.php --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-06-05Fix attributeBoolean (#6543)Gravatar Alexandre Alapetite
Regression from https://github.com/FreshRSS/FreshRSS/pull/5946 fix https://github.com/FreshRSS/FreshRSS/issues/6521
2024-05-25Fix HTTP GET curl options (#6492)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6491 Regression from https://github.com/FreshRSS/FreshRSS/pull/6177
2024-05-02CSS selector trim (#6428)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/pull/6426#issuecomment-2091159868
2024-05-02Fix CSS selector encoding (#6426)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6229 fix https://github.com/FreshRSS/FreshRSS/issues/6266#issuecomment-2090432818
2024-04-26Fix updated entry filters (#6334)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6331
2024-04-08Allow multiple authors on enclosures (#6272)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5066
2024-03-10Refactor some cURL options and use CURLOPT_USERPWD (#6177)Gravatar Alexandre Alapetite
* Refactor some cURL options and use CURLOPT_USERPWD fix https://github.com/FreshRSS/FreshRSS/issues/6176 * Fixes
2024-02-26New feature: shareable user query (#6052)Gravatar Alexandre Alapetite
* New feature: shareable user query Share the output of a user query by RSS / HTML / OPML with other people through unique URLs. Replaces the global admin token, which was the only option (but unsafe) to share RSS outputs with other people. Also add a new HTML output for people without an RSS reader. fix https://github.com/FreshRSS/FreshRSS/issues/3066#issuecomment-648977890 fix https://github.com/FreshRSS/FreshRSS/issues/3178#issuecomment-769435504 * Remove unused method * Fix token saving * Implement HTML view * Update i18n for master token * Revert i18n get_favorite * Fix missing i18n for user queries from before this PR * Remove irrelevant tests * Add link to RSS version * Fix getGet * Fix getState * Fix getSearch * Alternative getSearch * Default getOrder * Explicit default state * Fix test * Add OPML sharing * Remove many redundant SQL queries from original implementation of user queries * Fix article tags * Use default user settings * Prepare public search * Fixes * Allow user search on article tags * Implement user search * Revert filter bug * Revert wrong SQL left outer join change * Implement checkboxes * Safe check of OPML * Fix label * Remove RSS button to favour new sharing method That sharing button was using a global admin token * First version of HTTP 304 * Disallow some recusrivity fix https://github.com/FreshRSS/FreshRSS/issues/6086 * Draft of nav * Minor httpConditional * Add support for offset for pagination * Fix offset pagination * Fix explicit order ASC * Add documentation * Help links i18n * Note about deprecated master token * Typo * Doc about format
2024-02-26RSS thumbnails (#5972)Gravatar Alexandre Alapetite
* Added addtional media:content for thumbnails * Fix whitespace * More attributes for enclosures * Fix variable * Fix variable * No duplicates --------- Co-authored-by: root <root@ha-server.lan>
2024-01-15PHPStan prepare exceptions (#6037)Gravatar Alexandre Alapetite
Take advantage of https://phpstan.org/blog/bring-your-exceptions-under-control Minimum changes to pass `tooWideThrowType` and `implicitThrows`. Revert some mistakes from: https://github.com/FreshRSS/FreshRSS/pull/5504 Preparation needed before new PRs of the same type: https://github.com/FreshRSS/FreshRSS/pull/5962 Fix several wrong PHPDocs and catches: > Method ... has ...Exception in PHPDoc @throws tag but it's not thrown. > Dead catch - ...Exception is never thrown in the try block.
2024-01-03Auto-label (#5954)Gravatar Alexandre Alapetite
Add labels automatically to incoming articles fix https://github.com/FreshRSS/FreshRSS/issues/2380 fix https://github.com/FreshRSS/FreshRSS/issues/2420 fix https://github.com/FreshRSS/FreshRSS/issues/3279 fix https://github.com/FreshRSS/FreshRSS/discussions/4947 fix https://github.com/FreshRSS/FreshRSS/issues/5728 fix https://github.com/FreshRSS/FreshRSS/issues/5599
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-18Fix PHP 7 compatibility strict_types (#5893)Gravatar Alexandre Alapetite
* Fix PHP 7 compatibility https://github.com/FreshRSS/FreshRSS/discussions/5892 * Multiple PHP 7 fixes * PHPStan
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-11-13Fix newlines not always displaying properly in description (#5859)Gravatar FireFingers21
* Fix newlines not displaying properly * Add name to credits * Restore enclosure-description class Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/Models/Entry.php XHTML --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-01Add support for enclosures thumbnail (#5806)Gravatar Alexandre Alapetite
* Add support for enclosures thumbnail fix https://github.com/FreshRSS/FreshRSS/issues/5170 * Changelog
2023-10-30Require PHP 7.4+ (#5720)Gravatar Alexandre Alapetite
* Require PHP 7.4+ https://github.com/FreshRSS/FreshRSS/discussions/5474 * Update Docker oldest Alpine 3.13 with PHP 7.4.26 * Add missing packets to Docker oldest * Update to typed properties https://php.net/migration74.new-features#migration74.new-features.core.typed-properties * More types
2023-10-26Fix searching thumbnails (#5750)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5749
2023-09-04Fix JSON export/import (#5626)Gravatar Alexandre Alapetite
* Fix import with empty content fix https://github.com/FreshRSS/FreshRSS/issues/5622 Cherry picks on https://github.com/FreshRSS/FreshRSS/pull/5584 * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix bug with many labels * Better typing * Comments
2023-08-13Fix hash of articles with loadCompleteContent (#5576)Gravatar Alexandre Alapetite
* Fix hash of articles with loadCompleteContent The detection of modified articles was wrong for feeds using loadCompleteContent. Indeed, the hash is supposed to computed on the content provided by the server of the RSS feed, excluding further modifications. Furthermore, read hash from database instead of recomputing it all the time. Slightly related to https://github.com/FreshRSS/FreshRSS/pull/5574 * Explicit SQL alias * PHPDocs
2023-07-19Fix enclosures in RSS output (#5540)Gravatar Alexandre Alapetite
* Fix enclosures in RSS output fix https://github.com/FreshRSS/FreshRSS/issues/5539 * another iterable * Forgotten iterable
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-07-05New extension hook entry_auto_read (#5505)Gravatar Alexandre Alapetite
* New extension hook entry_auto_read For extensions to be notified of articles being automatically marked as read for various reasons * Documentation + entry_auto_unread
2023-05-22Avoid falsy guid (#5412)Gravatar Alexandre Alapetite
Whitespace strings, empty strings, 0 are all problematic when working with GUIDs. so avoid them.