### Eclipse Workspace Patch 1.0
#P moodle
Index: lib/weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.822
diff -u -r1.822 weblib.php
--- lib/weblib.php 24 Feb 2007 10:19:15 -0000 1.822
+++ lib/weblib.php 24 Feb 2007 11:55:01 -0000
@@ -2813,16 +2813,48 @@
}
if ($navigation) {
- //Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
- $nav_text = get_string('youarehere','access');
- $output .= '
'.$nav_text."
\n";
+
+ if (!is_array($navigation)) {
+ $ar = explode('->', $navigation);
+ $navigation = array();
+ foreach ($ar as $a) {
+ if (strpos($a, '') === false) {
+ $navigation[trim($a)] = '';
+ } else {
+ if (preg_match('/(.*)<\/a>/', $a, $matches)) {
+ $navigation[trim($matches[2])] = $matches[1];
+ }
+ }
+ }
+ }
+
if (! $site = get_site()) {
+ $site = new object();
$site->shortname = get_string('home');
}
-
- $navigation = "- $separator ". str_replace('->', "
\n- $separator", $navigation) ."
\n";
- $output .= '- frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
- ? '/my' : '') .'/">'. $site->shortname ."
\n". $navigation;
+
+ //Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
+ $nav_text = get_string('youarehere','access');
+ $output .= ''.$nav_text."
\n";
}