1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:35:56 +00:00

add headline menu entry to show article url

This commit is contained in:
Andrew Dolgov
2013-03-21 23:29:06 +04:00
parent 3a693fa76f
commit 7fc2e87e17
2 changed files with 39 additions and 0 deletions

View File

@@ -829,5 +829,20 @@ class RPC extends Handler_Protected {
}
}
function getlinkbyid() {
$id = db_escape_string($_REQUEST['id']);
$result = db_query($this->link, "SELECT link FROM ttrss_entries, ttrss_user_entries
WHERE ref_id = '$id' AND ref_id = id AND owner_uid = ". $_SESSION["uid"]);
if (db_num_rows($result) != 0) {
$link = db_fetch_result($result, 0, "link");
echo json_encode(array("link" => $link));
} else {
echo json_encode(array("error" => "ARTICLE_NOT_FOUND"));
}
}
}
?>