1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:45:56 +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 {

View File

@@ -153,10 +153,10 @@ class Pref_System extends Handler_Administrative {
<div dojoType='dijit.layout.AccordionContainer' region='center'>
<div dojoType='dijit.layout.AccordionPane' style='padding : 0' title='<i class="material-icons">report</i> <?= __('Event Log') ?>'>
<?php
if (LOG_DESTINATION == "sql") {
if (Config::get(Config::LOG_DESTINATION) == "sql") {
$this->_log_viewer($page, $severity);
} else {
print_notice("Please set LOG_DESTINATION to 'sql' in config.php to enable database logging.");
print_notice("Please set Config::get(Config::LOG_DESTINATION) to 'sql' in config.php to enable database logging.");
}
?>
</div>

View File

@@ -86,7 +86,7 @@ class Pref_Users extends Handler_Administrative {
<?php while ($row = $sth->fetch()) { ?>
<li>
<?php
$icon_file = ICONS_URL . "/" . $row["id"] . ".ico";
$icon_file = Config::get(Config::ICONS_URL) . "/" . $row["id"] . ".ico";
$icon = file_exists($icon_file) ? $icon_file : "images/blank_icon.gif";
?>