From: Brion Vibber Date: Tue, 19 Oct 2004 07:30:56 +0000 (+0000) Subject: (bug 737) only use the post-parse link placeholders within replaceInternalLinks(). X-Git-Tag: 1.5.0alpha1~1513 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=da056c312e5758f2ec22e51c70ecf71c10dc4522;p=lhc%2Fweb%2Fwiklou.git (bug 737) only use the post-parse link placeholders within replaceInternalLinks(). The recent move of the replacement step from OutputPage into Parser completely broke a crapload of special pages; this makes the links show again. --- diff --git a/includes/Parser.php b/includes/Parser.php index f27f47381e..cb96dcd953 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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; } diff --git a/includes/Skin.php b/includes/Skin.php index ca352fc8e7..482513c88c 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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'); }