summaryrefslogtreecommitdiffstats
path: root/admin/modules.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-26 20:28:46 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-26 20:28:46 +0000
commit9c8be228a73a602ac3e91e30bf980dd1cc695a81 (patch)
tree46b3b2dc825f652410aba04f2d148b566e5b61e5 /admin/modules.php
parenta41697ea25a58ea5db5ed46a251fb62364626b1b (diff)
downloadampache-9c8be228a73a602ac3e91e30bf980dd1cc695a81.tar.gz
ampache-9c8be228a73a602ac3e91e30bf980dd1cc695a81.tar.bz2
ampache-9c8be228a73a602ac3e91e30bf980dd1cc695a81.zip
playlist switcher, plugin interface and the shell of a lastfm plugin (need patch file)
Diffstat (limited to 'admin/modules.php')
-rw-r--r--admin/modules.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/admin/modules.php b/admin/modules.php
index 5dde981c..7e070610 100644
--- a/admin/modules.php
+++ b/admin/modules.php
@@ -57,6 +57,48 @@ switch ($action) {
$body = '';
show_confirmation($title,$body,$url);
break;
+ case 'install_plugin':
+ /* Verify that this plugin exists */
+ $plugins = get_plugins();
+ if (!array_key_exists($_REQUEST['plugin'],$plugins)) {
+ debug_event('plugins','Error: Invalid Plugin: ' . $_REQUEST['plugin'] . ' selected','1');
+ break;
+ }
+ $plugin = new Plugin($_REQUEST['plugin']);
+ $plugin->install();
+
+ /* Show Confirmation */
+ $url = conf('web_path') . '/admin/modules.php';
+ $title = _('Plugin Activated');
+ $body = '';
+ show_confirmation($title,$body,$url);
+ break;
+ case 'confirm_uninstall_plugin':
+ $plugin = scrub_in($_REQUEST['plugin']);
+ $url = conf('web_path') . '/admin/modules.php?action=uninstall_plugin&amp;plugin=' . $plugin;
+ $title = _('Are you sure you want to remove this plugin?');
+ $body = '';
+ show_confirmation($title,$body,$url,1);
+ break;
+ case 'uninstall_plugin':
+ /* Verify that this plugin exists */
+ $plugins = get_plugins();
+ if (!array_key_exists($_REQUEST['plugin'],$plugins)) {
+ debug_event('plugins','Error: Invalid Plugin: ' . $_REQUEST['plugin'] . ' selected','1');
+ break;
+ }
+ $plugin = new Plugin($_REQUEST['plugin']);
+ $plugin->uninstall();
+
+ /* Show Confirmation */
+ $url = conf('web_path') . '/admin/modules.php';
+ $title = _('Plugin Deactivated');
+ $body = '';
+ show_confirmation($title,$body,$url);
+ break;
+ case 'upgrade_plugin':
+
+ break;
default:
require_once (conf('prefix') . '/templates/show_modules.inc.php');
break;