r12339 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12338‎ | r12339 | r12340 >
Date:21:44, 1 January 2006
Author:timstarling
Status:old
Tags:
Comment:
Fixed categorised redirects
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -857,9 +857,7 @@
858858 '<span class="redirectText">'.$link.'</span>' );
859859
860860 $parseout = $wgParser->parse($text, $this->mTitle, ParserOptions::newFromUser($wgUser));
861 - $catlinks = $parseout->getCategoryLinks();
862 - $wgOut->addCategoryLinks($catlinks);
863 - $skin = $wgUser->getSkin();
 861+ $wgOut->addParserOutputNoText( $parseout );
864862 } else if ( $pcache ) {
865863 # Display content and save to parser cache
866864 $wgOut->setRevisionId( $this->getRevIdFetched() );
@@ -1328,16 +1326,10 @@
13291327
13301328 $isminor = ( $minor && $wgUser->isLoggedIn() );
13311329 if ( $this->isRedirect( $text ) ) {
1332 - # Remove all content but redirect
1333 - # This could be done by reconstructing the redirect from a title given by
1334 - # Title::newFromRedirect(), but then we wouldn't know which synonym the user
1335 - # wants to see
1336 - if ( preg_match( "/^((" . $wgMwRedir->getBaseRegex() . ')[^\\n]+)/i', $text, $m ) ) {
1337 - $redir = 1;
1338 - $text = $m[1] . "\n";
1339 - }
 1330+ $redir = 1;
 1331+ } else {
 1332+ $redir = 0;
13401333 }
1341 - else { $redir = 0; }
13421334
13431335 $text = $this->preSaveTransform( $text );
13441336 $dbw =& wfGetDB( DB_MASTER );

Status & tagging log