From 9ace50944f958185e13fe25accbc957fed48d5a9 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 7 Feb 2009 17:56:40 +0000 Subject: [PATCH] MDL-14924 the same title now used on each upgrade/install page (Moodle - 2.0...) + the same footer with moodle logo now used during installation and upgrade - links to admin docs --- admin/index.php | 23 ++++++++++++----------- install.php | 2 +- lib/installlib.php | 4 ++-- lib/upgradelib.php | 4 ++-- lib/weblib.php | 9 ++++++++- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/admin/index.php b/admin/index.php index fbe01e2842..57f8adf46b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -71,6 +71,7 @@ $version = null; $release = null; require("$CFG->dirroot/version.php"); // defines $version and $release + $CFG->target_release = $release; // used during installation and upgrades if (!$version or !$release) { print_error('withoutversion', 'debug'); // without version, stop @@ -111,7 +112,7 @@ if (empty($agreelicense)) { $strlicense = get_string('license'); $navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc'))); - print_header($strinstallation, $strinstallation, $navigation, "", "", false, " ", " "); + print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, "", "", false, " ", " "); print_heading("Moodle - Modular Object-Oriented Dynamic Learning Environment"); print_heading(get_string('copyrightnotice')); $copyrightnotice = text_to_html(get_string('gpl')); @@ -120,13 +121,13 @@ echo "
"; notice_yesno(get_string('doyouagree'), "index.php?agreelicense=1&lang=$CFG->lang", "http://docs.moodle.org/en/License"); - print_footer('none'); + print_footer('upgrade'); die; } if (empty($confirmrelease)) { $strcurrentrelease = get_string("currentrelease"); $navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc'))); - print_header($strinstallation, $strinstallation, $navigation, "", "", false, " ", " "); + print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, "", "", false, " ", " "); print_heading("Moodle $release"); $releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'); $releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack @@ -134,19 +135,19 @@ require_once($CFG->libdir.'/environmentlib.php'); if (!check_moodle_environment($release, $environment_results, true)) { - print_upgrade_reload("index.php?agreelicense=1&lang=$CFG->lang"); + print_upgrade_reload("index.php?agreelicense=1&lang=$CFG->lang"); } else { notify(get_string('environmentok', 'admin'), 'notifysuccess'); - print_continue("index.php?agreelicense=1&confirmrelease=1&lang=$CFG->lang"); + print_continue("index.php?agreelicense=1&confirmrelease=1&lang=$CFG->lang"); } - print_footer('none'); + print_footer('upgrade'); die; } $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.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, "", upgrade_get_javascript(), false, " ", " "); if (!$DB->setup_is_unicodedb()) { if (!$DB->change_db_encoding()) { @@ -205,7 +206,7 @@ print_header($strdatabasechecking, $stradministration, $navigation, "", "", false, " ", " "); notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php'); - print_footer('none'); + print_footer('upgrade'); exit; } else if (empty($confirmrelease)){ @@ -228,10 +229,10 @@ print_string('langpackwillbeupdated', 'admin'); print_box_end(); } - print_continue('index.php?confirmupgrade=1&confirmrelease=1'); + print_continue('index.php?confirmupgrade=1&confirmrelease=1'); } - print_footer('none'); + print_footer('upgrade'); die; } elseif (empty($confirmplugins)) { @@ -323,7 +324,7 @@ set_config('rolesactive', 1); set_config('adminsetuppending', 1); // we neeed this redirect to setup proper session - upgrade_finished("index.php?sessionstarted=1&lang=$CFG->lang"); + upgrade_finished("index.php?sessionstarted=1&lang=$CFG->lang"); } /// make sure admin user is created - this is the last step because we need diff --git a/install.php b/install.php index f0faa531a5..f39e91bb1f 100644 --- a/install.php +++ b/install.php @@ -133,7 +133,7 @@ require_once($CFG->libdir.'/xmlize.php'); require_once($CFG->libdir.'/componentlib.class.php'); require('version.php'); -$CFG->release = $release; +$CFG->target_release = $release; $SESSION = new object(); $SESSION->lang = $CFG->lang; diff --git a/lib/installlib.php b/lib/installlib.php index 49a0cfc963..391b6f41a8 100644 --- a/lib/installlib.php +++ b/lib/installlib.php @@ -191,7 +191,7 @@ function install_print_header($config, $stagename, $heading, $stagetext) { } echo ' - '.get_string('installation','install').' - Moodle '.$CFG->release.' + '.get_string('installation','install').' - Moodle '.$CFG->target_release.' '; @@ -247,7 +247,7 @@ function install_print_footer($config, $reload=false) { echo ''; $homelink = ''; echo ''; diff --git a/lib/upgradelib.php b/lib/upgradelib.php index de1dc47fbe..4761b11d53 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -760,7 +760,7 @@ function upgrade_started($preinstall=false) { if (!CLI_SCRIPT and !defined('HEADER_PRINTED')) { $strupgrade = get_string('upgradingversion', 'admin'); - print_header($strupgrade, $strupgrade, + print_header($strupgrade.' - Moodle '.$CFG->target_release, $strupgrade, build_navigation(array(array('name' => $strupgrade, 'link' => null, 'type' => 'misc'))), '', upgrade_get_javascript(), false, ' ', ' '); } @@ -794,7 +794,7 @@ function upgrade_finished($continueurl=null) { ignore_user_abort(false); if ($continueurl) { print_continue($continueurl); - print_footer('none'); + print_footer('upgrade'); die; } } diff --git a/lib/weblib.php b/lib/weblib.php index 6bce8def58..39c740c225 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2889,9 +2889,16 @@ function print_footer($course=NULL, $usercourse=NULL, $return=false) { $course = $SITE; $homelink = ''; + 'moodlelogo'; $home = true; + } else if ($course === 'upgrade') { + $home = false; + $loggedinas = ''; + $homelink = ''; + } else { $homelink = ''; -- 2.39.5