aboutsummaryrefslogtreecommitdiffstats
path: root/files/index.php
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2011-10-21 23:30:12 +0200
committerBrice Maron <brice@bmaron.net>2011-10-21 23:30:12 +0200
commit8c7fc032969cdb0a989b5f18e8b5ce915de2a0f4 (patch)
treef10cee296d6ad5d2442168f13c8f295baba02638 /files/index.php
parent61660c068a1d24f3723e4f82573143e2a4d884e8 (diff)
downloadnextcloud-server-8c7fc032969cdb0a989b5f18e8b5ce915de2a0f4.tar.gz
nextcloud-server-8c7fc032969cdb0a989b5f18e8b5ce915de2a0f4.zip
Correct unknown breadcrumb add '/' permanantly in it and DRY code for last breadcrumb
Diffstat (limited to 'files/index.php')
-rw-r--r--files/index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/index.php b/files/index.php
index bd37598289a..7a9bf793a0e 100644
--- a/files/index.php
+++ b/files/index.php
@@ -41,7 +41,7 @@ if(!isset($_SESSION['timezone'])){
}
OC_App::setActiveNavigationEntry( "files_index" );
// Load the files
-$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+$dir = isset( $_GET['dir'] ) && $_GET['dir'] != '/' ? $_GET['dir'] : '';
$files = array();
foreach( OC_Files::getdirectorycontent( $dir ) as $i ){
@@ -63,7 +63,7 @@ foreach( OC_Files::getdirectorycontent( $dir ) as $i ){
}
// Make breadcrumb
-$breadcrumb = array();
+$breadcrumb = array('/');
$pathtohere = "";
foreach( explode( "/", $dir ) as $i ){
if( $i != "" ){