From 3dea7e4cb3a0ed347ef3929ff2f8dbc738f99c75 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 11 Dec 2008 00:29:37 +0000 Subject: [PATCH] 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. --- includes/Wiki.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); -- 2.20.1