MDL-15601 Merged basic checking to avoid some notices
This commit is contained in:
+4
-1
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user