From: Magnus Manske Date: Tue, 3 Aug 2004 19:50:37 +0000 (+0000) Subject: category redirect bug fix X-Git-Tag: 1.5.0alpha1~2529 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=10a7bdc143fbc19d212655b359edf7f037fcfe72;p=lhc%2Fweb%2Fwiklou.git category redirect bug fix --- 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 ) ;