From 3c138a71a1749537680a23aca6d4181b5b2820f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 14 Apr 2025 15:27:58 +0300 Subject: add deprecation notice for sql_random_function() --- plugins/cache_starred_images/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/cache_starred_images/init.php') diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index cc1eef0dc..48c8df3db 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -59,7 +59,7 @@ class Cache_Starred_Images extends Plugin { site_url != '' AND ttrss_user_entries.owner_uid = ? AND plugin_data NOT LIKE '%starred_cache_images%' - ORDER BY ".Db::sql_random_function()." LIMIT 100"); + ORDER BY RANDOM() LIMIT 100"); if ($sth->execute([$this->host->get_owner_uid()])) { -- cgit v1.2.3-54-g00ecf From 945690fffcabfeaa30d89514a1e81ea847091507 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 14 Apr 2025 15:28:57 +0300 Subject: add some type hints --- plugins/cache_starred_images/init.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/cache_starred_images/init.php') diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index 48c8df3db..da56da00d 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -128,6 +128,7 @@ class Cache_Starred_Images extends Plugin { if ($article_id) { $entries = $xpath->query('(//img[@src])|(//video/source[@src])'); + /** @var DOMElement $entry */ foreach ($entries as $entry) { if ($entry->hasAttribute('src')) { $src = UrlHelper::rewrite_relative($site_url, $entry->getAttribute('src')); @@ -203,6 +204,7 @@ class Cache_Starred_Images extends Plugin { $xpath = new DOMXPath($doc); $entries = $xpath->query('(//img[@src])|(//video/source[@src])'); + /** @var DOMElement $entry */ foreach ($entries as $entry) { if ($entry->hasAttribute('src') && !str_starts_with($entry->getAttribute('src'), "data:")) { -- cgit v1.2.3-54-g00ecf