diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-02-11 11:48:49 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-02-11 11:48:49 +0100 |
commit | bbf672f4532b6c94354256e71a324830829c1dea (patch) | |
tree | 8c4970c6a35755dd28eaaad0c4b3c0b7c91e0219 /apps | |
parent | 7842b416d1c85a723368148ea9cbe6d34378af69 (diff) | |
download | nextcloud-server-bbf672f4532b6c94354256e71a324830829c1dea.tar.gz nextcloud-server-bbf672f4532b6c94354256e71a324830829c1dea.zip |
Share: fix nested subfolders in public shared folders
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/public.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 4b536097414..ac889cd2dcb 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -115,7 +115,6 @@ if (isset($path)) { $tmpl = new OCP\Template('files_sharing', 'public', 'base'); $tmpl->assign('uidOwner', $shareOwner); $tmpl->assign('displayName', \OCP\User::getDisplayName($shareOwner)); - $tmpl->assign('dir', $dir); $tmpl->assign('filename', $file); $tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path)); $tmpl->assign('fileTarget', basename($linkItem['file_target'])); @@ -124,6 +123,8 @@ if (isset($path)) { .(isset($_GET['file'])?'&file='.$_GET['file']:''); // Show file list if (\OC\Files\Filesystem::is_dir($path)) { + $tmpl->assign('dir', $getPath); + OCP\Util::addStyle('files', 'files'); OCP\Util::addScript('files', 'files'); OCP\Util::addScript('files', 'filelist'); @@ -141,7 +142,7 @@ if (isset($path)) { $i['extension'] = ''; } } - $i['directory'] = $dir; + $i['directory'] = $getPath; $i['permissions'] = OCP\PERMISSION_READ; $files[] = $i; } @@ -165,7 +166,7 @@ if (isset($path)) { $folder = new OCP\Template('files', 'index', ''); $folder->assign('fileList', $list->fetchPage(), false); $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false); - $folder->assign('dir', basename($dir)); + $folder->assign('dir', $getPath); $folder->assign('isCreatable', false); $folder->assign('permissions', 0); $folder->assign('files', $files); @@ -177,6 +178,8 @@ if (isset($path)) { $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath)); } else { + $tmpl->assign('dir', $dir); + // Show file preview if viewer is available if ($type == 'file') { $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download'); |