From b8a6ff3044764eeb631453da51555e0a578d68fb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 12 Feb 2006 06:30:47 +0100 Subject: misc forceUpdateAllFeeds fixes --- backend.php | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/backend.php b/backend.php index 7ea6f875c..4761b8dd8 100644 --- a/backend.php +++ b/backend.php @@ -705,27 +705,30 @@ if (ENABLE_UPDATE_DAEMON) { - $result = db_query($link, "SELECT count(id) AS cid FROM - ttrss_scheduled_updates WHERE feed_id IS NULL AND - owner_uid = " . $_SESSION["uid"]); - - $cid = db_fetch_result($result, 0, "cid"); - - print ""; - - if ($cid == 0) { + if ($subop == "forceUpdateAllFeeds") { - db_query($link, "INSERT INTO ttrss_scheduled_updates - (owner_uid, feed_id, entered) VALUES - (".$_SESSION["uid"].", NULL, NOW())"); + $result = db_query($link, "SELECT count(id) AS cid FROM + ttrss_scheduled_updates WHERE feed_id IS NULL AND + owner_uid = " . $_SESSION["uid"]); + + $cid = db_fetch_result($result, 0, "cid"); + +# print ""; + + if ($cid == 0) { + + db_query($link, "INSERT INTO ttrss_scheduled_updates + (owner_uid, feed_id, entered) VALUES + (".$_SESSION["uid"].", NULL, NOW())"); + + print ""; - print "ScheduledOK"; - - } else { - print "RequestAlreadyInQueue"; + } else { + print ""; + } + +# print ""; } - - print ""; } else { update_all_feeds($link, $subop == "forceUpdateAllFeeds"); -- cgit v1.2.3