From d1f0c58498dbe91ebdaa59565abc1f2c1e076ad6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 26 Aug 2007 05:13:50 +0100 Subject: new feed action: clear articles --- functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'functions.php') 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"); + } + ?> -- cgit v1.2.3