Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback to default list view #12474

Merged
merged 1 commit into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/files/lib/Controller/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion apps/files/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/files/recentlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
Expand Down
2 changes: 1 addition & 1 deletion apps/files/simplelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apps/files/tests/Controller/ViewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -367,7 +367,7 @@ public function testIndexWithRegularBrowser() {
],
],
'hiddenFields' => [],
'showgridview' => true,
'showgridview' => false,
'isIE' => false,
]
);
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/lib/Controller/ShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
Expand Down
6 changes: 3 additions & 3 deletions apps/files_sharing/tests/Controller/ShareControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function testShowShare() {
'previewURL' => 'downloadURL',
'note' => $note,
'hideDownload' => false,
'showgridview' => true
'showgridview' => false
);

$csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
Expand Down Expand Up @@ -410,7 +410,7 @@ public function testShowShareHideDownload() {
'previewURL' => 'downloadURL',
'note' => $note,
'hideDownload' => true,
'showgridview' => true
'showgridview' => false
);

$csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
Expand Down Expand Up @@ -509,7 +509,7 @@ public function testShareFileDrop() {
'previewURL' => '',
'note' => '',
'hideDownload' => false,
'showgridview' => true
'showgridview' => false
);

$csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
Expand Down
2 changes: 1 addition & 1 deletion apps/files_trashbin/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
Expand Down