(bug 737) only use the post-parse link placeholders within replaceInternalLinks().
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Oct 2004 07:30:56 +0000 (07:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Oct 2004 07:30:56 +0000 (07:30 +0000)
The recent move of the replacement step from OutputPage into Parser completely
broke a crapload of special pages; this makes the links show again.

includes/Parser.php
includes/Skin.php

index f27f473..cb96dcd 100644 (file)
@@ -1103,7 +1103,12 @@ class Parser
                static $tc = FALSE;
                # the % is needed to support urlencoded titles as well
                if ( !$tc ) { $tc = Title::legalChars() . '#%'; }
+               
                $sk =& $this->mOptions->getSkin();
+               global $wgUseOldExistenceCheck;
+               # "Post-parse link colour check" works only on wiki text since it's now
+               # in Parser. Enable it, then disable it when we're done.
+               $saveParseColour = $sk->postParseLinkColour( !$wgUseOldExistenceCheck );
 
                $redirect = MagicWord::get ( MAG_REDIRECT ) ;
 
@@ -1337,6 +1342,7 @@ class Parser
                        }
                        $s .= $sk->makeLinkObj( $nt, $text, '', $trail, $prefix );
                }
+               $sk->postParseLinkColour( $saveParseColour );
                wfProfileOut( $fname );
                return $s;
        }
index ca352fc..482513c 100644 (file)
@@ -99,12 +99,10 @@ class Skin {
        var $rc_cache ; # Cache for Enhanced Recent Changes
        var $rcCacheIndex ; # Recent Changes Cache Counter for visibility toggle
        var $rcMoveIndex;
-       var $postParseLinkColour = true;
+       var $postParseLinkColour = false;
        /**#@-*/
 
        function Skin() {
-               global $wgUseOldExistenceCheck;
-               $postParseLinkColour = !$wgUseOldExistenceCheck;
                $this->linktrail = wfMsg('linktrail');
        }