From f2c3b600cda1a1a75268c9696e3d8a0cdd91a12e Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sun, 6 Jan 2013 22:03:49 +0000 Subject: [PATCH] (bug 43684) Don't bother creating a new context in SpecialPageFactory::getUsablePages Change-Id: I1f854a8c03b5ca917c02c63a5b7da9435252921d --- includes/SpecialPageFactory.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ) ) ) { -- 2.20.1