1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-24 05:31:28 +00:00

migrate the rest into Config::

This commit is contained in:
Andrew Dolgov
2021-02-22 22:35:27 +03:00
parent 383f4ca04a
commit 211f699aa0
24 changed files with 187 additions and 208 deletions

View File

@@ -441,7 +441,7 @@ class Pref_Feeds extends Handler_Protected {
$sth->execute([$feed_id, $_SESSION['uid']]);
if ($row = $sth->fetch()) {
@unlink(ICONS_DIR . "/$feed_id.ico");
@unlink(Config::get(Config::ICONS_DIR) . "/$feed_id.ico");
$sth = $this->pdo->prepare("UPDATE ttrss_feeds SET favicon_avg_color = NULL, favicon_last_checked = '1970-01-01'
where id = ?");
@@ -479,7 +479,7 @@ class Pref_Feeds extends Handler_Protected {
$sth->execute([$feed_id, $_SESSION['uid']]);
if ($row = $sth->fetch()) {
$new_filename = ICONS_DIR . "/$feed_id.ico";
$new_filename = Config::get(Config::ICONS_DIR) . "/$feed_id.ico";
if (file_exists($new_filename)) unlink($new_filename);
@@ -1228,8 +1228,8 @@ class Pref_Feeds extends Handler_Protected {
$pdo->commit();
if (file_exists(ICONS_DIR . "/$id.ico")) {
unlink(ICONS_DIR . "/$id.ico");
if (file_exists(Config::get(Config::ICONS_DIR) . "/$id.ico")) {
unlink(Config::get(Config::ICONS_DIR) . "/$id.ico");
}
} else {