From 5456ee7f655b854c37cddf0479f0d8757802ca86 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 22 Feb 2018 21:45:00 -0800 Subject: cloud 'view-as-tiles' toggle wasn't available (at all) for guests and they are the most likely to prefer that view. Fix that and make tiles the default view for guests, and list mode the default view for the channel owner. --- Zotlabs/Storage/Browser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index c21b68971..f1c95802b 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -264,7 +264,10 @@ class Browser extends DAV\Browser\Plugin { $this->server->emit('onHTMLActionsPanel', array($parent, &$output, $path)); } - + $deftiles = (($is_owner) ? 0 : 1); + $tiles = ((array_key_exists('cloud_tiles',$_SESSION)) ? intval($_SESSION['cloud_tiles']) : $deftiles); + $_SESSION['cloud_tiles'] = $tiles; + $html .= replace_macros(get_markup_template('cloud.tpl'), array( '$header' => t('Files') . ": " . $this->escapeHTML($path) . "/", '$total' => t('Total'), -- cgit v1.2.3