Commit 47ea115a authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

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

parents d2ff5a09 64cad1eb
...@@ -120,6 +120,7 @@ else { ...@@ -120,6 +120,7 @@ else {
// shouldn't upgrade plugins past the version that was current at the // shouldn't upgrade plugins past the version that was current at the
// time the core upgrade was written. // time the core upgrade was written.
$data['error'] = false; $data['error'] = false;
$data['done'] = true;
$data['message'] = get_string('nothingtoupgrade','admin'); $data['message'] = get_string('nothingtoupgrade','admin');
if (param_boolean('last', false)) { if (param_boolean('last', false)) {
delete_records('config', 'field', '_upgrade'); delete_records('config', 'field', '_upgrade');
......
...@@ -88,6 +88,7 @@ if (empty($upgrades['core']->install)) { ...@@ -88,6 +88,7 @@ if (empty($upgrades['core']->install)) {
$loadingicon = $THEME->get_image_url('loading'); $loadingicon = $THEME->get_image_url('loading');
$successicon = $THEME->get_image_url('success'); $successicon = $THEME->get_image_url('success');
$failureicon = $THEME->get_image_url('failure'); $failureicon = $THEME->get_image_url('failure');
$warningicon = $THEME->get_image_url('warning');
// Remove all files in the smarty and dwoo caches // Remove all files in the smarty and dwoo caches
// TODO post 1.2 remove the smarty part // TODO post 1.2 remove the smarty part
...@@ -172,6 +173,10 @@ $js = <<< EOJS ...@@ -172,6 +173,10 @@ $js = <<< EOJS
message += data.newversion ? data.newversion : ''; message += data.newversion ? data.newversion : '';
$(data.key).innerHTML = '<img src="{$successicon}" alt=":)" /> ' + message; $(data.key).innerHTML = '<img src="{$successicon}" alt=":)" /> ' + message;
} }
else if (data.done) {
message = data.message;
$(data.key).innerHTML = '<img src="{$warningicon}" alt=":|" /> ' + message;
}
else { else {
message = data.message; message = data.message;
$(data.key).innerHTML = '<img src="{$failureicon}" alt=":(" /> ' + 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