r47998 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47997‎ | r47998 | r47999 >
Date:22:56, 3 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Add mw-redirect class to subpage links as needed
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1640,7 +1640,7 @@
16411641 $options['LIMIT'] = $limit;
16421642 return $this->mSubpages = TitleArray::newFromResult(
16431643 $dbr->select( 'page',
1644 - array( 'page_id', 'page_namespace', 'page_title' ),
 1644+ array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect' ),
16451645 $conds,
16461646 __METHOD__,
16471647 $options
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -234,7 +234,8 @@
235235 }
236236
237237 if( ($this->oldTitle->hasSubpages() || $this->oldTitle->getTalkPage()->hasSubpages())
238 - && $this->oldTitle->userCan( 'move-subpages' ) ) {
 238+ && $this->oldTitle->userCan( 'move-subpages' ) )
 239+ {
239240 global $wgMaximumMovedPages, $wgLang;
240241
241242 $wgOut->addHTML( "
@@ -521,9 +522,6 @@
522523
523524 foreach( $subpages as $subpage ) {
524525 $link = $skin->link( $subpage );
525 - if ( $subpage->isRedirect() )
526 - $link = '<div class="allpagesredirect">' . $link . '</div>' ;
527 -
528526 $out->addHTML( "<li>$link</li>\n" );
529527 }
530528 $out->addHTML( "</ul>\n" );

Status & tagging log