1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

allow setting article score manually

This commit is contained in:
Andrew Dolgov
2012-10-31 14:39:26 +04:00
parent 1b4d1a6b44
commit beb6ce2761
3 changed files with 39 additions and 1 deletions

View File

@@ -395,7 +395,7 @@ class Feeds extends Handler_Protected {
$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\"
onclick=\"adjustArticleScore($id, $score)\" title=\"$score $score_title\">"; */
$score_pic = "<img class='hlScorePic' src=\"$score_pic\"
$score_pic = "<img class='hlScorePic' score='$score' onclick='changeScore($id, this)' src=\"$score_pic\"
title=\"$score\">";
if ($score > 500) {

View File

@@ -763,5 +763,16 @@ class RPC extends Handler_Protected {
}
}
function setScore() {
$id = 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"]);
print json_encode(array("id" => $id,
"score_pic" => theme_image($link, get_score_pic($score))));
}
}
?>