diff --git a/backend.php b/backend.php
index 958ca26f6..06563e689 100644
--- a/backend.php
+++ b/backend.php
@@ -136,7 +136,7 @@
Tiny Tiny RSS : Feedlist
";
- if (USE_COMPACT_STYLESHEET) {
+ if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "";
} else {
@@ -166,7 +166,7 @@
printFeedEntry(-1, $class, "Starred articles", $num_starred,
"images/mark_set.png");
- if (ENABLE_LABELS) {
+ if (get_pref($link, 'ENABLE_LABELS')) {
$result = db_query($link, "SELECT id,sql_exp,description FROM
ttrss_labels ORDER by description");
@@ -494,7 +494,7 @@
Tiny Tiny RSS : Feed $feed
";
- if (USE_COMPACT_STYLESHEET) {
+ if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "";
@@ -845,9 +845,11 @@
foreach ($ids as $id) {
db_query($link, "DELETE FROM ttrss_feeds WHERE id = '$id'");
+
+ $icons_dir = get_pref($link, 'ICONS_DIR');
- if (file_exists(ICONS_DIR . "/$id.ico")) {
- unlink(ICONS_DIR . "/$id.ico");
+ if (file_exists($icons_dir . "/$id.ico")) {
+ unlink($icons_dir . "/$id.ico");
}
}
}
@@ -930,11 +932,11 @@
print "";
- $icon_file = ICONS_DIR . "/$feed_id.ico";
+ $icon_file = get_pref($link, 'ICONS_DIR') . "/$feed_id.ico";
if (file_exists($icon_file) && filesize($icon_file) > 0) {
$feed_icon = "
";
+ src=\"" . get_pref($link, 'ICONS_URL') . "/$feed_id.ico\">";
} else {
$feed_icon = " ";
}
@@ -1032,7 +1034,7 @@
";
- if (ENABLE_PREFS_CATCHUP_UNCATCHUP) {
+ if (get_pref($link, 'ENABLE_PREFS_CATCHUP_UNCATCHUP')) {
print "
diff --git a/functions.php b/functions.php
index d8e95594b..b9392d818 100644
--- a/functions.php
+++ b/functions.php
@@ -32,7 +32,7 @@
function update_all_feeds($link, $fetch) {
- if (get_pref($link, 'WEB_DEMO_MODE')) return;
+ if (WEB_DEMO_MODE) return;
if (get_pref($link, 'DAEMON_REFRESH_ONLY')) {
if (!$_GET["daemon"]) {
@@ -104,7 +104,7 @@
function update_rss_feed($link, $feed_url, $feed) {
- if (get_pref($link, 'WEB_DEMO_MODE')) return;
+ if (WEB_DEMO_MODE) return;
$feed = db_escape_string($feed);
diff --git a/opml.php b/opml.php
index 89f9a9461..d5eb0e0e5 100644
--- a/opml.php
+++ b/opml.php
@@ -95,7 +95,7 @@
Importing OPML...
";
- if (get_pref($link, 'WEB_DEMO_MODE')) {
+ if (WEB_DEMO_MODE) {
print "OPML import is disabled in demo-mode.";
print "
Return to preferences