summaryrefslogtreecommitdiffstats
path: root/templates/show_plugins.inc.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-22 19:00:45 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-06-22 19:00:45 +0000
commita66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43 (patch)
tree0eb8916039977a20e44260ab8fe522eae1522376 /templates/show_plugins.inc.php
parent91eab2086875ad35aa93af00fc8b37d039d9f93c (diff)
downloadampache-a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43.tar.gz
ampache-a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43.tar.bz2
ampache-a66bf4c5f663d16d6c2ceb4a6cb0a85f642dde43.zip
Plugin work. Plugins are now pluggable: no plugin-specific code in the main Ampache
code. Plugins are now updatable, if configuration changes are needed for a new version.
Diffstat (limited to 'templates/show_plugins.inc.php')
-rw-r--r--templates/show_plugins.inc.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/templates/show_plugins.inc.php b/templates/show_plugins.inc.php
index 7606808e..fa818246 100644
--- a/templates/show_plugins.inc.php
+++ b/templates/show_plugins.inc.php
@@ -33,24 +33,32 @@ $web_path = Config::get('web_path');
<th class="cel_name"><?php echo _('Name'); ?></th>
<th class="cel_description"><?php echo _('Description'); ?></th>
<th class="cel_version"><?php echo _('Version'); ?></th>
+ <th class="cel_iversion"><?php echo _('Installed Version'); ?></th>
<th class="cel_action"><?php echo _('Action'); ?></th>
</tr>
<?php
foreach ($plugins as $plugin_name) {
$plugin = new Plugin($plugin_name);
- if (!Plugin::is_installed($plugin->_plugin->name)) {
+ $installed_version = Plugin::get_plugin_version($plugin->_plugin->name);
+ if (! $installed_version) {
$action = "<a href=\"" . $web_path . "/admin/modules.php?action=install_plugin&amp;plugin=" . scrub_out($plugin_name) . "\">" .
_('Activate') . "</a>";
}
else {
$action = "<a href=\"" . $web_path . "/admin/modules.php?action=confirm_uninstall_plugin&amp;plugin=" . scrub_out($plugin_name) . "\">" .
_('Deactivate') . "</a>";
+ if ($installed_version < $plugin->_plugin->version) {
+ $action .= '&nbsp;&nbsp;<a href="' . $web_path .
+ '/admin/modules.php?action=upgrade_plugin&amp;plugin=' .
+ scrub_out($plugin_name) . '">' . _('Upgrade') . '</a>';
+ }
}
?>
<tr class="<?php echo flip_class(); ?>">
<td class="cel_name"><?php echo scrub_out($plugin->_plugin->name); ?></td>
<td class="cel_description"><?php echo scrub_out($plugin->_plugin->description); ?></td>
<td class="cel_version"><?php echo scrub_out($plugin->_plugin->version); ?></td>
+ <td class="cel_iversion"><?php echo scrub_out($installed_version); ?></td>
<td class="cel_action"><?php echo $action; ?></td>
</tr>
<?php } if (!count($plugins)) { ?>