update_interval < 0 disables feed updates, show only 20 subscribed feeds in user details

master
Andrew Dolgov 19 years ago
parent f932bc9ff3
commit a88c1f3644

@ -1208,6 +1208,9 @@
if (strtoupper($upd_intl) == "DEFAULT") if (strtoupper($upd_intl) == "DEFAULT")
$upd_intl = 0; $upd_intl = 0;
if (strtoupper($upd_intl) == "DISABLED")
$upd_intl = -1;
if (strtoupper($purge_intl) == "DEFAULT") if (strtoupper($purge_intl) == "DEFAULT")
$purge_intl = 0; $purge_intl = 0;
@ -1535,6 +1538,9 @@
if ($line["update_interval"] == "0") if ($line["update_interval"] == "0")
$line["update_interval"] = "Default"; $line["update_interval"] = "Default";
if ($line["update_interval"] == "-1")
$line["update_interval"] = "Disabled";
print "<td><a href=\"javascript:editFeed($feed_id);\">" . print "<td><a href=\"javascript:editFeed($feed_id);\">" .
$line["update_interval"] . "</a></td>"; $line["update_interval"] . "</a></td>";
@ -3021,7 +3027,7 @@
print "<h1>Subscribed feeds</h1>"; print "<h1>Subscribed feeds</h1>";
$result = db_query($link, "SELECT id,title,feed_url FROM ttrss_feeds $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 "<ul class=\"nomarks\">";
@ -3038,6 +3044,12 @@
print "<li>$feed_icon&nbsp;<a href=\"".$line["feed_url"]."\">".$line["title"]."</a></li>"; 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 "</ul>";
print "</div>"; print "</div>";

@ -170,6 +170,13 @@
return; 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); $feed = db_escape_string($feed);
error_reporting(0); error_reporting(0);

Loading…
Cancel
Save