Commit 64cad1eb authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Show warning icon when plugin has nothing to upgrade (Bug 1445280)



This can happen when we force plugin to install as part of core upgrade

Change-Id: Id29c71982a70ebf2e61121851972f1f87c2717b1
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 5cdd1f45
......@@ -120,6 +120,7 @@ else {
// shouldn't upgrade plugins past the version that was current at the
// time the core upgrade was written.
$data['error'] = false;
$data['done'] = true;
$data['message'] = get_string('nothingtoupgrade','admin');
if (param_boolean('last', false)) {
delete_records('config', 'field', '_upgrade');
......
......@@ -88,6 +88,7 @@ if (empty($upgrades['core']->install)) {
$loadingicon = $THEME->get_image_url('loading');
$successicon = $THEME->get_image_url('success');
$failureicon = $THEME->get_image_url('failure');
$warningicon = $THEME->get_image_url('warning');
// Remove all files in the smarty and dwoo caches
// TODO post 1.2 remove the smarty part
......@@ -174,6 +175,10 @@ $js = <<< EOJS
message += data.newversion ? data.newversion : '';
$(data.key).innerHTML = '<img src="{$successicon}" alt=":)" /> ' + message;
}
else if (data.done) {
message = data.message;
$(data.key).innerHTML = '<img src="{$warningicon}" alt=":|" /> ' + message;
}
else {
message = data.message;
$(data.key).innerHTML = '<img src="{$failureicon}" alt=":(" /> ' + message;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment