Merge "Followup I888c616e: Keep IRC line format unchanged."
[lhc/web/wiklou.git] / includes / parser / Parser_LinkHooks.php
index e4f5d12..d1ca8aa 100644 (file)
@@ -149,8 +149,8 @@ class Parser_LinkHooks extends Parser {
                $holders = new LinkHolderArray( $this );
 
                if( is_null( $this->mTitle ) ) {
-                       wfProfileOut( __METHOD__ );
                        wfProfileOut( __METHOD__.'-setup' );
+                       wfProfileOut( __METHOD__ );
                        throw new MWException( __METHOD__.": \$this->mTitle is null\n" );
                }
 
@@ -224,10 +224,12 @@ class Parser_LinkHooks extends Parser {
                wfProfileIn( __METHOD__ );
                $wt = isset($paramText) ? "[[$titleText|$paramText]]" : "[[$titleText]]";
                wfProfileIn( __METHOD__."-misc" );
+
                # Don't allow internal links to pages containing
                # PROTO: where PROTO is a valid URL protocol; these
                # should be external links.
                if( preg_match('/^\b(?i:' . wfUrlProtocols() . ')/', $titleText) ) {
+                       wfProfileOut( __METHOD__."-misc" );
                        wfProfileOut( __METHOD__ );
                        return $wt;
                }