From ce27e6f42f86a4a4543f278f891dec10702dc04f Mon Sep 17 00:00:00 2001 From: nfreear Date: Tue, 28 Nov 2006 15:26:40 +0000 Subject: [PATCH] Fix for MDL-6685 (and MDL-7122 "breadcrumb separator missing"). Merged from MOODLE_17_STABLE. --- lib/weblib.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 58803bd25..6db6b1ef8 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2668,12 +2668,29 @@ function check_theme_arrows() { global $THEME; if (!isset($THEME->rarrow) and !isset($THEME->larrow)) { + // Default, looks good in Win XP/IE 6, Win/Firefox 1.5, Win/Netscape 8... + // Also OK in Win 9x/2K/IE 5.x $THEME->rarrow = '►'; $THEME->larrow = '◄'; - if (FALSE !== strpos($_SERVER['HTTP_USER_AGENT'], 'Opera')) { + $uagent = $_SERVER['HTTP_USER_AGENT']; + if (false !== strpos($uagent, 'Opera') + || false !== strpos($uagent, 'Mac')) { + // Looks good in Win XP/Mac/Opera 8/9, Mac/Firefox 2, Camino, Safari. + // Not broken in Mac/IE 5, Mac/Netscape 7 (?). $THEME->rarrow = '▶'; $THEME->larrow = '◀'; - } + } + elseif (false !== strpos($uagent, 'Konqueror')) { + $THEME->rarrow = '→'; + $THEME->larrow = '←'; + } + elseif (isset($_SERVER['HTTP_ACCEPT_CHARSET']) + && false === stripos($_SERVER['HTTP_ACCEPT_CHARSET'], 'utf-8')) { + // (Win/IE 5 doesn't set ACCEPT_CHARSET, but handles Unicode.) + // To be safe, non-Unicode browsers! + $THEME->rarrow = '>'; + $THEME->larrow = '<'; + } } } -- 2.11.4.GIT