Commit 7655230b authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1541173: Add a generic 'deprecated' plugin option



So it can show a '- deprecated' message next tothe plugin on the
admin/extensions page.

Could be useful if other plugins become obsolete also

behatnotneeded

Change-Id: If1679e140253213f4e48d6916ed33152acc870da
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 504b0920
......@@ -42,9 +42,11 @@ foreach (array_keys($plugins) as $plugin) {
if (!safe_require_plugin($plugin, $key)) {
continue;
}
$plugins[$plugin]['installed'][$key] = array(
'active' => $i->active,
'disableable' => call_static_method(generate_class_name($plugin, $key), 'can_be_disabled'),
'deprecated' => method_exists(generate_class_name($plugin, $key), 'is_deprecated') ? call_static_method(generate_class_name($plugin, $key), 'is_deprecated') : 0,
);
if ($plugins[$plugin]['installed'][$key]['disableable'] || !$i->active) {
$plugins[$plugin]['installed'][$key]['activateform'] = activate_plugin_form($plugin, $i);
......
......@@ -291,6 +291,10 @@ EOF;
public static function can_be_disabled() {
return true;
}
public static function is_deprecated() {
return true;
}
}
class BrowserIDUser extends LiveUser {
......
......@@ -1122,6 +1122,7 @@ $string['userreportsdescription'] = 'View or download information about the user
$string['notificationssaved'] = 'Notification settings saved';
$string['onlyshowingfirst'] = 'Only showing first';
$string['resultsof'] = 'results of';
$string['deprecated'] = '- deprecated';
$string['installed'] = 'Installed';
$string['errors'] = 'Errors';
......
......@@ -35,7 +35,7 @@
{foreach from=$installed key='plugin' item='data'}
<li class="list-group-item{if !$data.active} list-group-item-warning{/if}" id="{$plugintype}.{$plugin}">
<div class="list-group-item-heading">
{$plugin}
{$plugin} {if $data.deprecated}{str tag=deprecated section=admin}{/if}
<div class="btn-group btn-group-top">
{if $data.config}
<a class="btn btn-default pull-left btn-group-item" title="{str tag='configfor'} {$plugintype} {$plugin}" href="pluginconfig.php?plugintype={$plugintype}&amp;pluginname={$plugin}">
......
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