only allow linking to feeds in the same category

This commit is contained in:
Andrew Dolgov 2005-12-28 20:57:25 +01:00
parent 601030890f
commit 8a53e02994

View file

@ -1540,8 +1540,16 @@
print "<select id=\"iedit_parent_feed\">"; print "<select id=\"iedit_parent_feed\">";
print "<option id=\"0\">None</option>"; 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 $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) { if (db_num_rows($tmp_result) > 0) {
print "<option disabled>--------</option>"; print "<option disabled>--------</option>";