From 78590d7d512ada604987fdcc9c31a8c74591f64b Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 9 Oct 2006 05:46:40 +0000 Subject: fixed a problem with preferences showing disabled localplay modules, included sajax library --- lib/class/localplay.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/class/localplay.class.php') 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; -- cgit