From: Brion Vibber Date: Thu, 11 Dec 2008 00:29:37 +0000 (+0000) Subject: Revert r44335 "Tweak profile calls" X-Git-Tag: 1.31.0-rc.0~44048 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=3dea7e4cb3a0ed347ef3929ff2f8dbc738f99c75;p=lhc%2Fweb%2Fwiklou.git Revert r44335 "Tweak profile calls" Let the doUpdates() func get counted even when it has nothing to do; otherwise stats will be skewed to only times when there are multiple updates. Or.... hmmm. bleah. --- diff --git a/includes/Wiki.php b/includes/Wiki.php index e8fd40d88e..f7c2723b64 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -343,11 +343,13 @@ class MediaWiki { * @param $updates array of objects that hold an update to do */ function doUpdates( &$updates ) { + wfProfileIn( __METHOD__ ); /* No need to get master connections in case of empty updates array */ - if( !$updates ) { + if (!$updates) { + wfProfileOut( __METHOD__ ); return; } - wfProfileIn( __METHOD__ ); + $dbw = wfGetDB( DB_MASTER ); foreach( $updates as $up ) { $up->doUpdate();