From e4f4b46f9d5d42dc53c4e2c5489da31a8ce10c26 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Aug 2007 13:45:30 +0100 Subject: published feeds work --- modules/backend-rpc.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'modules/backend-rpc.php') diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 3ca471377..1e757ca72 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -69,6 +69,22 @@ WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); } + if ($subop == "publ") { + $pub = $_GET["pub"]; + $id = db_escape_string($_GET["id"]); + + if ($pub == "1") { + $mark = "true"; + } else { + $pub = "false"; + } + + // FIXME this needs collision testing + + $result = db_query($link, "UPDATE ttrss_user_entries SET published = $pub + WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); + } + if ($subop == "updateFeed") { $feed_id = db_escape_string($_GET["feed"]); @@ -179,6 +195,21 @@ print ""; } + if ($subop == "publishSelected") { + + $ids = split(",", db_escape_string($_GET["ids"])); + $cmode = sprintf("%d", $_GET["cmode"]); + + publishArticlesById($link, $ids, $cmode); + + print ""; + print ""; + getAllCounters($link); + print ""; + print_runtime_info($link); + print ""; + } + if ($subop == "sanityCheck") { print ""; if (sanity_check($link)) { -- cgit v1.2.3