diff options
author | Andrew Dolgov <[email protected]> | 2005-12-29 18:46:11 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-12-29 18:46:11 +0100 |
commit | 3b0027a4be16eb2d504b0ca56affbd1d86491ec8 (patch) | |
tree | 295e77bbca7edf66961f32a622a1ba43cced2fa1 | |
parent | d10fabe4013c334b24afa0c6a2ea71e9db2c660b (diff) |
disable linking for feeds already linked to
-rw-r--r-- | backend.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/backend.php b/backend.php index 467d1af0e..067995b86 100644 --- a/backend.php +++ b/backend.php @@ -1632,9 +1632,20 @@ $row_class = toggleEvenOdd($row_class); print "<tr class='$row_class'><td>Link to:</td>"; + $tmp_result = db_query($link, "SELECT COUNT(id) AS count + FROM ttrss_feeds WHERE parent_feed = '$feed_id'"); + + $linked_count = db_fetch_result($tmp_result, 0, "count"); + + $parent_feed = db_fetch_result($result, 0, "parent_feed"); - - print "<select id=\"iedit_parent_feed\">"; + + if ($linked_count > 0) { + $disabled = "disabled"; + } + + print "<select $disabled id=\"iedit_parent_feed\">"; + print "<option id=\"0\">Not linked</option>"; if (get_pref($link, 'ENABLE_FEED_CATS')) { |