From: Gabriel Wicke Date: Sat, 13 Mar 2004 13:43:22 +0000 (+0000) Subject: calls to setSquidMaxage for cacheable pages X-Git-Tag: 1.3.0beta1~808 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=35a86615bf2336e31a49e4f1b6efcc9b9db96b92;p=lhc%2Fweb%2Fwiklou.git calls to setSquidMaxage for cacheable pages --- diff --git a/index.php b/index.php index 4496160198..584e555bdc 100644 --- a/index.php +++ b/index.php @@ -93,6 +93,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) { wfQuery("BEGIN", DB_WRITE); switch( $action ) { case "view": + $wgOut->setSquidMaxage( $wgSquidMaxage ); + $wgArticle->$action(); + break; case "watch": case "unwatch": case "delete": @@ -115,6 +118,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) { $editor->$action(); break; case "history": + if ($_SERVER["REQUEST_URI"] == $wgTitle->getInternalURL('action=history')) { + $wgOut->setSquidMaxage( $wgSquidMaxage ); + } include_once( "PageHistory.php" ); $history = new PageHistory( $wgArticle ); $history->history(); @@ -126,6 +132,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { } $wgOut->output(); + foreach ( $wgDeferredUpdateList as $up ) { $up->doUpdate(); } logProfilingData(); wfDebug( "Request ended normally\n" );