]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_interval < 0 disables feed updates, show only 20 subscribed feeds in user...
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 29 Nov 2005 09:26:09 +0000 (10:26 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 29 Nov 2005 09:26:09 +0000 (10:26 +0100)
backend.php
functions.php

index aa2a1b3bc9dfd39c721b90e53e8d3c6a49900f6b..5a88f38aca3cd9ec09d51cd81847c62ade4f03ef 100644 (file)
                        if (strtoupper($upd_intl) == "DEFAULT")
                                $upd_intl = 0;
 
+                       if (strtoupper($upd_intl) == "DISABLED")
+                               $upd_intl = -1;
+
                        if (strtoupper($purge_intl) == "DEFAULT")
                                $purge_intl = 0;
 
                                        if ($line["update_interval"] == "0")
                                                $line["update_interval"] = "Default";
        
+                                       if ($line["update_interval"] == "-1")
+                                               $line["update_interval"] = "Disabled";
+
                                        print "<td><a href=\"javascript:editFeed($feed_id);\">" . 
                                                $line["update_interval"] . "</a></td>";
        
                print "<h1>Subscribed feeds</h1>";
 
                $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 "<ul class=\"nomarks\">";
 
                        print "<li>$feed_icon&nbsp;<a href=\"".$line["feed_url"]."\">".$line["title"]."</a></li>";
                }
 
+               if (db_num_rows($result) < $num_feeds) {
+                        // FIXME - add link to show ALL subscribed feeds here somewhere
+                       print "<li><img 
+                               class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">&nbsp;...</li>";
+               }
+               
                print "</ul>";
 
                print "</div>";
index 7a09b9d86bdc5edfdb34cd4ecb81613c32edf659..8095b314213c0f32258e812bcaf0bcb84d1c0532 100644 (file)
                        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);
 
                        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");