mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 21:25:55 +00:00
api, getArticle: check for article_id being present
This commit is contained in:
@@ -307,6 +307,8 @@ class API extends Handler {
|
||||
|
||||
$article_id = join(",", array_filter(explode(",", $this->dbh->escape_string($_REQUEST["article_id"])), is_numeric));
|
||||
|
||||
if ($article_id) {
|
||||
|
||||
$query = "SELECT id,title,link,content,cached_content,feed_id,comments,int_id,
|
||||
marked,unread,published,score,
|
||||
".SUBSTRING_FOR_DATE."(updated,1,16) as updated,
|
||||
@@ -354,7 +356,9 @@ class API extends Handler {
|
||||
}
|
||||
|
||||
$this->wrap(self::STATUS_OK, $articles);
|
||||
|
||||
} else {
|
||||
$this->wrap(self::STATUS_ERR, array("error" => 'INCORRECT_USAGE'));
|
||||
}
|
||||
}
|
||||
|
||||
function getConfig() {
|
||||
|
||||
Reference in New Issue
Block a user