Skip to content

Commit

Permalink
MDL-39035 admin: show old and new version after upgrade in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Apr 12, 2018
1 parent 20bf0c4 commit c3c8cc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions admin/cli/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@
cli_error(get_string('pluginschecktodo', 'admin'));
}

$a = new stdClass();
$a->oldversion = $oldversion;
$a->newversion = $newversion;

if ($interactive) {
$a = new stdClass();
$a->oldversion = $oldversion;
$a->newversion = $newversion;
echo cli_heading(get_string('databasechecking', '', $a)) . PHP_EOL;
}

Expand Down Expand Up @@ -193,5 +194,5 @@
// to immediately start browsing the site.
upgrade_themes();

echo get_string('cliupgradefinished', 'admin')."\n";
echo get_string('cliupgradefinished', 'admin', $a)."\n";
exit(0); // 0 means success
2 changes: 1 addition & 1 deletion lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
$string['cliunknowoption'] = 'Unrecognised options:
{$a}
Please use --help option.';
$string['cliupgradefinished'] = 'Command line upgrade completed successfully.';
$string['cliupgradefinished'] = 'Command line upgrade from {$a->oldversion} to {$a->newversion} completed successfully.';
$string['cliupgradenoneed'] = 'No upgrade needed for the installed version {$a}. Thanks for coming anyway!';
$string['cliyesnoprompt'] = 'type y (means yes) or n (means no)';
$string['commentsperpage'] = 'Comments displayed per page';
Expand Down

0 comments on commit c3c8cc4

Please sign in to comment.