dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Update docs"
[lhc/web/wiklou.git]
/
includes
/
SpecialPageFactory.php
diff --git
a/includes/SpecialPageFactory.php
b/includes/SpecialPageFactory.php
index
95f75a8
..
0e0fb33
100644
(file)
--- a/
includes/SpecialPageFactory.php
+++ b/
includes/SpecialPageFactory.php
@@
-155,7
+155,6
@@
class SpecialPageFactory {
'Blankpage' => 'SpecialBlankpage',
'Blockme' => 'SpecialBlockme',
'Emailuser' => 'SpecialEmailUser',
'Blankpage' => 'SpecialBlankpage',
'Blockme' => 'SpecialBlockme',
'Emailuser' => 'SpecialEmailUser',
- 'JavaScriptTest' => 'SpecialJavaScriptTest',
'Movepage' => 'MovePageForm',
'Mycontributions' => 'SpecialMycontributions',
'Mypage' => 'SpecialMypage',
'Movepage' => 'MovePageForm',
'Mycontributions' => 'SpecialMycontributions',
'Mypage' => 'SpecialMypage',
@@
-178,7
+177,7
@@
class SpecialPageFactory {
static function getList() {
global $wgSpecialPages;
global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
static function getList() {
global $wgSpecialPages;
global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
- global $wgEnableEmail;
+ global $wgEnableEmail
, $wgEnableJavaScriptTest
;
if ( !is_object( self::$mList ) ) {
wfProfileIn( __METHOD__ );
if ( !is_object( self::$mList ) ) {
wfProfileIn( __METHOD__ );
@@
-200,6
+199,10
@@
class SpecialPageFactory {
self::$mList['ChangeEmail'] = 'SpecialChangeEmail';
}
self::$mList['ChangeEmail'] = 'SpecialChangeEmail';
}
+ if( $wgEnableJavaScriptTest ) {
+ self::$mList['JavaScriptTest'] = 'SpecialJavaScriptTest';
+ }
+
// Add extension special pages
self::$mList = array_merge( self::$mList, $wgSpecialPages );
// Add extension special pages
self::$mList = array_merge( self::$mList, $wgSpecialPages );
@@
-370,11
+373,13
@@
class SpecialPageFactory {
}
foreach ( self::getList() as $name => $rec ) {
$page = self::getPage( $name );
}
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;
}
}
return $pages;