1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 20:55:55 +00:00

allow batch setting of article scores

This commit is contained in:
Andrew Dolgov
2012-10-31 15:17:49 +04:00
parent beb6ce2761
commit 29064218d0
3 changed files with 50 additions and 2 deletions

View File

@@ -764,11 +764,11 @@ class RPC extends Handler_Protected {
}
function setScore() {
$id = db_escape_string($_REQUEST['id']);
$ids = db_escape_string($_REQUEST['id']);
$score = (int)db_escape_string($_REQUEST['score']);
db_query($this->link, "UPDATE ttrss_user_entries SET
score = '$score' WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]);
print json_encode(array("id" => $id,
"score_pic" => theme_image($link, get_score_pic($score))));