diff options
Diffstat (limited to 'lib/themes.php')
-rw-r--r-- | lib/themes.php | 4 |
1 files changed, 3 insertions, 1 deletions
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; |