}
}
+ 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"));
+ }
+ }
+
}
?>
openArticleInNewWindow(this.getParent().callerRowId);
}}));
+ menu.addChild(new dijit.MenuItem({
+ label: __("Display article URL"),
+ onClick: function(event) {
+ displayArticleUrl(this.getParent().callerRowId);
+ }}));
+
menu.addChild(new dijit.MenuSeparator());
menu.addChild(new dijit.MenuItem({
exception_error("changeScore", e);
}
}
+
+function displayArticleUrl(id) {
+ try {
+ var query = "op=rpc&method=getlinkbyid&id=" + param_escape(id);
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ var reply = JSON.parse(transport.responseText);
+
+ if (reply && reply.link) {
+ prompt(__("Article URL:"), reply.link);
+ }
+ } });
+ } catch (e) {
+ exception_error("changeScore", e);
+ }
+}