From 3c075bfd21adac9a4dde4fab6bd22886d6173d30 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 14 Aug 2019 09:49:18 +0300 Subject: DiskCache: more strict checking for input filenames, getUrl() is no longer static --- plugins/cache_starred_images/init.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/cache_starred_images') diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index 916cedd53..967569543 100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -101,7 +101,7 @@ class Cache_Starred_Images extends Plugin { $local_filename = $article_id . "-" . sha1($enc["content_url"]); if ($this->cache->exists($local_filename)) { - $enc["content_url"] = DiskCache::getUrl("starred-images/" . $local_filename); + $enc["content_url"] = $this->cache->getUrl($local_filename); } return $enc; @@ -123,7 +123,7 @@ class Cache_Starred_Images extends Plugin { $local_filename = $article_id . "-" . sha1($src); if ($this->cache->exists($local_filename)) { - $entry->setAttribute("src", DiskCache::getUrl("starred-images/" . $local_filename)); + $entry->setAttribute("src", $this->cache->getUrl($local_filename)); $entry->removeAttribute("srcset"); } } -- cgit v1.2.3