summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-26 05:13:50 +0100
committerAndrew Dolgov <[email protected]>2007-08-26 05:13:50 +0100
commitd1f0c58498dbe91ebdaa59565abc1f2c1e076ad6 (patch)
treeeff3b65db994106741a87fab6cf76492f29317ec /functions.php
parentbc0f07856012aa94eaea7c409e720d73f2fba0c3 (diff)
new feed action: clear articles
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index c321f9b4f..cf5d421c9 100644
--- a/functions.php
+++ b/functions.php
@@ -4696,4 +4696,12 @@
return $url_path;
}
+ function clear_feed_articles($link, $id) {
+ $result = db_query($link, "DELETE FROM ttrss_user_entries
+ WHERE feed_id = '$id' AND marked = false");
+
+ $result = db_query($link, "DELETE FROM ttrss_entries WHERE
+ (SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
+ }
+
?>