From a164fd5d80c5d86d43d7c1c80c53bb3a16a1d574 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 16 Aug 2007 16:53:55 +0000 Subject: [PATCH] MDL-10870 A few more fixes to the file.php page's navigation --- files/index.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/files/index.php b/files/index.php index 156a0db708..7997e3d93f 100644 --- a/files/index.php +++ b/files/index.php @@ -77,6 +77,7 @@ $navlinks[] = array('name' => $dirs[$numdirs-1], 'link' => null, 'type' => 'misc'); } + $navigation = build_navigation($navlinks); if ($choose) { print_header(); @@ -108,7 +109,20 @@ ', '»', format_string($course->shortname) . " -> $fullnav"); + $fullnav = ''; + $i = 0; + foreach ($navlinks as $navlink) { + // If this is the last link do not link + if ($i == count($navlinks) - 1) { + $fullnav .= $navlink['name']; + } else { + $fullnav .= ''.$navlink['name'].''; + } + $fullnav .= ' -> '; + $i++; + } + $fullnav = substr($fullnav, 0, -4); + $fullnav = str_replace('->', '»', format_string($course->shortname) . " -> " . $fullnav); echo ''; if ($course->id == SITEID and $wdir != "/backupdata") { @@ -131,7 +145,6 @@ } } else { - $navigation = build_navigation($navlinks); print_header("$course->shortname: $strfiles", $course->fullname, $navigation, $formfield); } } -- 2.39.5