1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2025-01-11 10:22:40 +00:00

Make getCompactHeadlines use a whitelist instead

This commit is contained in:
J. King 2017-11-20 09:49:47 -05:00
parent 5c140aedc4
commit e729cedeca

View file

@ -1222,10 +1222,15 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
public function opGetCompactHeadlines(array $data): array {
// getCompactHeadlines supports fewer features than getHeadlines
$data['is_cat'] = false;
$data['include_nested'] = false;
$data['search'] = null;
$data['order_by'] = null;
$data = [
'feed_id' => $data['feed_id'],
'view_mode' => $data['view_mode'],
'since_id' => $data['since_id'],
'limit' => $data['limit'],
'skip' => $data['skip'],
];
$data = $this->normalizeInput($data, self::VALID_INPUT, "unix");
// fetch the list of IDs
$out = [];
foreach ($this->fetchArticles($data, Database::LIST_MINIMAL) as $row) {
$out[] = ['id' => $row['id']];