api, getArticle: check for article_id being present

This commit is contained in:
Andrew Dolgov 2013-05-15 22:29:31 +04:00
parent b79da01999
commit 6f81395d73
1 changed files with 42 additions and 38 deletions

View File

@ -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() {