aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-21 21:19:18 -0700
committerzotlabs <mike@macgirvin.com>2018-03-21 21:19:18 -0700
commit1514b0f4e5c053df60b8873b5411c70be727d227 (patch)
tree6b4824c72ef04df34e147e862d418d8100f26b8f /Zotlabs/Module
parentdc066d4c9b84267bd551ecb122cf3708b6f1472b (diff)
downloadvolse-hubzilla-1514b0f4e5c053df60b8873b5411c70be727d227.tar.gz
volse-hubzilla-1514b0f4e5c053df60b8873b5411c70be727d227.tar.bz2
volse-hubzilla-1514b0f4e5c053df60b8873b5411c70be727d227.zip
initial support for alternative sort orders on the cloud pages. Can be triggered manually but further development is required.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Cloud.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php
index 8b5476efc..34397d275 100644
--- a/Zotlabs/Module/Cloud.php
+++ b/Zotlabs/Module/Cloud.php
@@ -60,6 +60,12 @@ class Cloud extends \Zotlabs\Web\Controller {
// if we arrived at this path with any query parameters in the url, build a clean url without
// them and redirect.
+ if(! array_key_exists('cloud_sort',$_SESSION)) {
+ $_SESSION['cloud_sort'] = 'name';
+ }
+
+ $_SESSION['cloud_sort'] = (($_REQUEST['sort']) ? trim(notags($_REQUEST['sort'])) : $_SESSION['cloud_sort']);
+
$x = clean_query_string();
if($x !== \App::$query_string)
goaway(z_root() . '/' . $x);