From: Alex Monk Date: Sun, 6 Jan 2013 22:03:49 +0000 (+0000) Subject: (bug 43684) Don't bother creating a new context in SpecialPageFactory::getUsablePages X-Git-Tag: 1.31.0-rc.0~21119^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=f2c3b600cda1a1a75268c9696e3d8a0cdd91a12e;p=lhc%2Fweb%2Fwiklou.git (bug 43684) Don't bother creating a new context in SpecialPageFactory::getUsablePages Change-Id: I1f854a8c03b5ca917c02c63a5b7da9435252921d --- diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index fa1bca486b..0e0fb331f7 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -371,12 +371,10 @@ class SpecialPageFactory { global $wgUser; $user = $wgUser; } - $context = RequestContext::newExtraneousContext( Title::newMainPage() ); - $context->setUser( $user ); foreach ( self::getList() as $name => $rec ) { $page = self::getPage( $name ); if ( $page ) { // not null - $page->setContext( $context ); + $page->setContext( RequestContext::getMain() ); if ( $page->isListed() && ( !$page->isRestricted() || $page->userCanExecute( $user ) ) ) {