From: skodak Date: Sun, 1 Feb 2009 17:45:32 +0000 (+0000) Subject: MDL-17458 fixed headers used during installation X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=770f0cea30dcfed18b76c7222a70c1114e340b12;p=moodle.git MDL-17458 fixed headers used during installation --- diff --git a/admin/index.php b/admin/index.php index efdea060a0..c6a0c7d736 100644 --- a/admin/index.php +++ b/admin/index.php @@ -145,9 +145,7 @@ $strdatabasesetup = get_string("databasesetup"); $navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc'))); - - print_header($strinstallation, $strinstallation, $navigation, - "", upgrade_get_javascript(), false, " ", " "); + print_header($strinstallation, $strinstallation, $navigation, "", upgrade_get_javascript(), false, " ", " "); if (!$DB->setup_is_unicodedb()) { if (!$DB->change_db_encoding()) { diff --git a/admin/upgradesettings.php b/admin/upgradesettings.php index 81f5cdd11f..1ab426ae11 100644 --- a/admin/upgradesettings.php +++ b/admin/upgradesettings.php @@ -49,7 +49,9 @@ if (!empty($adminroot->errors)) { // to modify them admin_externalpage_print_header($focus); -print_box(get_string('upgradesettingsintro','admin'), 'generalbox'); +if (!empty($SITE->fullname) and !empty($SITE->shortname)) { + print_box(get_string('upgradesettingsintro','admin'), 'generalbox'); +} echo '
'; echo '
'; diff --git a/lib/adminlib.php b/lib/adminlib.php index 8ce7df206c..c91d39dceb 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -4039,7 +4039,7 @@ function admin_externalpage_print_header($focus='') { define('ADMIN_EXT_HEADER_PRINTED', 'true'); - if (!empty($SITE->fullname)) { + if (!empty($SITE->fullname) and !empty($SITE->shortname)) { $pageblocks = blocks_setup($PAGE); $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, @@ -4085,7 +4085,10 @@ function admin_externalpage_print_header($focus='') { } } } else { - print_header(); + $strinstallation = get_string('installation', 'install'); + $strsettings = get_string('settings'); + $navigation = build_navigation(array(array('name'=>$strsettings, 'link'=>null, 'type'=>'misc'))); + print_header($strinstallation, $strinstallation, $navigation, "", "", false, " ", " "); } } diff --git a/lib/weblib.php b/lib/weblib.php index 5723e8e481..dd31ad8f7a 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3707,7 +3707,7 @@ function build_navigation($extranavlinks, $cm = null) { $navlinks = array(); //Site name - if ($SITE) { + if (!empty($SITE->shortname)) { $navlinks[] = array( 'name' => format_string($SITE->shortname), 'link' => "$CFG->wwwroot/", diff --git a/user/editadvanced.php b/user/editadvanced.php index f765a65d7e..dc254f74e4 100644 --- a/user/editadvanced.php +++ b/user/editadvanced.php @@ -196,8 +196,10 @@ print_heading($userfullname); } } else if (!empty($USER->newadminuser)) { + $strinstallation = get_string('installation', 'install'); $strprimaryadminsetup = get_string('primaryadminsetup'); - print_header($strprimaryadminsetup, $strprimaryadminsetup); + $navigation = build_navigation(array(array('name'=>$strprimaryadminsetup, 'link'=>null, 'type'=>'misc'))); + print_header($strinstallation, $strinstallation, $navigation, "", "", false, " ", " "); print_simple_box(get_string('configintroadmin', 'admin'), 'center', '50%'); echo '
'; } else {