Category fix
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Tue, 5 Aug 2003 11:51:05 +0000 (11:51 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Tue, 5 Aug 2003 11:51:05 +0000 (11:51 +0000)
includes/OutputPage.php

index 7f1948a..34ea53b 100644 (file)
@@ -918,7 +918,7 @@ return $r ;
        /* private */ function replaceInternalLinks( $s )
        {
                global $wgTitle, $wgUser, $wgLang;
-               global $wgLinkCache, $wgInterwikiMagic;
+               global $wgLinkCache, $wgInterwikiMagic, $wgUseCategoryMagic;
                global $wgNamespacesWithSubpages, $wgLanguageCode;
                wfProfileIn( $fname = "OutputPage::replaceInternalLinks" );
 
@@ -993,6 +993,10 @@ return $r ;
                                        $s .= $sk->makeMediaLink( $name,
                                          wfImageUrl( $name ), $text );
                                        $s .= $trail;
+                                } else if ( isset($wgUseCategoryMagic) && $wgUseCategoryMagic && $pre == wfMsg ( "category" ) ) {
+                                        $l = $sk->makeLink ( $pre.":".ucfirst($m[2]) , ucfirst ( $m[2] ) ) ;
+                                        array_push ( $this->mCategoryLinks , $l ) ;
+                                        $s .= $trail ;
                                } else {
                                        $l = $wgLang->getLanguageName( $pre );
                                        if ( "" == $l or !$wgInterwikiMagic or