From: Platonides Date: Thu, 10 Feb 2011 16:11:34 +0000 (+0000) Subject: Adding more wfProfileOut() X-Git-Tag: 1.31.0-rc.0~32071 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=aeb547b46566ced918b4eb3bb66dcd00c5971898;p=lhc%2Fweb%2Fwiklou.git Adding more wfProfileOut() --- diff --git a/includes/BagOStuff.php b/includes/BagOStuff.php index 7f40001333..1caaa1c440 100644 --- a/includes/BagOStuff.php +++ b/includes/BagOStuff.php @@ -725,6 +725,7 @@ class DBABagOStuff extends BagOStuff { $handle = $this->getReader(); if ( !$handle ) { + wfProfileOut( __METHOD__ ); return null; } @@ -755,6 +756,7 @@ class DBABagOStuff extends BagOStuff { $handle = $this->getWriter(); if ( !$handle ) { + wfProfileOut( __METHOD__ ); return false; } @@ -771,6 +773,7 @@ class DBABagOStuff extends BagOStuff { $handle = $this->getWriter(); if ( !$handle ) { + wfProfileOut( __METHOD__ ); return false; } @@ -789,6 +792,7 @@ class DBABagOStuff extends BagOStuff { $handle = $this->getWriter(); if ( !$handle ) { + wfProfileOut( __METHOD__ ); return false; } diff --git a/includes/Linker.php b/includes/Linker.php index a74fb77b7e..116ef503b5 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -722,6 +722,7 @@ class Linker { return $this->linkKnown( $title, "$prefix$text$inside", array(), $query ) . $trail; } } else { + wfProfileOut( __METHOD__ ); return "{$prefix}{$text}{$trail}"; } } @@ -1668,6 +1669,7 @@ class Linker { */ public function accesskey( $name ) { if ( isset( $this->accesskeycache[$name] ) ) { + wfProfileOut( __METHOD__ ); return $this->accesskeycache[$name]; } wfProfileIn( __METHOD__ ); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 917f7dc437..d343ba6eae 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2448,6 +2448,7 @@ class Parser { } if ( $stack > 0 ) { wfDebug( __METHOD__.": Invalid input; not enough close tags (stack $stack, state $state)\n" ); + wfProfileOut( __METHOD__ ); return false; } wfProfileOut( __METHOD__ ); diff --git a/includes/parser/Parser_LinkHooks.php b/includes/parser/Parser_LinkHooks.php index 5d6ac78267..7c17ce4e11 100644 --- a/includes/parser/Parser_LinkHooks.php +++ b/includes/parser/Parser_LinkHooks.php @@ -265,9 +265,10 @@ class Parser_LinkHooks extends Parser if( $return === false ) { # False (no link) was returned, output plain wikitext # Build it again as the hook is allowed to modify $paramText - return isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]"; + $return = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]"; } # Content was returned, return it + wfProfileOut( __METHOD__ ); return $return; } diff --git a/includes/parser/Tidy.php b/includes/parser/Tidy.php index d2b58f6064..a745eac039 100644 --- a/includes/parser/Tidy.php +++ b/includes/parser/Tidy.php @@ -173,15 +173,13 @@ class MWTidy { $retval = -1; } - wfProfileOut( __METHOD__ ); - if( !$stderr && $cleansource == '' && $text != '' ) { // Some kind of error happened, so we couldn't get the corrected text. // Just give up; we'll use the source text and append a warning. - return null; - } else { - return $cleansource; + $cleansource = null; } + wfProfileOut( __METHOD__ ); + return $cleansource; } /** @@ -199,6 +197,7 @@ class MWTidy { if( $stderr ) { $retval = $tidy->getStatus(); + wfProfileOut( __METHOD__ ); return $tidy->errorBuffer; } else { $tidy->cleanRepair();