MDL-15601 Merged basic checking to avoid some notices

This commit is contained in:
moodler
2008-07-10 08:50:43 +00:00
parent a43733550c
commit 554606c76b
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -1363,7 +1363,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
print_spacer(12, 20 * $mod->indent, false);
}
$extra = $modinfo->cms[$modnumber]->extra;
$extra = '';
if (!empty($modinfo->cms[$modnumber]->extra)) {
$extra = $modinfo->cms[$modnumber]->extra;
}
if ($mod->modname == "label") {
if (!$mod->visible) {
+5 -1
View File
@@ -3366,7 +3366,11 @@ function check_theme_arrows() {
// Also OK in Win 9x/2K/IE 5.x
$THEME->rarrow = '►';
$THEME->larrow = '◄';
$uagent = $_SERVER['HTTP_USER_AGENT'];
if (empty($_SERVER['HTTP_USER_AGENT'])) {
$uagent = '';
} else {
$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.