]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14924 the same title now used on each upgrade/install page (Moodle - 2.0...)...
authorskodak <skodak>
Sat, 7 Feb 2009 17:56:40 +0000 (17:56 +0000)
committerskodak <skodak>
Sat, 7 Feb 2009 17:56:40 +0000 (17:56 +0000)
admin/index.php
install.php
lib/installlib.php
lib/upgradelib.php
lib/weblib.php

index fbe01e2842b985aafee45c2e624a9f647e7cf0dd..57f8adf46b968c0e87d5144a20d0e893362dbdd3 100644 (file)
@@ -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
         if (empty($agreelicense)) {
             $strlicense = get_string('license');
             $navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc')));
-            print_header($strinstallation, $strinstallation, $navigation, "", "", false, "&nbsp;", "&nbsp;");
+            print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, "", "", false, "&nbsp;", "&nbsp;");
             print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
             print_heading(get_string('copyrightnotice'));
             $copyrightnotice = text_to_html(get_string('gpl'));
             echo "<br />";
             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, "&nbsp;", "&nbsp;");
+            print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, "", "", false, "&nbsp;", "&nbsp;");
             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
 
             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&amp;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&amp;confirmrelease=1&amp;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, "&nbsp;", "&nbsp;");
+        print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, "", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
 
         if (!$DB->setup_is_unicodedb()) {
             if (!$DB->change_db_encoding()) {
             print_header($strdatabasechecking, $stradministration, $navigation, "", "", false, "&nbsp;", "&nbsp;");
 
             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)){
                     print_string('langpackwillbeupdated', 'admin');
                     print_box_end();
                 }
-                print_continue('index.php?confirmupgrade=1&confirmrelease=1');
+                print_continue('index.php?confirmupgrade=1&amp;confirmrelease=1');
             }
 
-            print_footer('none');
+            print_footer('upgrade');
             die;
 
         } elseif (empty($confirmplugins)) {
         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&amp;lang=$CFG->lang");
     }
 
 /// make sure admin user is created - this is the last step because we need
index f0faa531a564b07ddce92c45ed4403ee6cefefd7..f39e91bb1fe63229fe3b4b938ee1ad81b2038e90 100644 (file)
@@ -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;
index 49a0cfc963387e1ee45071f895429d8536e6d5aa..391b6f41a80af611aff2a4f5bbfcae346f7d4f89 100644 (file)
@@ -191,7 +191,7 @@ function install_print_header($config, $stagename, $heading, $stagetext) {
     }
 
     echo '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/install.php?css=1" />
-          <title>'.get_string('installation','install').' - Moodle '.$CFG->release.'</title>
+          <title>'.get_string('installation','install').' - Moodle '.$CFG->target_release.'</title>
           <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
           <meta http-equiv="pragma" content="no-cache" />
           <meta http-equiv="expires" content="0" />';
@@ -247,7 +247,7 @@ function install_print_footer($config, $reload=false) {
     echo '</fieldset><fieldset id="nav_buttons">'.$first.$next.'</fieldset>';
 
     $homelink  = '<div class="sitelink">'.
-       '<a title="Moodle '. $CFG->release .'" href="http://docs.moodle.org/en/Administrator_documentation" onclick="this.target=\'_blank\'">'.
+       '<a title="Moodle '. $CFG->target_release .'" href="http://docs.moodle.org/en/Administrator_documentation" onclick="this.target=\'_blank\'">'.
        '<img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
 
     echo '</form></div>';
index de1dc47fbea0bb84580b536d68d0b2d98f4f8ed8..4761b11d53b3edf2ea3dd02116b9f87c0507a24d 100644 (file)
@@ -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, '&nbsp;', '&nbsp;');
         }
@@ -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;
         }
     }
index 6bce8def585d657de3dca33856b526216eca7875..39c740c22587ee2f72f08d556a6d4aa5f8678e83 100644 (file)
@@ -2889,9 +2889,16 @@ function print_footer($course=NULL, $usercourse=NULL, $return=false) {
             $course = $SITE;
             $homelink  = '<div class="sitelink">'.
                '<a title="Moodle '. $CFG->release .'" href="http://moodle.org/">'.
-               '<img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
+               '<img style="width:100px;height:30px" src="'.$CFG->wwwroot.'/pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
             $home  = true;
 
+        } else if ($course === 'upgrade') {
+            $home = false;
+            $loggedinas = '';
+            $homelink  = '<div class="sitelink">'.
+               '<a title="Moodle '. $CFG->target_release .'" href="http://docs.moodle.org/en/Administrator_documentation" onclick="this.target=\'_blank\'">'.
+               '<img style="width:100px;height:30px" src="'.$CFG->wwwroot.'/pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
+
         } else {
             $homelink = '<div class="homelink"><a '.$CFG->frametarget.' href="'.$CFG->wwwroot.
                         '/course/view.php?id='.$course->id.'">'.format_string($course->shortname).'</a></div>';