ugly hack to selectively disable feed purging

This commit is contained in:
Andrew Dolgov 2005-11-16 10:47:22 +01:00
parent 12b84c6d0a
commit 140aae812a
3 changed files with 12 additions and 3 deletions

View File

@ -825,6 +825,9 @@
if (strtoupper($purge_intl) == "DEFAULT")
$purge_intl = 0;
if (strtoupper($purge_intl) == "DISABLED")
$purge_intl = -1;
$result = db_query($link, "UPDATE ttrss_feeds SET
title = '$feed_title', feed_url = '$feed_link',
update_interval = '$upd_intl',
@ -958,6 +961,9 @@
if ($line["purge_interval"] == "0")
$line["purge_interval"] = "Default";
if ($line["purge_interval"] < 0)
$line["purge_interval"] = "Disabled";
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
$line["purge_interval"] . "</a></td>";
@ -977,6 +983,9 @@
if ($line["purge_interval"] == "0")
$line["purge_interval"] = "Default";
if ($line["purge_interval"] < 0)
$line["purge_interval"] = "Disabled";
print "<td>" . $line["purge_interval"] . "</td>";
} else {

View File

@ -14,7 +14,7 @@
if ($purge_interval == 0) $purge_interval = PURGE_OLD_DAYS;
if ($purge_interval != 0) {
if ($purge_interval > 0) {
if (DB_TYPE == "pgsql") {
db_query($link, "DELETE FROM ttrss_entries WHERE

View File

@ -466,7 +466,7 @@ function feedEditSave() {
// notify("Saving feed.");
if (upd_intl < 0) {
/* if (upd_intl < 0) {
notify("Update interval must be &gt;= 0 (0 = default)");
return;
}
@ -474,7 +474,7 @@ function feedEditSave() {
if (purge_intl < 0) {
notify("Purge days must be &gt;= 0 (0 = default)");
return;
}
} */
if (link.length == 0) {
notify("Feed link cannot be blank.");