diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-23 08:43:02 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-23 08:43:02 +0200 |
commit | e0dde083d0502a4a5374feb51ea38ceaeebf7c3b (patch) | |
tree | e2168f92c44f412544a36d1e286299ed71eedde9 /apps | |
parent | 8652ada561baf9acac83ac88f713ab7560245cf0 (diff) | |
download | nextcloud-server-e0dde083d0502a4a5374feb51ea38ceaeebf7c3b.tar.gz nextcloud-server-e0dde083d0502a4a5374feb51ea38ceaeebf7c3b.zip |
Public fixes, request & default to grid
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 9 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 6c86286d568..1f4d230cef0 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -599,9 +599,12 @@ */ _onGridviewChange: function() { var show = this.$showGridView.is(':checked'); - $.post(OC.generateUrl('/apps/files/api/v1/showgridview'), { - show: show - }); + // only save state if user is logged in + if (OC.currentUser) { + $.post(OC.generateUrl('/apps/files/api/v1/showgridview'), { + show: show + }); + } this.$showGridView.next('#view-toggle') .removeClass('icon-toggle-filelist icon-toggle-pictures') .addClass(show ? 'icon-toggle-filelist' : 'icon-toggle-pictures') diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 8e9cc5a9636..8d02cc82fd2 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -338,6 +338,7 @@ class ShareController extends AuthPublicShareController { $folder->assign('isPublic', true); $folder->assign('hideFileList', $hideFileList); $folder->assign('publicUploadEnabled', 'no'); + $folder->assign('showgridview', true); $folder->assign('uploadMaxFilesize', $maxUploadFilesize); $folder->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize)); $folder->assign('freeSpace', $freeSpace); |