misc forceUpdateAllFeeds fixes

This commit is contained in:
Andrew Dolgov 2006-02-12 06:30:47 +01:00
parent 75a241b95d
commit b8a6ff3044
1 changed files with 21 additions and 18 deletions

View File

@ -705,28 +705,31 @@
if (ENABLE_UPDATE_DAEMON) { if (ENABLE_UPDATE_DAEMON) {
$result = db_query($link, "SELECT count(id) AS cid FROM if ($subop == "forceUpdateAllFeeds") {
ttrss_scheduled_updates WHERE feed_id IS NULL AND
owner_uid = " . $_SESSION["uid"]);
$cid = db_fetch_result($result, 0, "cid"); $result = db_query($link, "SELECT count(id) AS cid FROM
ttrss_scheduled_updates WHERE feed_id IS NULL AND
owner_uid = " . $_SESSION["uid"]);
print "<rpc-reply>"; $cid = db_fetch_result($result, 0, "cid");
if ($cid == 0) { # print "<rpc-reply>";
db_query($link, "INSERT INTO ttrss_scheduled_updates if ($cid == 0) {
(owner_uid, feed_id, entered) VALUES
(".$_SESSION["uid"].", NULL, NOW())");
print "<message>ScheduledOK</message>"; db_query($link, "INSERT INTO ttrss_scheduled_updates
(owner_uid, feed_id, entered) VALUES
(".$_SESSION["uid"].", NULL, NOW())");
} else { print "<!-- ScheduledOK -->";
print "<message>RequestAlreadyInQueue</message>";
} else {
print "<!-- RequestAlreadyInQueue -->";
}
# print "</rpc-reply>";
} }
print "</rpc-reply>";
} else { } else {
update_all_feeds($link, $subop == "forceUpdateAllFeeds"); update_all_feeds($link, $subop == "forceUpdateAllFeeds");
} }