From 35ebd33ae74db156b66cca2a3635abf2224493ed Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 17 May 2003 07:17:52 +0000 Subject: [PATCH] No cache option --- includes/OutputPage.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 8869627d43..2c8255861b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -154,6 +154,7 @@ class OutputPage { # IE 5.0 has probs with our caching return; } + if( $wgUser->getOption( "nocache" ) ) return; if( $_SERVER["HTTP_IF_MODIFIED_SINCE"] != "" ) { $ismodsince = wfUnix2Timestamp( strtotime( $_SERVER["HTTP_IF_MODIFIED_SINCE"] ) ); @@ -424,7 +425,7 @@ class OutputPage { function reportTime() { global $wgRequestTime, $wgDebugLogFile, $HTTP_SERVER_VARS; - global $wgProfiling, $wgProfileStack; + global $wgProfiling, $wgProfileStack, $wgUser; list( $usec, $sec ) = explode( " ", microtime() ); $now = (float)$sec + (float)$usec; @@ -464,6 +465,8 @@ class OutputPage { $forward .= " from $from"; if( $forward ) $forward = "\t(proxied via {$HTTP_SERVER_VARS['REMOTE_ADDR']}{$forward})"; + if($wgUser->getId() == 0) + $forward .= " anon"; $log = sprintf( "%s\t%04.3f\t%s\n", date( "YmdHis" ), $elapsed, urldecode( $HTTP_SERVER_VARS['REQUEST_URI'] . $forward ) ); @@ -776,8 +779,9 @@ class OutputPage { global $wgTitle, $wgUser, $wgLang; global $wgLinkCache, $wgInterwikiMagic; global $wgNamespacesWithSubpages; - wfProfileIn( "OutputPage::replaceInternalLinks" ); + wfProfileIn( $fname = "OutputPage::replaceInternalLinks" ); + wfProfileIn( "$fname-setup" ); $tc = Title::legalChars() . "#"; $sk = $wgUser->getSkin(); @@ -787,7 +791,9 @@ class OutputPage { $e1 = "/^([{$tc}]+)\\|([^]]+)]](.*)\$/sD"; $e2 = "/^([{$tc}]+)]](.*)\$/sD"; + wfProfileOut(); + wfProfileIn( "$fname-loop" ); foreach ( $a as $line ) { if ( preg_match( $e1, $line, $m ) ) { # page with alternate text @@ -866,6 +872,7 @@ class OutputPage { } } wfProfileOut(); + wfProfileOut(); return $s; } -- 2.20.1