- Patch #13148 by Morbus: further base path fixes / clean-ups.

4.7.x
Dries Buytaert 2006-01-30 21:32:09 +00:00
parent 8b8a585ab2
commit 4ffb77baae
2 changed files with 9 additions and 8 deletions

View File

@ -308,19 +308,19 @@ function theme_get_setting($setting_name, $refresh = FALSE) {
} }
if ($settings['toggle_favicon']) { if ($settings['toggle_favicon']) {
$settings['favicon'] = $base_path;
if ($settings['default_favicon']) { if ($settings['default_favicon']) {
if (file_exists($favicon = dirname($theme_object->filename) .'/favicon.ico')) { if (file_exists($favicon = dirname($theme_object->filename) .'/favicon.ico')) {
$settings['favicon'] = $favicon; $settings['favicon'] .= $favicon;
} }
else { else {
$settings['favicon'] = 'misc/favicon.ico'; $settings['favicon'] .= 'misc/favicon.ico';
} }
} }
elseif ($settings['favicon_path']) { elseif ($settings['favicon_path']) {
$settings['favicon'] = $settings['favicon_path']; $settings['favicon'] .= $settings['favicon_path'];
} }
} }
} }
return isset($settings[$setting_name]) ? $settings[$setting_name] : NULL; return isset($settings[$setting_name]) ? $settings[$setting_name] : NULL;
@ -427,9 +427,10 @@ function theme_page($content) {
} }
function theme_maintenance_page($content) { function theme_maintenance_page($content) {
global $base_path;
drupal_set_header('Content-Type: text/html; charset=utf-8'); drupal_set_header('Content-Type: text/html; charset=utf-8');
theme('add_style', 'misc/maintenance.css'); theme('add_style', 'misc/maintenance.css');
drupal_set_html_head('<link rel="shortcut icon" href="misc/favicon.ico" type="image/x-icon" />'); drupal_set_html_head('<link rel="shortcut icon" href="'. $base_path .'misc/favicon.ico" type="image/x-icon" />');
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
$output .= '<html xmlns="http://www.w3.org/1999/xhtml">'; $output .= '<html xmlns="http://www.w3.org/1999/xhtml">';
$output .= '<head>'; $output .= '<head>';
@ -634,7 +635,6 @@ function theme_form_element($title, $value, $description = NULL, $id = NULL, $re
return $output; return $output;
} }
/** /**
* Return a themed submenu, typically displayed under the tabs. * Return a themed submenu, typically displayed under the tabs.
* *

View File

@ -22,6 +22,7 @@ function chameleon_regions() {
} }
function chameleon_page($content) { function chameleon_page($content) {
global $base_path;
$language = $GLOBALS['locale']; $language = $GLOBALS['locale'];
if (theme_get_setting('toggle_favicon')) { if (theme_get_setting('toggle_favicon')) {
@ -35,14 +36,14 @@ function chameleon_page($content) {
$output .= "<head>\n"; $output .= "<head>\n";
$output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n"; $output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";
$output .= drupal_get_html_head(); $output .= drupal_get_html_head();
$output .= " <link rel=\"stylesheet\" type=\"text/css\" href=\"themes/chameleon/common.css\" />\n"; theme('add_style', 'themes/chameleon/common.css');
$output .= theme_get_styles(); $output .= theme_get_styles();
$output .= "</head>"; $output .= "</head>";
$output .= "<body>\n"; $output .= "<body>\n";
$output .= " <div id=\"header\">"; $output .= " <div id=\"header\">";
if ($logo = theme_get_setting('logo')) { if ($logo = theme_get_setting('logo')) {
$output .= " <a href=\"./\" title=\"Home\"><img src=\"$logo\" alt=\"Home\" /></a>"; $output .= " <a href=\"$base_path\" title=\"Home\"><img src=\"$logo\" alt=\"Home\" /></a>";
} }
if (theme_get_setting('toggle_name')) { if (theme_get_setting('toggle_name')) {
$output .= " <h1 class=\"site-name title\">". l(variable_get('site_name', 'drupal'), ""). "</h1>"; $output .= " <h1 class=\"site-name title\">". l(variable_get('site_name', 'drupal'), ""). "</h1>";