allow redirects in categories; show cats on redirect page
authorRiver Tarnell <kateturner@users.mediawiki.org>
Mon, 14 Mar 2005 07:42:38 +0000 (07:42 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Mon, 14 Mar 2005 07:42:38 +0000 (07:42 +0000)
includes/Article.php
includes/CategoryPage.php

index 4e56f69..a65b07d 100644 (file)
@@ -566,7 +566,7 @@ class Article {
        function view() {
                global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgLang;
                global $wgLinkCache, $IP, $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol;
-               global $wgEnotif;
+               global $wgEnotif, $wgParser;
                $sk = $wgUser->getSkin();
 
                $fname = 'Article::view';
@@ -669,7 +669,12 @@ class Article {
 
                                $wgOut->addHTML( '<img valign="center" src="'.$imageUrl.'" alt="#REDIRECT" />' .
                                  '<span class="redirectText">'.$link.'</span>' );
-
+                               
+                               $parseout = $wgParser->parse($text, $this->mTitle, ParserOptions::newFromUser($wgUser));
+                               $catlinks = $parseout->getCategoryLinks();
+                               $wgOut->addCategoryLinks($catlinks);
+                               $skin = $wgUser->getSkin();
+                               #$wgOut->addHTML($skin->getCategoryLinks());
                        } else if ( $pcache ) {
                                # Display content and save to parser cache
                                $wgOut->addPrimaryWikiText( $text, $this );
index 911f017..2922b71 100644 (file)
@@ -91,8 +91,8 @@ class CategoryPage extends Article {
                        array( 'page_title', 'page_namespace', 'cl_sortkey' ),
                        array( $pageCondition,
                               'cl_from          =  page_id',
-                              'cl_to'           => $this->mTitle->getDBKey(),
-                              'page_is_redirect' => 0),
+                              'cl_to'           => $this->mTitle->getDBKey()),
+                              #'page_is_redirect' => 0),
                        #+ $pageCondition,
                        $fname,
                        array( 'ORDER BY' => $flip ? 'cl_sortkey DESC' : 'cl_sortkey',