1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 21:55:56 +00:00

fail better if requested article URL is blank

This commit is contained in:
Andrew Dolgov
2021-02-13 10:10:44 +03:00
parent d3940b6259
commit eec5871f5f
4 changed files with 27 additions and 24 deletions

View File

@@ -382,23 +382,6 @@ class RPC extends Handler_Protected {
$sth->execute(array_merge($ids, [$_SESSION['uid']]));
}
function getlinktitlebyid() {
$id = clean($_REQUEST['id']);
$sth = $this->pdo->prepare("SELECT link, title FROM ttrss_entries, ttrss_user_entries
WHERE ref_id = ? AND ref_id = id AND owner_uid = ?");
$sth->execute([$id, $_SESSION['uid']]);
if ($row = $sth->fetch()) {
$link = $row['link'];
$title = $row['title'];
echo json_encode(array("link" => $link, "title" => $title));
} else {
echo json_encode(array("error" => "ARTICLE_NOT_FOUND"));
}
}
function log() {
$msg = clean($_REQUEST['msg']);
$file = basename(clean($_REQUEST['file']));