r99286 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99285‎ | r99286 | r99287 >
Date:00:16, 8 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Fixed getUsablePages() to account for the fact that getPage() can return null
Modified paths:
  • /trunk/phase3/includes/SpecialPageFactory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPageFactory.php
@@ -346,11 +346,9 @@
347347 $pages = array();
348348 foreach ( self::getList() as $name => $rec ) {
349349 $page = self::getPage( $name );
350 - if ( $page->isListed()
351 - && (
352 - !$page->isRestricted()
353 - || $page->userCanExecute( $wgUser )
354 - )
 350+ if ( $page // not null
 351+ && $page->isListed()
 352+ && ( !$page->isRestricted() || $page->userCanExecute( $wgUser ) )
355353 ) {
356354 $pages[$name] = $page;
357355 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r101203REL1_18 MFT r99286, r99332, r100398, r100701, r101010reedy21:20, 28 October 2011

Status & tagging log