]> git.wh0rd.org - tt-rss.git/blobdiff - modules/backend-rpc.php
assorted labels bugfixes and UI work
[tt-rss.git] / modules / backend-rpc.php
index 691771f736ccb2665c3d0e90333ff6a5d1095745..4b67e1b38bef6e85dc62c1a0ea9ef5e7c6ed906f 100644 (file)
                        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"]));