From 5161564f3d70d1434bc6f7469217de45bb272ff8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 6 Mar 2009 13:40:59 +0300 Subject: add support for adding syndicated notes to published articles --- modules/backend-rpc.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'modules/backend-rpc.php') diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index afcd82d3f..8b22bf850 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -87,8 +87,9 @@ } if ($subop == "publ") { - $pub = $_GET["pub"]; - $id = db_escape_string($_GET["id"]); + $pub = $_REQUEST["pub"]; + $id = db_escape_string($_REQUEST["id"]); + $note = trim(strip_tags(db_escape_string($_REQUEST["note"]))); if ($pub == "1") { $pub = "true"; @@ -96,18 +97,36 @@ $pub = "false"; } + if ($note != 'undefined') { + $note_qpart = "note = '$note',"; + } + // FIXME this needs collision testing - $result = db_query($link, "UPDATE ttrss_user_entries SET published = $pub + $result = db_query($link, "UPDATE ttrss_user_entries SET + $note_qpart + published = $pub WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); - print ""; + + print ""; + + print ""; getGlobalCounters($link); getLabelCounters($link); if (get_pref($link, 'ENABLE_FEED_CATS')) { getCategoryCounters($link); } - print ""; + print ""; + + if ($note != 'undefined') { + $note_size = strlen($note); + print ""; + print ""; + print ""; + } + + print ""; return; } -- cgit v1.2.3