Merge pull request #4172 from dokuwiki/updatemessage
show update message in Extension Manager if available
This commit is contained in:
commit
9ada0a85a2
|
@ -438,6 +438,16 @@ class helper_plugin_extension_extension extends Plugin
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text of the update message if there is any
|
||||
*
|
||||
* @return string|bool The update message if there is any, false otherwise
|
||||
*/
|
||||
public function getUpdateMessage()
|
||||
{
|
||||
if (!empty($this->remoteInfo['updatemessage'])) return $this->remoteInfo['updatemessage'];
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text of the security warning if there is any
|
||||
|
|
|
@ -392,6 +392,11 @@ class helper_plugin_extension_list extends Plugin
|
|||
sprintf($this->getLang('security_warning'), '<bdi>' . hsc($securitywarning) . '</bdi>') .
|
||||
'</div>';
|
||||
}
|
||||
if (($updateMessage = $extension->getUpdateMessage()) !== false) {
|
||||
$html .= '<div class="msg notify">' .
|
||||
sprintf($this->getLang('update_message'), '<bdi>' . hsc($updateMessage) . '</bdi>') .
|
||||
'</div>';
|
||||
}
|
||||
if ($extension->updateAvailable()) {
|
||||
$html .= '<div class="msg notify">' .
|
||||
sprintf($this->getLang('update_available'), hsc($extension->getLastUpdate())) .
|
||||
|
|
|
@ -81,6 +81,7 @@ $lang['msg_nooverwrite'] = 'Extension %s already exists so it is no
|
|||
$lang['missing_dependency'] = '<strong>Missing or disabled dependency:</strong> %s';
|
||||
$lang['security_issue'] = '<strong>Security Issue:</strong> %s';
|
||||
$lang['security_warning'] = '<strong>Security Warning:</strong> %s';
|
||||
$lang['update_message'] = '<strong>Update Message:</strong> %s';
|
||||
$lang['update_available'] = '<strong>Update:</strong> New version %s is available.';
|
||||
$lang['wrong_folder'] = '<strong>Plugin installed incorrectly:</strong> Rename plugin directory "%s" to "%s".';
|
||||
$lang['url_change'] = '<strong>URL changed:</strong> Download URL has changed since last download. Check if the new URL is valid before updating the extension.<br />New: %s<br />Old: %s';
|
||||
|
|
Loading…
Reference in New Issue