1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-23 02:41:29 +00:00

implement assign-to-label in subtoolbar

This commit is contained in:
Andrew Dolgov
2009-01-18 09:47:34 +01:00
parent ceb30ba49d
commit b8a637f3d2
3 changed files with 89 additions and 4 deletions

View File

@@ -424,6 +424,35 @@
return;
}
if ($subop == "assignToLabel") {
$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_add_article($link, $id, $label, $_SESSION["uid"]);
}
}
print "<rpc-reply><counters>";
if ($label) {
getGlobalCounters($link);
getLabelCounters($link);
if (get_pref($link, 'ENABLE_FEED_CATS')) {
getCategoryCounters($link);
}
}
print "</counters></rpc-reply>";
return;
}
print "<rpc-reply><error>Unknown method: $subop</error></rpc-reply>";
}
?>