Commit Graph

201 Commits

Author SHA1 Message Date
Andrew Dolgov 03e956132d
switch to html2text() instead of strip_tags() when preparing FTS index 2023-10-21 10:51:24 +03:00
Andrew Dolgov d3fadc0bd0
stop calling spans scopes 2023-10-20 22:39:41 +03:00
Andrew Dolgov cdd7ad020e
jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
Andrew Dolgov f489f620d0
phpstan fix 2023-09-18 18:52:22 +03:00
Andrew Dolgov dd6ac57a07
feed debugger: add content regexp matches to filter debug output 2023-09-18 11:45:51 +03:00
Andrew Dolgov 1d788eddf8
* logger: add optional HTML output
* feed debugger: add checkbox to dump feed XML
2023-08-02 09:10:05 +03:00
Andrew Dolgov 1e90feef0e
fix 881f8805bd behaving improperly 2023-04-13 06:20:04 +03:00
Andrew Dolgov fd5e0f98c4
even more tracing 2023-04-09 22:31:42 +03:00
Andrew Dolgov 881f8805bd
filters: allow matching on tags if there are no tags 2023-04-06 20:25:24 +03:00
wn_ fd55e492c3 Handle fetch issues in 'RSSUtils::update_basic_info'. 2023-02-17 12:10:51 +00:00
wn_ 1646aba944 Minor tweak to favicon avg color debug log message. 2023-02-03 01:30:35 +00:00
wn_ b28d339bf2 Don't set 'favicon_avg_color' on feed obj unless it's valid. 2023-02-03 01:28:24 +00:00
wn_ f484988967 Fix logging favicon-related bools in 'RSSUtils::update_rss_feed()'. 2023-02-03 01:17:53 +00:00
wn_ 380624a484 Persist failure to detect favicon average color.
Previously, an empty string returned by '\Colors\calculate_avg_color()' would be set as the 'favicon_avg_color' value, resulting in always reattempting average color calculation.
2023-02-03 01:02:42 +00:00
wn_ f0f7a5f958 Ensure custom favicon color detection happens. 2023-02-03 00:45:04 +00:00
Andrew Dolgov d373b7b452
* bring back cache-busting for feed icons based on timestamp
* DiskCache: use singleton pattern to create less cache object instances
 * DiskCache: implement ETag
2022-12-19 21:36:50 +03:00
Andrew Dolgov 824addbc9d
fix cleanup_feed_icons unlinking nonexistant files, limit it to actual feed icons 2022-12-02 07:34:51 +03:00
Andrew Dolgov 3212c51ce8
migrate favicons directly to new cache 2022-11-24 23:43:46 +03:00
Andrew Dolgov a30b9bb649
rework favicon storage to use DiskCache 2022-11-24 23:31:33 +03:00
Andrew Dolgov be6bc72a74
DiskCache: tweak how expiration is invoked 2022-11-24 18:49:36 +03:00
Andrew Dolgov 3180b35807
deprecate DiskCache->touch() 2022-11-24 08:16:56 +03:00
Andrew Dolgov 9732d8fc9f
update_rss_feed: use DiskCache to store feed data 2022-11-23 22:09:04 +03:00
wn_ 3487c922b3 Replace use of 'array_merge' with the spread operator and 'array_push' in various places.
This isn't supported for arrays with string keys until PHP 8.1.

https://wiki.php.net/rfc/spread_operator_for_array
2022-08-12 17:58:38 +00:00
wn_ a63c949a55 Use arrow functions in some places. 2022-08-12 14:41:21 +00:00
Andrew Dolgov 26c67dba77
update phpstan to 1.8.2 2022-07-31 13:55:09 +03:00
Andrew Dolgov 5c70d26b7e
some very minor php8.1 warnings fixed 2022-07-13 07:08:31 +03:00
Andrew Dolgov 2975c7297b
throttle updates if received HTTP 429 (Too Many Requests) 2022-06-09 09:06:52 +03:00
Andrew Dolgov 5adedcd3d0 fix custom-set site URLs never used while updating feeds 2022-05-29 08:02:12 +03:00
Andrew Dolgov b0059d3f88 when determining feed-specific favicon, instead of using first match or generic fallback, go through entire list of determined favicon URLs 2022-05-28 22:27:59 +03:00
Andrew Dolgov 74a247fc5c rewrite_relative: whitelist specific schemes for URLs with 'known' content-types i.e. specified for enclosures 2022-02-17 22:38:38 +03:00
Felix Eckhofer cc30198b3d
Replace deprecated `strftime` 2022-02-03 16:13:01 +01:00
Andrew Dolgov c57ebf2c10 fix filter last_triggered not updating 2022-01-25 22:33:13 +03:00
Richard Tollerton aaccf89501 update_rss_feed: juxtapose pdo and ORM commit on timestamp update
If for whatever reason $pdo holds a DDL lock on ttrss_entries, it could
block ORM's save, leading to a deadlock. To work around this, call
$pdo->commit() before ORM::for_table()->save().
2022-01-13 23:39:49 -06:00
Andrew Dolgov 7aeaa1b039 rssutils: rewrite several invocations of (deprecated) rewrite_relative_url() to UrlHelper::rewrite_relative() 2021-12-20 08:03:30 +03:00
Andrew Dolgov 40b2356be2 filters:
* add filter action to ignore feed-provided tags
 * simplify handling of various filter-provided tags
 * bump schema to 146
2021-12-20 07:56:16 +03:00
Andrew Dolgov aaebe55456 Revert "replace strftime with date"
This reverts commit 72e21f89ce.
2021-12-01 13:37:25 +03:00
David Edler 72e21f89ce replace strftime with date 2021-11-30 22:07:11 +01:00
wn_ 2d830c6281 Minor correction to RSSUtils::cache_enclosures() $enclosures param type.
All FeedEnclosure values are currently strings, even though the numeric things get converted to int before getting inserted in 'ttrss_enclosures'.
2021-11-17 20:45:41 +00:00
wn_ 78acf18b70 Address PHPStan warnings in FeedItem classes. 2021-11-15 02:40:45 +00:00
wn_ 3f8aaffd34 Address PHPStan warnings in 'classes/rssutils.php'.
This also includes a minor tweak in 'update.php' to account for 'getopt()' potentially returning false (indicating failure).
2021-11-11 18:53:52 +00:00
Andrew Dolgov 9e8d69739f add two helper account access levels:
- read only - can't subscribe to more feeds, feed updates are skipped
 - disabled - can't login
define used access levels as UserHelper constants and refactor code to
use them instead of hardcoded numbers
2021-11-10 20:44:51 +03:00
Philip Klempin 14d57d9a14 Rewrite feed entry link as href content 2021-06-19 14:36:04 +02:00
Andrew Dolgov eadaaebd58 functions_enabled: trim spaces from disable_functions php ini setting 2021-04-12 11:55:19 +03:00
wn_ 401b22666d Switch 'RSSUtils::update_basic_info' to ORM 2021-03-17 01:51:32 +00:00
Andrew Dolgov dd9d017f7d add another coalesce for rule inverse 2021-03-09 13:42:28 +03:00
Andrew Dolgov 9b321be270 get_article_filters: set coalesce values for inverse and match_any_rule 2021-03-09 09:31:52 +03:00
Andrew Dolgov 270f0c3132 general cleanup, set some type hints 2021-03-06 15:19:31 +03:00
Andrew Dolgov 63651bd91d fix some leftover variables 2021-03-06 15:05:49 +03:00
Andrew Dolgov e5469479c1 * don't try to update custom set feed favicons
* cleanup update_rss_feed() a bit, use ORM
2021-03-06 11:17:15 +03:00
Andrew Dolgov e8e6329040 rename unfairly prefixed get_enclosures() in feeditem 2021-03-05 09:35:24 +03:00