diff options
| author | Andrew Dolgov <fox@bah.spb.su> | 2009-01-18 10:09:52 +0100 |
|---|---|---|
| committer | Andrew Dolgov <fox@bah.spb.su> | 2009-01-18 10:09:52 +0100 |
| commit | 933ba4ee9c7c9f2cf5bcef5598272db8295a2157 (patch) | |
| tree | 7655334b4878ac5357ef7403a65bc57f4d6da24c /modules/backend-rpc.php | |
| parent | b8a637f3d2eff88de1d2d76d9014cc0a4086d9d1 (diff) | |
assorted labels bugfixes and UI work
Diffstat (limited to 'modules/backend-rpc.php')
| -rw-r--r-- | modules/backend-rpc.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 691771f73..4b67e1b38 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -424,6 +424,25 @@ return; } + if ($subop == "removeFromLabel") { + + $ids = split(",", db_escape_string($_REQUEST["ids"])); + $label_id = db_escape_string($_REQUEST["lid"]); + + $label = label_find_caption($link, $label_id, $_SESSION["uid"]); + + if ($label) { + + foreach ($ids as $id) { + label_remove_article($link, $id, $label, $_SESSION["uid"]); + } + } + + print "<rpc-reply>OK</rpc-reply>"; + + return; + } + if ($subop == "assignToLabel") { $ids = split(",", db_escape_string($_REQUEST["ids"])); |