diff options
author | Andrew Dolgov <[email protected]> | 2013-04-02 14:41:41 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-02 14:41:41 +0400 |
commit | d719b062404f551594bbe5ee37f1eb306061c118 (patch) | |
tree | b8b0d7b3b27574a21540f2eea4680a70e0287759 /classes | |
parent | 8956b3a607be2d0a28704713d6a5d915e6c82fd3 (diff) |
rpc: move setScore to article
Diffstat (limited to 'classes')
-rw-r--r-- | classes/article.php | 11 | ||||
-rw-r--r-- | classes/rpc.php | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/classes/article.php b/classes/article.php index 79c94f59b..6e4236936 100644 --- a/classes/article.php +++ b/classes/article.php @@ -208,5 +208,16 @@ class Article extends Handler_Protected { } + function setScore() { + $ids = db_escape_string($this->link, $_REQUEST['id']); + $score = (int)db_escape_string($this->link, $_REQUEST['score']); + + db_query($this->link, "UPDATE ttrss_user_entries SET + score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]); + + print json_encode(array("id" => $id, + "score_pic" => get_score_pic($score))); + } + } diff --git a/classes/rpc.php b/classes/rpc.php index 64e09d1e7..d61b2891a 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -632,17 +632,6 @@ class RPC extends Handler_Protected { return; } - function setScore() { - $ids = db_escape_string($this->link, $_REQUEST['id']); - $score = (int)db_escape_string($this->link, $_REQUEST['score']); - - db_query($this->link, "UPDATE ttrss_user_entries SET - score = '$score' WHERE ref_id IN ($ids) AND owner_uid = " . $_SESSION["uid"]); - - print json_encode(array("id" => $id, - "score_pic" => get_score_pic($score))); - } - function setpanelmode() { $wide = (int) $_REQUEST["wide"]; |