Modify listBreadcrumbs

This commit is contained in:
Marco Antonio Garrido Rojo
2017-03-29 16:14:33 +02:00
parent d341687193
commit 32fb73f1b9

View File

@@ -198,21 +198,15 @@ class DirectoryLister {
);
// Generate breadcrumbs
$dirPath = null;
foreach ($dirArray as $key => $dir) {
if ($dir != '.') {
$dirPath = null;
// Build the directory path
for ($i = 0; $i <= $key; $i++) {
$dirPath = $dirPath . $dirArray[$i] . '/';
}
// Remove trailing slash
if(substr($dirPath, -1) == '/') {
$dirPath = substr($dirPath, 0, -1);
}
if ($dirPath === null) $dirPath = $dir;
else $dirPath = $dirPath . '/' . $dir;
// Combine the base path and dir path
$link = $this->_appURL . '?dir=' . rawurlencode($dirPath);