summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-29 09:54:21 +0400
committerAndrew Dolgov <[email protected]>2011-11-29 09:54:21 +0400
commit46d60592ad0829c2a3a2973f4fc327024c587fbe (patch)
treed750adad45839f79e4b65dca43c6034ee69387e5 /api
parent75b901d9293d6481886e5b4352d49ea0bcdd170d (diff)
api: implement setting article note through updateArticle
Diffstat (limited to 'api')
-rw-r--r--api/index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/index.php b/api/index.php
index 1c4c52fd9..8aa4c1907 100644
--- a/api/index.php
+++ b/api/index.php
@@ -228,6 +228,7 @@
case "updateArticle":
$article_ids = array_filter(explode(",", db_escape_string($_REQUEST["article_ids"])), is_numeric);
$mode = (int) db_escape_string($_REQUEST["mode"]);
+ $data = db_escape_string($_REQUEST["data"]);
$field_raw = (int)db_escape_string($_REQUEST["field"]);
$field = "";
@@ -243,6 +244,8 @@
case 2:
$field = "unread";
break;
+ case 3:
+ $field = "note";
};
switch ($mode) {
@@ -257,6 +260,8 @@
break;
}
+ if ($field == "note") $set_to = "'$data'";
+
if ($field && $set_to && count($article_ids) > 0) {
$article_ids = join(", ", $article_ids);