From: Brion Vibber Date: Fri, 12 Nov 2004 09:34:11 +0000 (+0000) Subject: (bug 26) Defer sending cache headers until the skin runs, so that the skin can declar... X-Git-Tag: 1.5.0alpha1~1374 X-Git-Url: http://git.cyclocoop.org/%27-%20%20.%20url_absolue%28find_in_path%28%27spip_style.css%27%29%29%20%20%20.%20url_absolue%28find_in_path%28%27prive/spip_style.css%27%29%29%20.%20%27?a=commitdiff_plain;h=835bbd306b4dc34021c51307cd3aa464947bbe6b;p=lhc%2Fweb%2Fwiklou.git (bug 26) Defer sending cache headers until the skin runs, so that the skin can declare the page as uncacheable --- 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 ) {