aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-10 19:29:00 -0800
committerredmatrix <git@macgirvin.com>2016-02-10 19:29:00 -0800
commit06a1258a9a86093770b9342442f2ada95a788cdd (patch)
treef71c386d222e7e867c603b41be77641263f4c17a /include/items.php
parentd31d3df4eafcc3e80f120fc4b23ced2e2ed4969d (diff)
downloadvolse-hubzilla-06a1258a9a86093770b9342442f2ada95a788cdd.tar.gz
volse-hubzilla-06a1258a9a86093770b9342442f2ada95a788cdd.tar.bz2
volse-hubzilla-06a1258a9a86093770b9342442f2ada95a788cdd.zip
put a sane lower time limit on content search for public feed requests
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 5361a5fde..7fed486a6 100755
--- a/include/items.php
+++ b/include/items.php
@@ -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");