From 10a7bdc143fbc19d212655b359edf7f037fcfe72 Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Tue, 3 Aug 2004 19:50:37 +0000 Subject: [PATCH] category redirect bug fix --- includes/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 57600b3229..a82104e626 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1046,6 +1046,8 @@ class Parser if ( !$tc ) { $tc = Title::legalChars() . '#%'; } $sk =& $this->mOptions->getSkin(); + $isRedirect = false ; + if ( trim ( substr ( $s , 0 , 10 ) ) == '#REDIRECT' ) $isRedirect = true ; $a = explode( '[[', ' ' . $s ); $s = array_shift( $a ); $s = substr( $s, 1 ); @@ -1161,7 +1163,7 @@ class Parser $wgLinkCache->addImageLinkObj( $nt ); continue; } - if ( $ns == $category ) { + if ( $ns == $category && !$isRedirect ) { $t = $nt->getText() ; $nnt = Title::newFromText ( Namespace::getCanonicalName($category).":".$t ) ; -- 2.20.1