initial support for alternative sort orders on the cloud pages. Can be triggered manually but further development is required.

This commit is contained in:
zotlabs
2018-03-21 21:19:18 -07:00
parent dc066d4c9b
commit 1514b0f4e5
3 changed files with 24 additions and 1 deletions

View File

@@ -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);