Show a warning in the ugprader when plugins are not current (#477)

This commit is contained in:
onli 2020-05-29 11:25:24 +02:00
parent 2be8e6ba2a
commit 17761c6214
2 changed files with 11 additions and 1 deletions

View File

@ -453,7 +453,13 @@ if (($showAbort && $serendipity['GET']['action'] == 'ignore') || $serendipity['G
}
}
$data['showWritableNote'] = $showWritableNote;
$data['upgraderResultDiagnosePlugins'] = array();
serendipity_plugin_api::hook_event('backend_plugins_upgradecount', $pluginUpdates);
if (empty($pluginUpdates)) {
$data['upgraderResultDiagnosePlugins'][] = serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, 'Plugins current');
} else {
$data['upgraderResultDiagnosePlugins'][] = serendipity_upgraderResultDiagnose(S9Y_U_WARNING, 'Plugin updates available');
}
$data['errorCount'] = $errorCount;
if ($errorCount < 1) {

View File

@ -118,6 +118,10 @@
{if $showWritableNote}
<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</span>
{/if}
<h4>Plugins</h4>
{$upgraderResultDiagnosePlugins[0]}
{if ($errorCount > 0)}
<span class="msg_error"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.PROBLEM_DIAGNOSTIC}</span>