1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-20 15:41:29 +00:00

diskcache: unify naming

This commit is contained in:
Andrew Dolgov
2021-02-15 16:11:30 +03:00
parent 8e79f1717d
commit 166f2d4666
8 changed files with 44 additions and 44 deletions

View File

@@ -1281,7 +1281,7 @@ class RSSUtils {
static function cache_enclosures($enclosures, $site_url) {
$cache = new DiskCache("images");
if ($cache->isWritable()) {
if ($cache->is_writable()) {
foreach ($enclosures as $enc) {
if (preg_match("/(image|audio|video)/", $enc[1])) {
@@ -1335,7 +1335,7 @@ class RSSUtils {
} else {
Debug::log("cache_media: failed with $fetch_last_error_code: $fetch_last_error");
}
} else if ($cache->isWritable($local_filename)) {
} else if ($cache->is_writable($local_filename)) {
$cache->touch($local_filename);
}
}
@@ -1344,7 +1344,7 @@ class RSSUtils {
static function cache_media($html, $site_url) {
$cache = new DiskCache("images");
if ($html && $cache->isWritable()) {
if ($html && $cache->is_writable()) {
$doc = new DOMDocument();
if (@$doc->loadHTML($html)) {
$xpath = new DOMXPath($doc);