summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/public.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-05 15:06:59 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-10-05 15:06:59 +0200
commitc99f62891a53097115c07f6e860b4dfdf4d70600 (patch)
tree4327f134a543e86b9882bfefd66ef321c9c7ab01 /apps/files_sharing/public.php
parent0d081ac5acbb049659eedca0766c99ed7e91c4d7 (diff)
downloadnextcloud-server-c99f62891a53097115c07f6e860b4dfdf4d70600.tar.gz
nextcloud-server-c99f62891a53097115c07f6e860b4dfdf4d70600.zip
breadcrumbs fixed for public share view
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r--apps/files_sharing/public.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 13a328ff74c..67b2dca8c9e 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -122,12 +122,16 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
// Make breadcrumb
$breadcrumb = array();
$pathtohere = '';
+ $count = 1;
foreach (explode('/', $dir) as $i) {
if ($i != '') {
if ($i != $baseDir) {
$pathtohere .= '/'.$i;
+ }
+ if ( strlen($pathtohere) < strlen($_GET['dir'])) {
+ continue;
}
- $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
+ $breadcrumb[] = array('dir' => str_replace($_GET['dir'], "", $pathtohere, $count), 'name' => $i);
}
}
$list = new OCP\Template('files', 'part.list', '');