X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=22413f414ee552b5ba3a535222d27384bdb90887;hb=a540f994f3478529b1dc2ac78535cae774ba5af0;hp=3445a319f8f9202fee4b8a41412d61fe119394e3;hpb=deb25c8f038fb468935c920c2c6f2c61b3e72ece;p=squirrelmail.git diff --git a/functions/page_header.php b/functions/page_header.php index 3445a319..22413f41 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -5,7 +5,7 @@ * * Prints the page header (duh) * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -32,8 +32,9 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE if ( !sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) { global $base_uri; } - global $theme_css, $custom_css, $pageheader_sent, $theme, $theme_default, $text_direction, - $default_fontset, $chosen_fontset, $default_fontsize, $chosen_fontsize, $chosen_theme; + global $custom_css, $pageheader_sent, $theme, $theme_default, $text_direction, + $default_fontset, $chosen_fontset, $default_fontsize, $chosen_fontsize, + $chosen_theme, $chosen_theme_path, $user_themes, $user_theme_default; /* add no cache headers here */ //FIXME: should change all header() calls in SM core to use $oTemplate->header()!! @@ -45,40 +46,49 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE $header_tags = ''; - $header_tags .= "\n"; + $header_tags .= "\n"; $used_fontset = (!empty($chosen_fontset) ? $chosen_fontset : $default_fontset); $used_fontsize = (!empty($chosen_fontsize) ? $chosen_fontsize : $default_fontsize); - $used_theme = basename((!empty($chosen_theme) ? $chosen_theme : $theme[$theme_default]['PATH']),'.php'); - + $used_theme = !isset($chosen_theme) && $user_theme_default != 'none' && is_dir($chosen_theme) && is_readable($chosen_theme)? $user_themes[$user_theme_default]['PATH'].'/default.css' : $chosen_theme_path; + /** * Stylesheets are loaded in the following order: * 1) All stylesheets provided by the template. Normally, these are - * stylsheets in $sTplDir/css/. This is accomplished by calling + * stylsheets in templates/