api: implement setting article note through updateArticle
This commit is contained in:
parent
75b901d929
commit
46d60592ad
|
@ -228,6 +228,7 @@
|
||||||
case "updateArticle":
|
case "updateArticle":
|
||||||
$article_ids = array_filter(explode(",", db_escape_string($_REQUEST["article_ids"])), is_numeric);
|
$article_ids = array_filter(explode(",", db_escape_string($_REQUEST["article_ids"])), is_numeric);
|
||||||
$mode = (int) db_escape_string($_REQUEST["mode"]);
|
$mode = (int) db_escape_string($_REQUEST["mode"]);
|
||||||
|
$data = db_escape_string($_REQUEST["data"]);
|
||||||
$field_raw = (int)db_escape_string($_REQUEST["field"]);
|
$field_raw = (int)db_escape_string($_REQUEST["field"]);
|
||||||
|
|
||||||
$field = "";
|
$field = "";
|
||||||
|
@ -243,6 +244,8 @@
|
||||||
case 2:
|
case 2:
|
||||||
$field = "unread";
|
$field = "unread";
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
$field = "note";
|
||||||
};
|
};
|
||||||
|
|
||||||
switch ($mode) {
|
switch ($mode) {
|
||||||
|
@ -257,6 +260,8 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($field == "note") $set_to = "'$data'";
|
||||||
|
|
||||||
if ($field && $set_to && count($article_ids) > 0) {
|
if ($field && $set_to && count($article_ids) > 0) {
|
||||||
|
|
||||||
$article_ids = join(", ", $article_ids);
|
$article_ids = join(", ", $article_ids);
|
||||||
|
|
Loading…
Reference in New Issue