Skip to content

Commit

Permalink
MDL-10870 A few more fixes to the file.php page's navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 16, 2007
1 parent 178f965 commit a164fd5
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions files/index.php
Expand Up @@ -77,6 +77,7 @@ function html_header($course, $wdir, $formfield=""){
$navlinks[] = array('name' => $dirs[$numdirs-1], 'link' => null, 'type' => 'misc');
}

$navigation = build_navigation($navlinks);

if ($choose) {
print_header();
Expand Down Expand Up @@ -108,7 +109,20 @@ function set_value(txt) {
<?php

}
$fullnav = str_replace('->', '&raquo;', 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 .= '<a href="'.$navlink['link'].'">'.$navlink['name'].'</a>';
}
$fullnav .= ' -> ';
$i++;
}
$fullnav = substr($fullnav, 0, -4);
$fullnav = str_replace('->', '&raquo;', format_string($course->shortname) . " -> " . $fullnav);
echo '<div id="nav-bar">'.$fullnav.'</div>';

if ($course->id == SITEID and $wdir != "/backupdata") {
Expand All @@ -131,7 +145,6 @@ function set_value(txt) {
}

} else {
$navigation = build_navigation($navlinks);
print_header("$course->shortname: $strfiles", $course->fullname, $navigation, $formfield);
}
}
Expand Down

0 comments on commit a164fd5

Please sign in to comment.