From dbb89d2e6ad948c6a05ee1805950d151709ced58 Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Tue, 24 Feb 2004 12:01:43 +0000 Subject: [PATCH] Categories workover, incomplete --- includes/OutputPage.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 12e2c334ec..4c2ed2ea37 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -996,6 +996,7 @@ $t[] = "" ; $image = Namespace::getImage(); $special = Namespace::getSpecial(); $media = Namespace::getMedia(); + $category = wfMsg ( "category" ) ; $nottalk = !Namespace::isTalk( $wgTitle->getNamespace() ); if ( $wgLang->linkPrefixExtension() && preg_match( $e2, $s, $m ) ) { @@ -1078,6 +1079,16 @@ $t[] = "" ; $s .= $prefix . "" . $text . "" . $trail; continue; } + if ( $ns == $category && $wgUseCategoryMagic ) { + $t = explode ( ":" , $nt->getText() ) ; + array_shift ( $t ) ; + $t = implode ( ":" , $t ) ; + $t = $wgLang->ucFirst ( $t ) ; + $t = $sk->makeKnownLink( $category.":".$t, $t, "", $trail , $prefix ); + $this->mCategoryLinks[] = $t ; + $s .= $prefix . $trail ; + continue ; + } if( $ns == $media ) { $s .= $prefix . $sk->makeMediaLinkObj( $nt, $text ) . $trail; $wgLinkCache->addImageLinkObj( $nt ); -- 2.20.1