feed editor now respects ENABLE_FEED_CATS
This commit is contained in:
parent
91ff844a86
commit
54d3ba50af
1 changed files with 32 additions and 26 deletions
58
backend.php
58
backend.php
|
@ -1273,8 +1273,10 @@
|
||||||
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
||||||
$edit_link . "</a></td>";
|
$edit_link . "</a></td>";
|
||||||
|
|
||||||
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
$edit_cat . "</a></td>";
|
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
|
||||||
|
$edit_cat . "</a></td>";
|
||||||
|
}
|
||||||
|
|
||||||
if ($line["update_interval"] == "0")
|
if ($line["update_interval"] == "0")
|
||||||
$line["update_interval"] = "Default";
|
$line["update_interval"] = "Default";
|
||||||
|
@ -1298,7 +1300,10 @@
|
||||||
|
|
||||||
print "<td>$edit_title</td>";
|
print "<td>$edit_title</td>";
|
||||||
print "<td>$edit_link</td>";
|
print "<td>$edit_link</td>";
|
||||||
print "<td>$edit_cat</td>";
|
|
||||||
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
|
print "<td>$edit_cat</td>";
|
||||||
|
}
|
||||||
|
|
||||||
if ($line["update_interval"] == "0")
|
if ($line["update_interval"] == "0")
|
||||||
$line["update_interval"] = "Default";
|
$line["update_interval"] = "Default";
|
||||||
|
@ -1320,32 +1325,33 @@
|
||||||
print "<td><input id=\"iedit_title\" value=\"$edit_title\"></td>";
|
print "<td><input id=\"iedit_title\" value=\"$edit_title\"></td>";
|
||||||
print "<td><input id=\"iedit_link\" value=\"$edit_link\"></td>";
|
print "<td><input id=\"iedit_link\" value=\"$edit_link\"></td>";
|
||||||
|
|
||||||
print "<td>";
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
|
|
||||||
print "<select id=\"iedit_fcat\">";
|
|
||||||
|
|
||||||
print "<option id=\"0\">Uncategorized</option>";
|
print "<td>";
|
||||||
|
print "<select id=\"iedit_fcat\">";
|
||||||
if (db_num_rows($result) > 0) {
|
print "<option id=\"0\">Uncategorized</option>";
|
||||||
print "<option disabled>--------</option>";
|
|
||||||
}
|
if (db_num_rows($result) > 0) {
|
||||||
|
print "<option disabled>--------</option>";
|
||||||
$tmp_result = db_query($link, "SELECT id,title FROM ttrss_feed_categories
|
|
||||||
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
|
|
||||||
|
|
||||||
while ($tmp_line = db_fetch_assoc($tmp_result)) {
|
|
||||||
if ($tmp_line["id"] == $line["cat_id"]) {
|
|
||||||
$is_selected = "selected";
|
|
||||||
} else {
|
|
||||||
$is_selected = "";
|
|
||||||
}
|
}
|
||||||
printf("<option $is_selected id='%d'>%s</option>",
|
|
||||||
$tmp_line["id"], $tmp_line["title"]);
|
$tmp_result = db_query($link, "SELECT id,title FROM ttrss_feed_categories
|
||||||
}
|
WHERE owner_uid = ".$_SESSION["uid"]." ORDER BY title");
|
||||||
|
|
||||||
|
while ($tmp_line = db_fetch_assoc($tmp_result)) {
|
||||||
|
if ($tmp_line["id"] == $line["cat_id"]) {
|
||||||
|
$is_selected = "selected";
|
||||||
|
} else {
|
||||||
|
$is_selected = "";
|
||||||
|
}
|
||||||
|
printf("<option $is_selected id='%d'>%s</option>",
|
||||||
|
$tmp_line["id"], $tmp_line["title"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</select></td>";
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
print "</select></td>";
|
}
|
||||||
|
|
||||||
print "</td>";
|
|
||||||
|
|
||||||
print "<td><input id=\"iedit_updintl\"
|
print "<td><input id=\"iedit_updintl\"
|
||||||
value=\"".$line["update_interval"]."\"></td>";
|
value=\"".$line["update_interval"]."\"></td>";
|
||||||
|
|
Loading…
Reference in a new issue