diff options
author | Andrew Dolgov <[email protected]> | 2007-07-20 07:01:18 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-07-20 07:01:18 +0100 |
commit | 298f3f783a7635a81b6b81b8a5dbb32e138b54ec (patch) | |
tree | 165b61c1614e074f64553afcadc93be2daadbbc1 /modules | |
parent | 58e481b47910e31aa4862275cb3e5304b3fa2ee7 (diff) |
add shortcut to open active article in new tab
Diffstat (limited to 'modules')
-rw-r--r-- | modules/backend-rpc.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index e70b75524..868d46445 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -201,6 +201,21 @@ } + if ($subop == "getArticleLink") { + + $id = db_escape_string($_GET["id"]); + + $result = db_query($link, "SELECT link FROM ttrss_entries, ttrss_user_entries + WHERE id = '$id' AND id = ref_id AND owner_uid = '".$_SESSION['uid']."'"); + + if (db_num_rows($result) == 1) { + $link = strip_tags(db_fetch_result($result, 0, "link")); + print "<rpc-reply><link>$link</link></rpc-reply>"; + } else { + print "<rpc-reply><error>Article not found</error></rpc-reply>"; + } + } + if ($subop == "setArticleTags") { $id = db_escape_string($_GET["id"]); |