diff options
author | zotlabs <mike@macgirvin.com> | 2018-01-02 14:04:43 -0800 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-01-07 20:57:35 +0100 |
commit | 2f5990962c9f74d354239aea0153700565155232 (patch) | |
tree | 76316ca11c914e54d42dd62259a7a9b7c76376ef /Zotlabs/Module/Ofeed.php | |
parent | 81ae0fa252de5c27aa9fbb8f72b5e7d5460bd6fa (diff) | |
download | volse-hubzilla-2f5990962c9f74d354239aea0153700565155232.tar.gz volse-hubzilla-2f5990962c9f74d354239aea0153700565155232.tar.bz2 volse-hubzilla-2f5990962c9f74d354239aea0153700565155232.zip |
issues with feed parameters
Diffstat (limited to 'Zotlabs/Module/Ofeed.php')
-rw-r--r-- | Zotlabs/Module/Ofeed.php | 9 |
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) { |