summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-14 07:04:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-14 07:04:26 +0000
commitd1dcfcbc903153007fff2c155248046ecfbdc76a (patch)
tree400ed80dd1ce436818c893bb5f53d4b9d95443ec /admin
parentf2f82cae3114683dd230328a4638b8cb35b46c3b (diff)
downloadampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.tar.gz
ampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.tar.bz2
ampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.zip
some fixes for the localplay, you can now install the MPD controller, and add instances, just not actually play to it... realized I need to think on how to do that a little...
Diffstat (limited to 'admin')
-rw-r--r--admin/modules.php34
1 files changed, 9 insertions, 25 deletions
diff --git a/admin/modules.php b/admin/modules.php
index d5eb3db9..42f82ef5 100644
--- a/admin/modules.php
+++ b/admin/modules.php
@@ -32,32 +32,16 @@ if (!$GLOBALS['user']->has_access(100)) {
show_header();
switch ($_REQUEST['action']) {
- case 'insert_localplay_preferences':
- $type = scrub_in($_REQUEST['type']);
- insert_localplay_preferences($type);
- $url = conf('web_path') . '/admin/preferences.php?tab=modules';
- $title = _('Module Activated');
- $body = '';
- show_confirmation($title,$body,$url);
- break;
- case 'confirm_remove_localplay_preferences':
- $type = scrub_in($_REQUEST['type']);
- $url = conf('web_path') . '/admin/modules.php?action=remove_localplay_preferences&amp;type=' . $type;
- $title = _('Are you sure you want to remove this module?');
- $body = '';
- show_confirmation($title,$body,$url,1);
- break;
- case 'remove_localplay_preferences':
- $type = scrub_in($_REQUEST['type']);
- remove_localplay_preferences($type);
- $url = conf('web_path') . '/admin/preferences.php?tab=modules';
- $title = _('Module Deactivated');
- $body = '';
- show_confirmation($title,$body,$url);
- break;
case 'install_localplay':
-
-
+ $localplay = new Localplay($_REQUEST['type']);
+ if (!$localplay->player_loaded()) {
+ Error::add('general',_('Install Failed, Controller Error'));
+ Error::display('general');
+ break;
+ }
+ // Install it!
+ $localplay->install();
+ header("Location:" . Config::get('web_path') . '/admin/modules.php?action=show_localplay');
break;
case 'confirm_uninstall_localplay':