From: Tim Starling Date: Sun, 1 Jan 2006 21:44:43 +0000 (+0000) Subject: Fixed categorised redirects X-Git-Tag: 1.6.0~817 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=5bd0ad36b745a44b0ac34e27b3a73dc70264f223;p=lhc%2Fweb%2Fwiklou.git Fixed categorised redirects --- diff --git a/includes/Article.php b/includes/Article.php index 2945a2a6ce..ae767c5d85 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -857,9 +857,7 @@ class Article { ''.$link.'' ); $parseout = $wgParser->parse($text, $this->mTitle, ParserOptions::newFromUser($wgUser)); - $catlinks = $parseout->getCategoryLinks(); - $wgOut->addCategoryLinks($catlinks); - $skin = $wgUser->getSkin(); + $wgOut->addParserOutputNoText( $parseout ); } else if ( $pcache ) { # Display content and save to parser cache $wgOut->setRevisionId( $this->getRevIdFetched() ); @@ -1328,16 +1326,10 @@ class Article { $isminor = ( $minor && $wgUser->isLoggedIn() ); if ( $this->isRedirect( $text ) ) { - # Remove all content but redirect - # This could be done by reconstructing the redirect from a title given by - # Title::newFromRedirect(), but then we wouldn't know which synonym the user - # wants to see - if ( preg_match( "/^((" . $wgMwRedir->getBaseRegex() . ')[^\\n]+)/i', $text, $m ) ) { - $redir = 1; - $text = $m[1] . "\n"; - } + $redir = 1; + } else { + $redir = 0; } - else { $redir = 0; } $text = $this->preSaveTransform( $text ); $dbw =& wfGetDB( DB_MASTER );