summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-28 17:23:01 +0300
committerAndrew Dolgov <[email protected]>2009-12-28 17:23:01 +0300
commite04c18a2c29d10184417d853391ae1d2708d4f4f (patch)
tree9e94e7ce975de92b28aee75e83b9d53764ba3c93 /modules
parent15ea06910ca9b50d42d8aae96524365594f9aac3 (diff)
implement archived articles feed; bump schema
Diffstat (limited to 'modules')
-rw-r--r--modules/backend-rpc.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 686602d6f..326c669fb 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -86,6 +86,57 @@
return;
}
+ if ($subop == "delete") {
+ $ids = db_escape_string($_GET["ids"]);
+
+ $result = db_query($link, "DELETE FROM ttrss_user_entries
+ WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
+
+ print "<rpc-reply><counters>";
+ getGlobalCounters($link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
+ print "</counters></rpc-reply>";
+
+ return;
+ }
+
+ if ($subop == "unarchive") {
+ $ids = db_escape_string($_GET["ids"]);
+
+ $result = db_query($link, "UPDATE ttrss_user_entries
+ SET feed_id = orig_feed_id
+ WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
+
+ print "<rpc-reply><counters>";
+ getGlobalCounters($link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
+ print "</counters></rpc-reply>";
+
+ return;
+ }
+
+ if ($subop == "archive") {
+ $ids = db_escape_string($_GET["ids"]);
+
+ $result = db_query($link, "UPDATE ttrss_user_entries
+ SET orig_feed_id = feed_id, feed_id = NULL, marked = true
+ WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
+
+ print "<rpc-reply><counters>";
+ getGlobalCounters($link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
+ print "</counters></rpc-reply>";
+
+ return;
+ }
+
+
if ($subop == "publ") {
$pub = $_REQUEST["pub"];
$id = db_escape_string($_REQUEST["id"]);