From a88c1f36443c5d761d4224df5b887d6b558431fe Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 29 Nov 2005 10:26:09 +0100 Subject: [PATCH] update_interval < 0 disables feed updates, show only 20 subscribed feeds in user details --- backend.php | 14 +++++++++++++- functions.php | 9 ++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/backend.php b/backend.php index aa2a1b3b..5a88f38a 100644 --- a/backend.php +++ b/backend.php @@ -1208,6 +1208,9 @@ if (strtoupper($upd_intl) == "DEFAULT") $upd_intl = 0; + if (strtoupper($upd_intl) == "DISABLED") + $upd_intl = -1; + if (strtoupper($purge_intl) == "DEFAULT") $purge_intl = 0; @@ -1535,6 +1538,9 @@ if ($line["update_interval"] == "0") $line["update_interval"] = "Default"; + if ($line["update_interval"] == "-1") + $line["update_interval"] = "Disabled"; + print "" . $line["update_interval"] . ""; @@ -3021,7 +3027,7 @@ print "

Subscribed feeds

"; $result = db_query($link, "SELECT id,title,feed_url FROM ttrss_feeds - WHERE owner_uid = '$uid' ORDER BY title"); + WHERE owner_uid = '$uid' ORDER BY title LIMIT 20"); print ""; print ""; diff --git a/functions.php b/functions.php index 7a09b9d8..8095b314 100644 --- a/functions.php +++ b/functions.php @@ -170,6 +170,13 @@ return; } + $result = db_query($link, "SELECT update_interval + FROM ttrss_feeds WHERE id = '$feed'"); + + $update_interval = db_fetch_result($result, 0, "update_interval"); + + if ($update_interval < 0) { return; } + $feed = db_escape_string($feed); error_reporting(0); @@ -183,7 +190,7 @@ db_query($link, "BEGIN"); - $result = db_query($link, "SELECT title,icon_url,site_url,owner_uid + $result = db_query($link, "SELECT title,icon_url,site_url,owner_uid FROM ttrss_feeds WHERE id = '$feed'"); $registered_title = db_fetch_result($result, 0, "title"); -- 2.39.5