summaryrefslogtreecommitdiffstats
path: root/lib/themes.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/themes.php')
-rw-r--r--lib/themes.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/themes.php b/lib/themes.php
index f2f27740..d7b23ace 100644
--- a/lib/themes.php
+++ b/lib/themes.php
@@ -20,31 +20,32 @@
*/
-/*!
- @function get_themes()
- @discussion this looks in /themes and pulls all of the
- theme.cfg.php files it can find and returns an
- array of the results
-*/
+/**
+ * get_themes
+ * this looks in /themes and pulls all of the
+ * theme.cfg.php files it can find and returns an
+ * array of the results
+ */
function get_themes() {
/* Open the themes dir and start reading it */
- $handle = @opendir(conf('prefix') . "/themes");
+ $handle = @opendir(Config::get('prefix') . '/themes');
if (!is_resource($handle)) {
- debug_event('theme',"Error unable to open Themes Directory",'2');
+ debug_event('theme',"Error unable to open Themes Directory",'2');
+ return array();
}
$results = array();
while ($file = readdir($handle)) {
- $full_file = conf('prefix') . "/themes/" . $file;
+ $full_file = Config::get('prefix') . '/themes/' . $file;
/* See if it's a directory */
if (is_dir($full_file) AND substr($file,0,1) != ".") {
- $config_file = $full_file . "/theme.cfg.php";
+ $config_file = $full_file . '/theme.cfg.php';
/* Open the theme.cfg.php file */
- $r = read_config($config_file);
+ $r = @parse_ini_file($config_file);
$r['path'] = $file;
$name = $r['name'];
$results[$name] = $r;