Skip to content

Commit

Permalink
MDL-14924 the same title now used on each upgrade/install page (Moodl…
Browse files Browse the repository at this point in the history
…e - 2.0...) + the same footer with moodle logo now used during installation and upgrade - links to admin docs
  • Loading branch information
skodak committed Feb 7, 2009
1 parent 6724b05 commit 9ace509
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
23 changes: 12 additions & 11 deletions admin/index.php
Expand Up @@ -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
Expand Down Expand Up @@ -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("<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'));
Expand All @@ -120,33 +121,33 @@
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
print_box($releasenoteslink, 'generalbox boxaligncenter boxwidthwide');

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()) {
Expand Down Expand Up @@ -205,7 +206,7 @@
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)){
Expand All @@ -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&amp;confirmrelease=1');
}

print_footer('none');
print_footer('upgrade');
die;

} elseif (empty($confirmplugins)) {
Expand Down Expand Up @@ -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&amp;lang=$CFG->lang");
}

/// make sure admin user is created - this is the last step because we need
Expand Down
2 changes: 1 addition & 1 deletion install.php
Expand Up @@ -133,7 +133,7 @@
require_once($CFG->libdir.'/componentlib.class.php');

require('version.php');
$CFG->release = $release;
$CFG->target_release = $release;

$SESSION = new object();
$SESSION->lang = $CFG->lang;
Expand Down
4 changes: 2 additions & 2 deletions lib/installlib.php
Expand Up @@ -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" />';
Expand Down Expand Up @@ -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>';
Expand Down
4 changes: 2 additions & 2 deletions lib/upgradelib.php
Expand Up @@ -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;');
}
Expand Down Expand Up @@ -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;
}
}
Expand Down
9 changes: 8 additions & 1 deletion lib/weblib.php
Expand Up @@ -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>';
Expand Down

0 comments on commit 9ace509

Please sign in to comment.