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:
@@ -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>";
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user