]> git.wh0rd.org Git - tt-rss.git/commitdiff
ugly hack to selectively disable feed purging
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 16 Nov 2005 09:47:22 +0000 (10:47 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 16 Nov 2005 09:47:22 +0000 (10:47 +0100)
backend.php
functions.php
prefs.js

index 7781828a758c431fd0870d566c221cc17c811c0d..c0b20b1db61bf6bbfa7641506c829c2657615d35 100644 (file)
                        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',
                                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>";
 
                                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 {
index 4ab9ac7dffdc96b8cf96ba71f58601e25e2c0c90..7d603e9cbcfd38bc034407628db5dd95f1a1af52 100644 (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
index 5c6f7a7f60faa19694a738f3a7bc90e1ea6f07bc..b9973fd2e6925c7cc3ad8b4ed2e8bcc4d12c805f 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -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.");