From 951b553a9887df92d93ecc42e7e83ca568e26aae Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 9 Nov 2003 23:27:22 +0000 Subject: - Committed stage 2 of the theme system improvements! Patch by CodeMonkeyX. --- modules/system/system.module | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'modules/system/system.module') diff --git a/modules/system/system.module b/modules/system/system.module index 2b920d501..88c74db73 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -57,7 +57,7 @@ function system_link($type) { menu("admin/system", t("configuration"), "system_admin", 3); menu("admin/system/themes", t("themes"), "system_admin", 2); - foreach (theme_list(1) as $theme) { + foreach (list_themes(1) as $theme) { // NOTE: refresh the list because some themes might have been enabled/disabled. include_once "$theme->filename"; $function = $theme->name ."_settings"; @@ -81,7 +81,7 @@ function system_link($type) { function system_user($type, &$edit, $user) { $options = "\n"; - if ($type == "edit_form" && count($themes = theme_list()) > 1) { + if ($type == "edit_form" && count($themes = list_themes()) > 1) { foreach ($themes as $key => $value) { $options .= "\n"; } @@ -168,7 +168,7 @@ function system_view_module($name) { } function system_view_theme($name) { - $themes = theme_list(); + $themes = list_themes(); $theme = $themes[$name]; if ($theme) { include_once "$theme->filename"; @@ -301,16 +301,9 @@ function system_listing($type, $directory, $required = array()) { $info->description = module_invoke($file->name, "help", "admin/system/modules#description") ? module_invoke($file->name, "help", "admin/system/modules#description") : module_invoke($file->name, "system", "description"); } elseif ($type == "theme") { - $class = "Theme_$file->name"; - if (class_exists($class)) { - $theme =& new $class; - $info->name = $theme->system("name") ? $theme->system("name") : $file->name; - $info->description = $theme->system("description"); + $info->name = $file->name; + $info->description = module_invoke($file->name, "help", "admin/system/themes#description"); $themes[] = $info->name; - } - else { - unset($files[$filename]); - } } // Update the contents of the system table: -- cgit v1.2.3