put a sane lower time limit on content search for public feed requests

This commit is contained in:
redmatrix 2016-02-10 19:29:00 -08:00
parent d31d3df4ea
commit 06a1258a9a

View File

@ -552,6 +552,12 @@ function get_public_feed($channel, $params) {
$params['top'] = ((x($params,'top')) ? intval($params['top']) : 0);
$params['cat'] = ((x($params,'cat')) ? $params['cat'] : '');
// put a sane lower limit on feed requests if not specified
if($params['begin'] === NULL_DATE)
$params['begin'] = datetime_convert('UTC','UTC','now - 1 month');
switch($params['type']) {
case 'json':
header("Content-type: application/atom+json");