From: River Tarnell Date: Mon, 14 Mar 2005 07:42:38 +0000 (+0000) Subject: allow redirects in categories; show cats on redirect page X-Git-Tag: 1.5.0alpha1~611 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=commitdiff_plain;h=c09843f28627bf9655cfd7cf8bfbc32070cfa765;p=lhc%2Fweb%2Fwiklou.git allow redirects in categories; show cats on redirect page --- diff --git a/includes/Article.php b/includes/Article.php index 4e56f69109..a65b07d405 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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( '#REDIRECT' . ''.$link.'' ); - + + $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 ); diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 911f017028..2922b7159a 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -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',