diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-09 05:46:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-09 05:46:40 +0000 |
commit | 78590d7d512ada604987fdcc9c31a8c74591f64b (patch) | |
tree | 00e7cbb628f6c099cc51df7a86f85be3c5d5ca42 /lib | |
parent | d885efaed4bdfbac1df06e0ff3a4fd0d46701b96 (diff) | |
download | ampache-78590d7d512ada604987fdcc9c31a8c74591f64b.tar.gz ampache-78590d7d512ada604987fdcc9c31a8c74591f64b.tar.bz2 ampache-78590d7d512ada604987fdcc9c31a8c74591f64b.zip |
fixed a problem with preferences showing disabled localplay modules, included sajax library
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/localplay.class.php | 10 | ||||
-rw-r--r-- | lib/init.php | 1 | ||||
-rw-r--r-- | lib/localplay.lib.php | 5 | ||||
-rw-r--r-- | lib/preferences.php | 1 |
4 files changed, 14 insertions, 3 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index 488714ea..b9f0d8cc 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -73,6 +73,8 @@ class Localplay { */ function _load_player() { + if (!$this->type) { return false; } + $filename = conf('prefix') . '/modules/localplay/' . $this->type . '.controller.php'; $include = require_once ($filename); @@ -173,9 +175,13 @@ class Localplay { */ function connect() { - $function = $this->_function_map['connect']; - + + /* This is very bad, that means they don't even + * have a connection function defined + */ + if (!$function) { return false; } + if (!$this->_player->$function()) { debug_event('localplay','Error Unable to connect, check ' . $this->type . ' controller','1'); return false; diff --git a/lib/init.php b/lib/init.php index f76f3eb6..c07df1a8 100644 --- a/lib/init.php +++ b/lib/init.php @@ -158,6 +158,7 @@ require_once(conf('prefix') . "/modules/id3/getid3/getid3.php"); require_once(conf('prefix') . '/modules/id3/vainfo.class.php'); require_once(conf('prefix') . '/modules/amazon/Snoopy.class.php'); require_once(conf('prefix') . '/modules/amazon/AmazonSearchEngine.class.php'); +require_once(conf('prefix') . '/modules/sajax/Sajax.php'); require_once(conf('prefix') . '/lib/xmlrpc.php'); require_once(conf('prefix') . '/modules/xmlrpc/xmlrpc.inc'); diff --git a/lib/localplay.lib.php b/lib/localplay.lib.php index 523a5548..bd73853b 100644 --- a/lib/localplay.lib.php +++ b/lib/localplay.lib.php @@ -160,7 +160,10 @@ function get_localplay_controllers() { if (!is_dir($file)) { /* Get the base name, then get everything before .controller.php */ $filename = basename($file,'.controller.php'); - $results[] = $filename; + /* Make sure that it's currently enabled */ + if (verify_localplay_preferences($filename)) { + $results[] = $filename; + } } } // end while diff --git a/lib/preferences.php b/lib/preferences.php index 48430632..ba28affb 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -305,6 +305,7 @@ function create_preference_input($name,$value) { if ($value == $controller) { $is_selected = 'selected="selected"'; } echo "\t<option value=\"" . $controller . "\" $is_selected>" . ucfirst($controller) . "</option>\n"; } // end foreach + echo "\t<option value=\"\">" . _('None') . "</option>\n"; echo "</select>\n"; break; case 'localplay_level': |