From 1deda8fd6575426e854276c83a52df8060893b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 15 Nov 2018 20:29:10 +0100 Subject: [PATCH] Rollback to default list view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/lib/Controller/ViewController.php | 2 +- apps/files/list.php | 2 +- apps/files/recentlist.php | 2 +- apps/files/simplelist.php | 2 +- apps/files/tests/Controller/ViewControllerTest.php | 4 ++-- apps/files_sharing/lib/Controller/ShareController.php | 4 ++-- apps/files_sharing/list.php | 2 +- apps/files_sharing/tests/Controller/ShareControllerTest.php | 6 +++--- apps/files_trashbin/list.php | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 3932b2b0a8e0c..fc0fb120cfe4f 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -257,7 +257,7 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal $params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'); $params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name'); $params['defaultFileSortingDirection'] = $this->config->getUserValue($user, 'files', 'file_sorting_direction', 'asc'); - $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', true); + $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false); $params['isIE'] = \OCP\Util::isIE(); $showHidden = (bool) $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_hidden', false); $params['showHiddenFiles'] = $showHidden ? 1 : 0; diff --git a/apps/files/list.php b/apps/files/list.php index 7a5159cf38796..9ceeaaa04913a 100644 --- a/apps/files/list.php +++ b/apps/files/list.php @@ -26,7 +26,7 @@ // TODO: move this to the generated config.js $publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'); -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true); +$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); $isIE = \OCP\Util::isIE(); // renders the controls and table headers template diff --git a/apps/files/recentlist.php b/apps/files/recentlist.php index c17f9d598bfb8..99409749e36de 100644 --- a/apps/files/recentlist.php +++ b/apps/files/recentlist.php @@ -26,7 +26,7 @@ $config = \OC::$server->getConfig(); $userSession = \OC::$server->getUserSession(); -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true); +$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); $isIE = \OCP\Util::isIE(); $tmpl = new OCP\Template('files', 'recentlist', ''); diff --git a/apps/files/simplelist.php b/apps/files/simplelist.php index 9515ec623634b..d623b251306c9 100644 --- a/apps/files/simplelist.php +++ b/apps/files/simplelist.php @@ -25,7 +25,7 @@ $config = \OC::$server->getConfig(); $userSession = \OC::$server->getUserSession(); -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true); +$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); $isIE = \OCP\Util::isIE(); // renders the controls and table headers template diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 35fc1e74c1a05..d051ab7258d7d 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -131,7 +131,7 @@ public function testIndexWithRegularBrowser() { [$this->user->getUID(), 'files', 'file_sorting', 'name', 'name'], [$this->user->getUID(), 'files', 'file_sorting_direction', 'asc', 'asc'], [$this->user->getUID(), 'files', 'show_hidden', false, false], - [$this->user->getUID(), 'files', 'show_grid', true, true], + [$this->user->getUID(), 'files', 'show_grid', true], ])); $this->config @@ -367,7 +367,7 @@ public function testIndexWithRegularBrowser() { ], ], 'hiddenFields' => [], - 'showgridview' => true, + 'showgridview' => false, 'isIE' => false, ] ); diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 00c6a7a4985f9..f3ad6223511a7 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -360,7 +360,7 @@ public function showShare($path = ''): TemplateResponse { $folder->assign('isPublic', true); $folder->assign('hideFileList', $hideFileList); $folder->assign('publicUploadEnabled', 'no'); - $folder->assign('showgridview', true); + $folder->assign('showgridview', false); $folder->assign('uploadMaxFilesize', $maxUploadFilesize); $folder->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize)); $folder->assign('freeSpace', $freeSpace); @@ -371,7 +371,7 @@ public function showShare($path = ''): TemplateResponse { $shareIsFolder = false; } - $shareTmpl['showgridview'] = true; + $shareTmpl['showgridview'] = false; $shareTmpl['hideFileList'] = $hideFileList; $shareTmpl['shareOwner'] = $this->userManager->get($share->getShareOwner())->getDisplayName(); diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php index 590a3a1911e82..9eed10f8d26a8 100644 --- a/apps/files_sharing/list.php +++ b/apps/files_sharing/list.php @@ -24,7 +24,7 @@ $config = \OC::$server->getConfig(); $userSession = \OC::$server->getUserSession(); -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true); +$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); $isIE = \OCP\Util::isIE(); $tmpl = new OCP\Template('files_sharing', 'list', ''); diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 3a9856e1bd284..ea9bd8316e203 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -290,7 +290,7 @@ public function testShowShare() { 'previewURL' => 'downloadURL', 'note' => $note, 'hideDownload' => false, - 'showgridview' => true + 'showgridview' => false ); $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy(); @@ -410,7 +410,7 @@ public function testShowShareHideDownload() { 'previewURL' => 'downloadURL', 'note' => $note, 'hideDownload' => true, - 'showgridview' => true + 'showgridview' => false ); $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy(); @@ -509,7 +509,7 @@ public function testShareFileDrop() { 'previewURL' => '', 'note' => '', 'hideDownload' => false, - 'showgridview' => true + 'showgridview' => false ); $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy(); diff --git a/apps/files_trashbin/list.php b/apps/files_trashbin/list.php index 48ed7b694d045..127e038981547 100644 --- a/apps/files_trashbin/list.php +++ b/apps/files_trashbin/list.php @@ -27,7 +27,7 @@ $config = \OC::$server->getConfig(); $userSession = \OC::$server->getUserSession(); -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', true); +$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); $isIE = \OCP\Util::isIE(); $tmpl = new OCP\Template('files_trashbin', 'index', '');