]> git.wh0rd.org Git - tt-rss.git/commitdiff
only allow linking to feeds in the same category
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 28 Dec 2005 19:57:25 +0000 (20:57 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 28 Dec 2005 19:57:25 +0000 (20:57 +0100)
backend.php

index 9de96a1ef2005d21e40d90a9a45132785acfb93c..f159b9a8f9f24fb5095992f2bd0cde3336cd935e 100644 (file)
                        print "<select id=\"iedit_parent_feed\">";
                        print "<option id=\"0\">None</option>";
 
+                       if (get_pref($link, 'ENABLE_FEED_CATS')) {
+                               if ($cat_id) {
+                                       $cat_qpart = "AND cat_id = '$cat_id'";
+                               } else {
+                                       $cat_qpart = "AND cat_id IS NULL";
+                               }
+                       }
+
                        $tmp_result = db_query($link, "SELECT id,title FROM ttrss_feeds
-                               WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
+                               WHERE owner_uid = ".$_SESSION["uid"]." $cat_qpart ORDER BY title");
 
                                if (db_num_rows($tmp_result) > 0) {
                                        print "<option disabled>--------</option>";