aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Ofeed.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-02 14:04:43 -0800
committerzotlabs <mike@macgirvin.com>2018-01-02 14:04:43 -0800
commitada578e7e3fc86970be6d1f242f785dae14f5e30 (patch)
tree8df133a2ee4eab3230d73859d8741fe333db6f0d /Zotlabs/Module/Ofeed.php
parent3bd7133ba32d758df935a566c45515a530b35538 (diff)
downloadvolse-hubzilla-ada578e7e3fc86970be6d1f242f785dae14f5e30.tar.gz
volse-hubzilla-ada578e7e3fc86970be6d1f242f785dae14f5e30.tar.bz2
volse-hubzilla-ada578e7e3fc86970be6d1f242f785dae14f5e30.zip
issues with feed parameters
Diffstat (limited to 'Zotlabs/Module/Ofeed.php')
-rw-r--r--Zotlabs/Module/Ofeed.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Module/Ofeed.php b/Zotlabs/Module/Ofeed.php
index 58488d4af..d18a43ae5 100644
--- a/Zotlabs/Module/Ofeed.php
+++ b/Zotlabs/Module/Ofeed.php
@@ -17,12 +17,15 @@ class Ofeed extends \Zotlabs\Web\Controller {
$params['type'] = ((stristr(argv(0),'json')) ? 'json' : 'xml');
$params['pages'] = ((x($_REQUEST,'pages')) ? intval($_REQUEST['pages']) : 0);
$params['top'] = ((x($_REQUEST,'top')) ? intval($_REQUEST['top']) : 0);
- $params['start'] = ((x($params,'start')) ? intval($params['start']) : 0);
- $params['records'] = ((x($params,'records')) ? intval($params['records']) : 10);
- $params['direction'] = ((x($params,'direction')) ? dbesc($params['direction']) : 'desc');
+ $params['start'] = ((x($_REQUEST,'start')) ? intval($_REQUEST['start']) : 0);
+ $params['records'] = ((x($_REQUEST,'records')) ? intval($_REQUEST['records']) : 10);
+ $params['direction'] = ((x($_REQUEST,'direction')) ? dbesc($_REQUEST['direction']) : 'desc');
$params['cat'] = ((x($_REQUEST,'cat')) ? escape_tags($_REQUEST['cat']) : '');
$params['compat'] = ((x($_REQUEST,'compat')) ? intval($_REQUEST['compat']) : 1);
+ if(! in_array($params['direction'],['asc','desc'])) {
+ $params['direction'] = 'desc';
+ }
if(argc() > 1) {