Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3049,8 +3049,9 @@ |
3050 | 3050 | # @todo FIXME: If piece['parts'] is null then the call to getLength() below won't work b/c this $args isn't an object |
3051 | 3051 | $args = ( null == $piece['parts'] ) ? array() : $piece['parts']; |
3052 | 3052 | wfProfileOut( __METHOD__.'-setup' ); |
3053 | | - wfProfileIn( __METHOD__."-title-$originalTitle" ); |
3054 | 3053 | |
| 3054 | + $titleProfileIn = null; // profile templates |
| 3055 | + |
3055 | 3056 | # SUBST |
3056 | 3057 | wfProfileIn( __METHOD__.'-modifiers' ); |
3057 | 3058 | if ( !$found ) { |
— | — | @@ -3212,6 +3213,8 @@ |
3213 | 3214 | |
3214 | 3215 | # Load from database |
3215 | 3216 | if ( !$found && $title ) { |
| 3217 | + $titleProfileIn = __METHOD__ . "-title-" . $title->getDBKey(); |
| 3218 | + wfProfileIn( $titleProfileIn ); // template in |
3216 | 3219 | wfProfileIn( __METHOD__ . '-loadtpl' ); |
3217 | 3220 | if ( !$title->isExternal() ) { |
3218 | 3221 | if ( $title->getNamespace() == NS_SPECIAL |
— | — | @@ -3289,7 +3292,9 @@ |
3290 | 3293 | # Recover the source wikitext and return it |
3291 | 3294 | if ( !$found ) { |
3292 | 3295 | $text = $frame->virtualBracketedImplode( '{{', '|', '}}', $titleWithSpaces, $args ); |
3293 | | - wfProfileOut( __METHOD__."-title-$originalTitle" ); |
| 3296 | + if ( $titleProfileIn ) { |
| 3297 | + wfProfileOut( $titleProfileIn ); // template out |
| 3298 | + } |
3294 | 3299 | wfProfileOut( __METHOD__ ); |
3295 | 3300 | return array( 'object' => $text ); |
3296 | 3301 | } |
— | — | @@ -3319,6 +3324,10 @@ |
3320 | 3325 | $isLocalObj = false; |
3321 | 3326 | } |
3322 | 3327 | |
| 3328 | + if ( $titleProfileIn ) { |
| 3329 | + wfProfileOut( $titleProfileIn ); // template out |
| 3330 | + } |
| 3331 | + |
3323 | 3332 | # Replace raw HTML by a placeholder |
3324 | 3333 | # Add a blank line preceding, to prevent it from mucking up |
3325 | 3334 | # immediately preceding headings |
— | — | @@ -3358,7 +3367,6 @@ |
3359 | 3368 | $ret = array( 'text' => $text ); |
3360 | 3369 | } |
3361 | 3370 | |
3362 | | - wfProfileOut( __METHOD__."-title-$originalTitle" ); |
3363 | 3371 | wfProfileOut( __METHOD__ ); |
3364 | 3372 | return $ret; |
3365 | 3373 | } |