X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialPageFactory.php;h=0e0fb331f7e76d2262d53241c966924a210c7d6a;hb=7b66a346d46891949a4d298274dbfb30ddc71c7b;hp=8ed52642a7e1708ce3350b33f9626a98782151c6;hpb=2759e2a5efc1df364424caa4cc27f281a9a63662;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index 8ed52642a7..0e0fb331f7 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -373,11 +373,13 @@ class SpecialPageFactory { } foreach ( self::getList() as $name => $rec ) { $page = self::getPage( $name ); - if ( $page // not null - && $page->isListed() - && ( !$page->isRestricted() || $page->userCanExecute( $user ) ) - ) { - $pages[$name] = $page; + if ( $page ) { // not null + $page->setContext( RequestContext::getMain() ); + if ( $page->isListed() + && ( !$page->isRestricted() || $page->userCanExecute( $user ) ) + ) { + $pages[$name] = $page; + } } } return $pages;