summaryrefslogtreecommitdiffstats
path: root/lib/class/localplay.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-10-09 05:46:40 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-10-09 05:46:40 +0000
commit78590d7d512ada604987fdcc9c31a8c74591f64b (patch)
tree00e7cbb628f6c099cc51df7a86f85be3c5d5ca42 /lib/class/localplay.class.php
parentd885efaed4bdfbac1df06e0ff3a4fd0d46701b96 (diff)
downloadampache-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/class/localplay.class.php')
-rw-r--r--lib/class/localplay.class.php10
1 files changed, 8 insertions, 2 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;