From 97ae6568e672cd4a914355e0c41b3ccce9c73b89 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 16 Mar 2005 19:41:12 +0000 Subject: - Patch #13738 by TDobes: theme system fixes: * Fix a bug which would cause the "configure" link for styles to be broken. * Fix a bug with using drupal_get_filename for theme engines. Although this is not called anywhere in core, we should still fix it for contrib. (i.e. themes that may want to manually invoke a theme engine to create a hybrid theme) * Correct an inaccurate comment in theme.inc * Populate the default primary links with an "edit primary links" link for consistency with the secondary links * remove some unnecessary variables in the theme administration which had misleading and confusing names * replace time-consuming foreach when rendering theme admin page with a more efficient array_key_exists * usability: rather than completely removing the search box checkbox when search.module is disabled, simply disable it. (UI elements shouldn't appear/disappear.) --- includes/bootstrap.inc | 2 +- includes/theme.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 9c8781331..b60ae23c9 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -99,7 +99,7 @@ function drupal_get_filename($type, $name, $filename = NULL) { else { $config = conf_init(); $dir = (($type == 'theme_engine') ? 'themes/engines' : "${type}s"); - $file = "$name.$type"; + $file = (($type == 'theme_engine') ? "$name.engine" : "$name.$type"); foreach (array("$config/$dir/$file", "$config/$dir/$name/$file", "$dir/$file", "$dir/$name/$file") as $file) { if (file_exists($file)) { diff --git a/includes/theme.inc b/includes/theme.inc index 775ed941a..11004306b 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -55,7 +55,7 @@ function init_theme() { $theme = $user->theme && $themes[$user->theme]->status ? $user->theme : variable_get('theme_default', 'bluemarine'); // Allow modules to override the present theme... only select custom theme - // if it is available in the list of enabled themes. + // if it is available in the list of installed themes. $theme = $custom_theme && $themes[$custom_theme] ? $custom_theme : $theme; // Store the identifier for retrieving theme settings with. @@ -221,7 +221,7 @@ function path_to_theme() { */ function theme_get_settings($key = NULL) { $defaults = array( - 'primary_links' => '', + 'primary_links' => l('edit primary links', 'admin/themes/settings'), 'secondary_links' => l('edit secondary links', 'admin/themes/settings'), 'mission' => '', 'default_logo' => 1, -- cgit v1.2.3