From 8c7fc032969cdb0a989b5f18e8b5ce915de2a0f4 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Fri, 21 Oct 2011 23:30:12 +0200 Subject: [PATCH] Correct unknown breadcrumb add '/' permanantly in it and DRY code for last breadcrumb --- files/index.php | 4 ++-- files/templates/part.breadcrumb.php | 10 +++------- 2 files changed, 5 insertions(+), 9 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 != "" ){ diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php index b26f6097153..ab81cc5c039 100644 --- a/files/templates/part.breadcrumb.php +++ b/files/templates/part.breadcrumb.php @@ -1,10 +1,6 @@ - -
")'> +
svg" data-dir='' style='background-image:url("")'> ">
- -
")'> - "> -
\ No newline at end of file + \ No newline at end of file