From: tokul Date: Sun, 5 Feb 2006 08:31:04 +0000 (+0000) Subject: doctype switched from quirks to standards compliance mode X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d88941c7b900f87e04674c9d61ebcf9dff8d44eb;p=squirrelmail.git doctype switched from quirks to standards compliance mode added template arguments to style.php stylesheet added loading of default style values when user values are not set are set. fixed theme_css test git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10637 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/page_header.php b/functions/page_header.php index e718772b..d3385bb4 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -31,51 +31,49 @@ include_once(SM_PATH . 'class/template/template.class.php'); * @param string xtra extra HTML to insert into the header * @param bool do_hook whether to execute hooks, default true * @param bool frames generate html frameset doctype (since 1.5.1) - * @param bool style use style.php CSS, default true (since 1.5.1) * @return void */ -function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE, $frames = FALSE, $style = TRUE ) { +function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE, $frames = FALSE ) { global $squirrelmail_language, $sTplDir; if ( !sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) { global $base_uri; } - global $theme_css, $custom_css, $pageheader_sent, - $chosen_fontset, $chosen_fontsize, $chosen_theme; + global $theme_css, $custom_css, $pageheader_sent, $theme, $theme_default, + $default_fontset, $chosen_fontset, $default_fontsize, $chosen_fontsize, $chosen_theme; /* add no cache headers here */ header('Pragma: no-cache'); // http 1.0 (rfc1945) header('Cache-Control: private, no-cache, no-store'); // http 1.1 (rfc2616) if ($frames) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } echo "\n" . html_tag( 'html' ,'' , '', '', 'lang="'.$squirrelmail_language.'"' ) . "\n\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 = basename($chosen_theme,'.php'); - - /* - * The $style parameter is needed since style.php breaks the login otherwise. - * This can be removed when style.php doesn't depend on a logged in user. - */ - if ($style) { /* * Add closing / to link and meta elements only after switching to xhtml 1.0 Transitional. * It is not compatible with html 4.01 Transitional */ - echo '\n"; - } + echo '\n"; + // load custom style sheet (deprecated) - if ( !isset( $theme_css ) || empty($theme_css) ) { - echo ""; + if ( ! empty($theme_css) ) { + echo "\n"; } if ($squirrelmail_language == 'ja_JP') {