aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Feed.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-02 14:04:43 -0800
committerMario <mario@mariovavti.com>2018-01-07 20:57:35 +0100
commit2f5990962c9f74d354239aea0153700565155232 (patch)
tree76316ca11c914e54d42dd62259a7a9b7c76376ef /Zotlabs/Module/Feed.php
parent81ae0fa252de5c27aa9fbb8f72b5e7d5460bd6fa (diff)
downloadvolse-hubzilla-2f5990962c9f74d354239aea0153700565155232.tar.gz
volse-hubzilla-2f5990962c9f74d354239aea0153700565155232.tar.bz2
volse-hubzilla-2f5990962c9f74d354239aea0153700565155232.zip
issues with feed parameters
Diffstat (limited to 'Zotlabs/Module/Feed.php')
-rw-r--r--Zotlabs/Module/Feed.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Module/Feed.php b/Zotlabs/Module/Feed.php
index 06637b6d2..36869abbe 100644
--- a/Zotlabs/Module/Feed.php
+++ b/Zotlabs/Module/Feed.php
@@ -16,12 +16,15 @@ class Feed 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']) : 40);
- $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']) : 40);
+ $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']) : 0);
+ if(! in_array($params['direction'],['asc','desc'])) {
+ $params['direction'] = 'desc';
+ }
if(argc() > 1) {