summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-07 09:03:42 +0400
committerAndrew Dolgov <[email protected]>2013-03-07 09:03:42 +0400
commit41acdf4c11f60e0e6a0012e5d62ce82922eee994 (patch)
tree3528e2a4054e0ed82713a7262cc361393f310bf5 /include
parent123a764372fa614c2e68b641bf358ca4b39cfb6c (diff)
remove purging of inactive feeds in daemon_common (causes duplicates)
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index f1d112979..2b13f9457 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -158,38 +158,6 @@
// Send feed digests by email if needed.
send_headlines_digests($link, $debug);
- // Purge feeds with stale data OR not being updated for a while to keep DB size down
-
- if ($debug) _debug("Purging inactive feeds...");
-
- if (DB_TYPE == "pgsql") {
- $interval_qpart = "NOW() - INTERVAL '1 month'";
- } else {
- $interval_qpart = "DATE_SUB(NOW(), INTERVAL 1 MONTH)";
- }
-
- $result = db_query($link, "SELECT id, feed_url FROM ttrss_feeds WHERE
- (SELECT MAX(updated) FROM ttrss_entries, ttrss_user_entries WHERE
- ttrss_entries.id = ref_id AND
- ttrss_user_entries.feed_id = ttrss_feeds.id) < $interval_qpart OR
- last_updated < $interval_qpart");
-
- $feeds_purged = 0;
- $articles_removed = 0;
-
- while ($line = db_fetch_assoc($result)) {
- $articles_removed += purge_feed($link, $line["id"], 0, false);
-
- db_query($link, "UPDATE ttrss_feeds SET last_updated = NOW() WHERE
- id = " . $line["id"]);
-
- ++$feeds_purged;
- }
-
- if ($debug && $articles_removed > 0)
- _debug(sprintf("Purged %d feeds (%d articles).", $feeds_purged,
- $articles_removed));
-
} // function update_daemon_common
// ignore_daemon is not used