From cebb21facc2e2219f1d498def8ee19bbb4b72f7e Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 16 May 2006 07:13:45 +0000 Subject: fixed mpd timeout issues and a stupid little theme config load issue --- lib/general.lib.php | 2 +- lib/localplay.lib.php | 1 - lib/themes.php | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/general.lib.php b/lib/general.lib.php index cd7757c4..1ad4a908 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -81,7 +81,7 @@ function int2ip($i) { @param $template Name of Template */ function show_template($template) { -global $myMpd, $user; + global $user; /* Check for a 'Theme' template */ if (is_readable(conf('prefix') . conf('theme_path') . "/templates/$template".".inc")) { diff --git a/lib/localplay.lib.php b/lib/localplay.lib.php index 2aa42772..523a5548 100644 --- a/lib/localplay.lib.php +++ b/lib/localplay.lib.php @@ -178,7 +178,6 @@ function get_localplay_controllers() { function init_localplay($reload=0) { static $localplay; - if ($GLOBALS['user']->prefs['localplay_level'] == '0') { return false; } if ($GLOBALS['user']->prefs['localplay_level'] == '1' AND !is_object($localplay)) { diff --git a/lib/themes.php b/lib/themes.php index 3c89a00a..5b1101b2 100644 --- a/lib/themes.php +++ b/lib/themes.php @@ -32,7 +32,7 @@ function get_themes() { $handle = @opendir(conf('prefix') . "/themes"); if (!is_resource($handle)) { - if (conf('debug')) { log_event($_SESSION['userdata']['username'],'theme',"Error unable to open Themes Directory"); } + debug_event('theme',"Error unable to open Themes Directory",'2'); } $results = array(); @@ -62,6 +62,8 @@ function get_themes() { */ function get_theme($name) { + if (strlen($name) < 1) { return false; } + $config_file = conf('prefix') . "/themes/" . $name . "/theme.cfg.php"; $results = read_config($config_file); $results['path'] = $name; -- cgit