summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-09-25 10:58:51 +0000
committerfisharebest <fisharebest@gmail.com>2010-09-25 10:58:51 +0000
commitb6acdb0ad62a7694eaafff2503d6082f843575fd (patch)
treef0964e37a8e6109b6153884477132b3792b4e166
parent5fbf28cc38593d3ed9739924baee01b3ad30223b (diff)
downloadwebtrees-b6acdb0ad62a7694eaafff2503d6082f843575fd.tar.gz
webtrees-b6acdb0ad62a7694eaafff2503d6082f843575fd.tar.bz2
webtrees-b6acdb0ad62a7694eaafff2503d6082f843575fd.zip
Move common code from themes to core - flushing output to browser after sending page headers
-rw-r--r--includes/functions/functions_print.php3
-rw-r--r--themes/clouds/header.php1
-rw-r--r--themes/colors/header.php4
-rw-r--r--themes/fab/header.php2
4 files changed, 4 insertions, 6 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index 942d29554a..668f994a7d 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -476,6 +476,9 @@ function print_header($title, $head="", $use_alternate_styles=true) {
}
$bodyOnLoad .= "\"";
require WT_ROOT.$headerfile;
+
+ // Allow the browser to format the header/menus while we generate the page
+ flush();
}
/**
diff --git a/themes/clouds/header.php b/themes/clouds/header.php
index d9f681aedd..f627e3e128 100644
--- a/themes/clouds/header.php
+++ b/themes/clouds/header.php
@@ -99,7 +99,6 @@ if ((!empty($rtl_stylesheet))&&($TEXT_DIRECTION=="rtl")) {?>
<link rel="stylesheet" href="<?php echo $rtl_stylesheet; ?>" type="text/css" media="all" />
<?php }
echo '</head><body id="body" ', $bodyOnLoad, '>';
-flush(); // Allow the browser to start fetching external stylesheets, javascript, etc.
?>
<!-- begin header section -->
diff --git a/themes/colors/header.php b/themes/colors/header.php
index 912b4a76ec..20f1d8a2dc 100644
--- a/themes/colors/header.php
+++ b/themes/colors/header.php
@@ -99,9 +99,7 @@ if ($use_alternate_styles && $BROWSERTYPE != "other") { ?>
if ((!empty($rtl_stylesheet))&&($TEXT_DIRECTION=="rtl")) {?>
<link rel="stylesheet" href="<?php echo $rtl_stylesheet; ?>" type="text/css" media="all" />
<?php }
- echo
- '</head><body id="body" ', $bodyOnLoad, '>';
-flush(); // Allow the browser to start fetching external stylesheets, javascript, etc.
+ echo '</head><body id="body" ', $bodyOnLoad, '>';
?>
<!-- Remove header for edit windows -->
diff --git a/themes/fab/header.php b/themes/fab/header.php
index 8c3a0c6fee..41c7668b9b 100644
--- a/themes/fab/header.php
+++ b/themes/fab/header.php
@@ -91,7 +91,6 @@ echo
'<link type="text/css" href="', WT_THEME_DIR, 'modules.css" rel="Stylesheet" />',
'</head>',
'<body id="body" ',$bodyOnLoad, '>';
-flush(); // Allow the browser to start fetching external stylesheets, javascript, etc.
echo '<div id="header" class="block">'; // Every page has a header
if ($view!='simple') {
@@ -171,4 +170,3 @@ if ($view!='simple') {
echo '</ul></div>';
}
echo '</div><div id="content">';
-flush(); // Allow the browser to format the header/menus while we generate the page