Permalink
Browse files

MDL-26609 Display information about the current version during the up…

…grade

As Eloy Lafuente noticed in the tracker discussion, we display the
information about the current version in the browser window title but
not at the screen itself. The patch fixes that by displaying the
information in the page heading instead of the page title.

Eloy's original idea to put the information into the grey message box
would require a change of [upgradesure,core_admin] string because
unfortunately it does not expect $a as an object but as a plain string.
  • Loading branch information...
1 parent dc41abd commit 1a4d6a5b605c0b28fa1298f56f48fe80b4ee4b23 @mudrd8mz mudrd8mz committed Mar 3, 2011
Showing with 13 additions and 6 deletions.
  1. +8 −0 admin/cli/upgrade.php
  2. +4 −5 admin/index.php
  3. +1 −1 lang/en/moodle.php
@@ -90,6 +90,7 @@
cli_error(get_string('downgradedcore', 'error'));
}
+$oldversion = "$CFG->release ($CFG->version)";
$newversion = "$release ($version)";
// test environment first
@@ -103,6 +104,13 @@
exit(1);
}
+if ($interactive) {
+ $a = new stdClass();
+ $a->oldversion = $oldversion;
+ $a->newversion = $newversion;
+ echo cli_heading(get_string('databasechecking', '', $a)) . PHP_EOL;
+}
+
// make sure we are upgrading to a stable release or display a warning
if (isset($maturity)) {
if (($maturity < MATURITY_STABLE) and !$options['allow-unstable']) {
View
@@ -130,8 +130,8 @@
if (empty($confirmrelease)) {
$strcurrentrelease = get_string('currentrelease');
$PAGE->navbar->add($strcurrentrelease);
- $PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
- $PAGE->set_heading($strinstallation);
+ $PAGE->set_title($strinstallation);
+ $PAGE->set_heading($strinstallation . ' - Moodle ' . $CFG->target_release);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading("Moodle $release");
@@ -201,9 +201,8 @@
$strdatabasechecking = get_string('databasechecking', '', $a);
if (empty($confirmupgrade)) {
- $PAGE->navbar->add($strdatabasechecking);
- $PAGE->set_title($strdatabasechecking);
- $PAGE->set_heading($stradministration);
+ $PAGE->set_title($stradministration);
+ $PAGE->set_heading($strdatabasechecking);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
if (isset($maturity)) {
View
@@ -386,7 +386,7 @@
$string['currentpicture'] = 'Current picture';
$string['currentrelease'] = 'Current release information';
$string['currentversion'] = 'Current version';
-$string['databasechecking'] = 'Upgrading Moodle database from version {$a->oldversion} to {$a->newversion}...';
+$string['databasechecking'] = 'Upgrading Moodle database from version {$a->oldversion} to {$a->newversion}';
$string['databaseperformance'] = 'Database performance';
$string['databasesetup'] = 'Setting up database';
$string['databasesuccess'] = 'Database was successfully upgraded';

0 comments on commit 1a4d6a5

Please sign in to comment.