From 835bbd306b4dc34021c51307cd3aa464947bbe6b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 12 Nov 2004 09:34:11 +0000 Subject: [PATCH] (bug 26) Defer sending cache headers until the skin runs, so that the skin can declare the page as uncacheable --- includes/OutputPage.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 9177c31ee5..64035761b2 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -382,7 +382,9 @@ class OutputPage { } - $this->sendCacheControl(); + # Buffer output; final headers may depend on later processing + ob_start(); + $this->transformBuffer(); # Disable temporary placeholders, so that the skin produces HTML @@ -397,7 +399,9 @@ class OutputPage { } $sk->outputPage( $this ); - # flush(); + + $this->sendCacheControl(); + ob_end_flush(); } function out( $ins ) { -- 2.20.1