From da056c312e5758f2ec22e51c70ecf71c10dc4522 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 19 Oct 2004 07:30:56 +0000 Subject: [PATCH] (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. --- includes/Parser.php | 6 ++++++ includes/Skin.php | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) 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'); } -- 2.20.1