From: nicolasconnault Date: Fri, 24 Aug 2007 12:45:16 +0000 (+0000) Subject: MDL-10970 Reverted changes X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=54c0f82b1d9685cfb86c5a52878b7ff61896f4ce;p=moodle.git MDL-10970 Reverted changes --- diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 1141ddaa21..b252514043 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -1457,89 +1457,4 @@ function print_group_menu($groups, $groupmode, $currentgroup, $urlroot, $showall } -/** - * Prints breadcrumb trail of links, called in theme/-/header.html - * - * @uses $CFG - * @param mixed $navigation The breadcrumb navigation string to be printed - * @param string $separator The breadcrumb trail separator. The default 0 leads to the use - * of $THEME->rarrow, themes could use '→', '/', or '' for a style-sheet solution. - * @param boolean $return False to echo the breadcrumb string (default), true to return it. - */ -function print_navigation ($navigation, $separator=0, $return=false) { - global $CFG, $THEME; - $output = ''; - - if (0 === $separator) { - $separator = get_separator(); - } - else { - $separator = ''. $separator .''; - } - - if ($navigation) { - - if (is_newnav($navigation)) { - if ($return) { - return($navigation['navlinks']); - } else { - echo $navigation['navlinks']; - return; - } - } else { - debugging('Navigation needs to be updated to use build_navigation()', DEBUG_DEVELOPER); - } - - if (!is_array($navigation)) { - $ar = explode('->', $navigation); - $navigation = array(); - - foreach ($ar as $a) { - if (strpos($a, '') === false) { - $navigation[] = array('title' => $a, 'url' => ''); - } else { - if (preg_match('/(.*)<\/a>/', $a, $matches)) { - $navigation[] = array('title' => $matches[2], 'url' => $matches[1]); - } - } - } - } - - if (! $site = get_site()) { - $site = new object(); - $site->shortname = get_string('home'); - } - - //Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character. - $nav_text = get_string('youarehere','access'); - $output .= '

'.$nav_text."

\n"; - } - - if ($return) { - return $output; - } else { - echo $output; - } -} - ?> diff --git a/lib/weblib.php b/lib/weblib.php index ea16bba341..6f70b23a8f 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3236,6 +3236,91 @@ function get_separator() { return ' '.link_arrow_right($text='/', $url='', $accesshide=true, 'sep').' '; } +/** + * Prints breadcrumb trail of links, called in theme/-/header.html + * + * @uses $CFG + * @param mixed $navigation The breadcrumb navigation string to be printed + * @param string $separator The breadcrumb trail separator. The default 0 leads to the use + * of $THEME->rarrow, themes could use '→', '/', or '' for a style-sheet solution. + * @param boolean $return False to echo the breadcrumb string (default), true to return it. + */ +function print_navigation ($navigation, $separator=0, $return=false) { + global $CFG, $THEME; + $output = ''; + + if (0 === $separator) { + $separator = get_separator(); + } + else { + $separator = ''. $separator .''; + } + + if ($navigation) { + + if (is_newnav($navigation)) { + if ($return) { + return($navigation['navlinks']); + } else { + echo $navigation['navlinks']; + return; + } + } else { + debugging('Navigation needs to be updated to use build_navigation()', DEBUG_DEVELOPER); + } + + if (!is_array($navigation)) { + $ar = explode('->', $navigation); + $navigation = array(); + + foreach ($ar as $a) { + if (strpos($a, '') === false) { + $navigation[] = array('title' => $a, 'url' => ''); + } else { + if (preg_match('/(.*)<\/a>/', $a, $matches)) { + $navigation[] = array('title' => $matches[2], 'url' => $matches[1]); + } + } + } + } + + if (! $site = get_site()) { + $site = new object(); + $site->shortname = get_string('home'); + } + + //Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character. + $nav_text = get_string('youarehere','access'); + $output .= '

'.$nav_text."

\n"; + } + + if ($return) { + return $output; + } else { + echo $output; + } +} + /** * This function will build the navigation string to be used by print_header * and others diff --git a/theme/chameleon/header.html b/theme/chameleon/header.html index ad9dccf05f..bde17042b3 100644 --- a/theme/chameleon/header.html +++ b/theme/chameleon/header.html @@ -37,7 +37,7 @@ diff --git a/theme/cornflower/footer.html b/theme/cornflower/footer.html index b19236eb3b..2c83e78cfa 100644 --- a/theme/cornflower/footer.html +++ b/theme/cornflower/footer.html @@ -11,7 +11,7 @@ diff --git a/theme/cornflower/header.html b/theme/cornflower/header.html index e395dd211d..ed62f59f8a 100644 --- a/theme/cornflower/header.html +++ b/theme/cornflower/header.html @@ -35,7 +35,7 @@ diff --git a/theme/custom_corners/header.html b/theme/custom_corners/header.html index 458932face..ded3c3d222 100644 --- a/theme/custom_corners/header.html +++ b/theme/custom_corners/header.html @@ -81,7 +81,7 @@ diff --git a/theme/formal_white/footer.html b/theme/formal_white/footer.html index 7cac32547c..ec3b78dc35 100644 --- a/theme/formal_white/footer.html +++ b/theme/formal_white/footer.html @@ -11,7 +11,7 @@ diff --git a/theme/formal_white/header.html b/theme/formal_white/header.html index cb3530aa6a..e9f7aec151 100644 --- a/theme/formal_white/header.html +++ b/theme/formal_white/header.html @@ -34,7 +34,7 @@   diff --git a/theme/oceanblue/header.html b/theme/oceanblue/header.html index a13996235f..7da27b4cf9 100644 --- a/theme/oceanblue/header.html +++ b/theme/oceanblue/header.html @@ -34,7 +34,7 @@ diff --git a/theme/orangewhitepda/header.html b/theme/orangewhitepda/header.html index f3691b1dc7..c333e877d0 100644 --- a/theme/orangewhitepda/header.html +++ b/theme/orangewhitepda/header.html @@ -36,7 +36,7 @@ diff --git a/theme/standard/footer.html b/theme/standard/footer.html index 8fe83abb0d..231fcb4db5 100644 --- a/theme/standard/footer.html +++ b/theme/standard/footer.html @@ -11,7 +11,7 @@ diff --git a/theme/standard/header.html b/theme/standard/header.html index a13996235f..7da27b4cf9 100644 --- a/theme/standard/header.html +++ b/theme/standard/header.html @@ -34,7 +34,7 @@