]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10870 A few more fixes to the file.php page's navigation
authornicolasconnault <nicolasconnault>
Thu, 16 Aug 2007 16:53:55 +0000 (16:53 +0000)
committernicolasconnault <nicolasconnault>
Thu, 16 Aug 2007 16:53:55 +0000 (16:53 +0000)
files/index.php

index 156a0db70853baeed0ed92754e3245e198a3c53c..7997e3d93f1eb7e68095031ecabd9af139ae377f 100644 (file)
@@ -77,6 +77,7 @@
             $navlinks[] = array('name' => $dirs[$numdirs-1], 'link' => null, 'type' => 'misc');
         }
 
+        $navigation = build_navigation($navlinks);
 
         if ($choose) {
             print_header();
             <?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") {
                 }
 
             } else {
-                $navigation = build_navigation($navlinks);
                 print_header("$course->shortname: $strfiles", $course->fullname, $navigation,  $formfield);
             }
         }