]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc forceUpdateAllFeeds fixes
authorAndrew Dolgov <fox@madoka.spb.ru>
Sun, 12 Feb 2006 05:30:47 +0000 (06:30 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sun, 12 Feb 2006 05:30:47 +0000 (06:30 +0100)
backend.php

index 7ea6f875c8b4ae075e4625b228b5f8dbf5c2ebaa..4761b8dd8fc6b371c97090936876137cf1b097f7 100644 (file)
        
                        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 "<rpc-reply>";
-
-                               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 "<rpc-reply>";
+       
+                                       if ($cid == 0) {
+       
+                                               db_query($link, "INSERT INTO ttrss_scheduled_updates
+                                                       (owner_uid, feed_id, entered) VALUES
+                                                       (".$_SESSION["uid"].", NULL, NOW())");
+                                                       
+                                               print "<!-- ScheduledOK -->";
                                                
-                                       print "<message>ScheduledOK</message>";
-                                       
-                               } else {
-                                       print "<message>RequestAlreadyInQueue</message>";
+                                       } else {
+                                               print "<!-- RequestAlreadyInQueue -->";
+                                       }
+       
+#                                      print "</rpc-reply>";
                                }
-
-                               print "</rpc-reply>";
                                
                        } else {        
                                update_all_feeds($link, $subop == "forceUpdateAllFeeds");