mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 03:15:56 +00:00
pass array to setScore
This commit is contained in:
@@ -169,7 +169,7 @@ class Article extends Handler_Protected {
|
||||
}
|
||||
|
||||
function setScore() {
|
||||
$ids = explode(",", clean($_REQUEST['id']));
|
||||
$ids = array_map("intval", clean($_REQUEST['ids'] ?? []));
|
||||
$score = (int)clean($_REQUEST['score']);
|
||||
|
||||
$ids_qmarks = arr_qmarks($ids);
|
||||
|
||||
@@ -169,7 +169,7 @@ const Headlines = {
|
||||
if (scores.length != 0) {
|
||||
scores.forEach((score) => {
|
||||
promises.push(xhr.post("backend.php",
|
||||
{op: "article", method: "setScore", id: ops.rescore[score].toString(), score: score}));
|
||||
{op: "article", method: "setScore", "ids[]": ops.rescore[score].toString(), score: score}));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user