1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-16 00:25:56 +00:00

add tweet button to digest, misc digest fixes; rework article tweeting to use ajax loading of needed info

This commit is contained in:
Andrew Dolgov
2010-11-25 12:58:29 +03:00
parent 411fe209d6
commit ba7e88e5a5
7 changed files with 96 additions and 48 deletions

View File

@@ -982,6 +982,26 @@
return;
}
if ($subop == "getTweetInfo") {
header("Content-Type: text/html");
$id = db_escape_string($_REQUEST['id']);
$result = db_query($link, "SELECT title, link
FROM ttrss_entries, ttrss_user_entries
WHERE id = '$id' AND ref_id = id AND owner_uid = " .$_SESSION['uid']);
if (db_num_rows($result) != 0) {
$title = truncate_string(strip_tags(db_fetch_result($result, 0, 'title')),
100, '...');
$article_link = db_fetch_result($result, 0, 'link');
}
print json_encode(array("title" => $title, "link" => $article_link,
"id" => $id));
return;
}
print "<rpc-reply><error>Unknown method: $subop</error></rpc-reply>";
}
?>