summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-11 15:20:51 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-12 16:49:39 +0200
commit5470b9521a8f128dba88e441f7147e912c5b48d6 (patch)
treedfa155470b2a48fee59af84d8b3d3ae5a45e7b9e /apps/files
parentd8c69df018ebd5801cd0d35ad94e86c65e41c07c (diff)
downloadnextcloud-server-5470b9521a8f128dba88e441f7147e912c5b48d6.tar.gz
nextcloud-server-5470b9521a8f128dba88e441f7147e912c5b48d6.zip
Default state to collapsed and fixed code styling
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Controller/ApiController.php2
-rw-r--r--apps/files/lib/Controller/ViewController.php13
-rw-r--r--apps/files/templates/appnavigation.php2
3 files changed, 6 insertions, 11 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index 3738358bfb0..aae1bec2e78 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -313,7 +313,7 @@ class ApiController extends Controller {
*/
public function getShowQuickAccess() {
- return $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', 1);
+ return $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', 0);
}
/**
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 13b33b96cc8..15d9334ed9e 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -202,16 +202,11 @@ class ViewController extends Controller {
}
- $defaultExpandedState = 'true';
- if (!$this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', 1)) {
- $defaultExpandedState = 'false';
- }
+ // show_Quick_Access stored as string
+ $defaultExpandedState = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_Quick_Access', '0') === '1';
- $quickAccessDraggable = 'false';
- //See Javascript navigation.js for possible sorting strategies
- if($this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'quickaccess_sorting_strategy', 'alphabet')=='customorder'){
- $quickAccessDraggable = 'true';
- }
+ // see Javascript navigation.js for possible sorting strategies
+ $quickAccessDraggable = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'quickaccess_sorting_strategy', 'alphabet') === 'customorder';
\OCA\Files\App::getNavigationManager()->add(
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
index 4265af3f211..7dfb5630bc1 100644
--- a/apps/files/templates/appnavigation.php
+++ b/apps/files/templates/appnavigation.php
@@ -68,7 +68,7 @@ function NavigationListElements($item, $l, $pinned) {
?>
<li <?php if (isset($item['sublist'])){ ?>id="button-collapse-parent-<?php p($item['id']); ?>"<?php } ?>
data-id="<?php p(isset($item['href']) ? $item['href'] : $item['id']) ?> "
- class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned === 1 ? 'first-pinned' : '') ?> <?php if ($item['defaultExpandedState'] === 'true') { ?> open<?php } ?>"
+ class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned === 1 ? 'first-pinned' : '') ?> <?php if ($item['defaultExpandedState']) { ?> open<?php } ?>"
<?php if (isset($item['folderPosition'])) { ?> folderposition="<?php p($item['folderPosition']); ?>" <?php } ?>>
<a href="<?php p(isset($item['href']) ? $item['href'] : '#') ?>"