TTO has uploaded a new change for review.
https://gerrit.wikimedia.org/r/109496
Change subject: Give a meaningful message when Special:ActiveUsers is disabled
......................................................................
Give a meaningful message when Special:ActiveUsers is disabled
Follow-up to If786dea8a6195d11c812d46a583d272c7aa70fe7.
Bug: 60436
Change-Id: I29a063bb8659ae0d55397715da5b98ab16d336fc
---
M includes/specialpage/SpecialPageFactory.php
M includes/specials/SpecialActiveusers.php
2 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/96/109496/1
diff --git a/includes/specialpage/SpecialPageFactory.php
b/includes/specialpage/SpecialPageFactory.php
index dcf5f67..18b8f0b 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -98,6 +98,7 @@
'Listusers' => 'SpecialListUsers',
'Listadmins' => 'SpecialListAdmins',
'Listbots' => 'SpecialListBots',
+ 'Activeusers' => 'SpecialActiveUsers',
'Userrights' => 'UserrightsPage',
'EditWatchlist' => 'SpecialEditWatchlist',
@@ -179,7 +180,6 @@
global $wgSpecialPages;
global $wgDisableCounters, $wgDisableInternalSearch,
$wgEmailAuthentication;
global $wgEnableEmail, $wgEnableJavaScriptTest;
- global $wgMiserMode;
if ( !is_object( self::$list ) ) {
wfProfileIn( __METHOD__ );
@@ -203,10 +203,6 @@
if ( $wgEnableJavaScriptTest ) {
self::$list['JavaScriptTest'] =
'SpecialJavaScriptTest';
- }
-
- if ( !$wgMiserMode ) {
- self::$list['Activeusers'] =
'SpecialActiveUsers';
}
// Add extension special pages
diff --git a/includes/specials/SpecialActiveusers.php
b/includes/specials/SpecialActiveusers.php
index 705dab5..460d058 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -240,11 +240,15 @@
* @param $par Mixed: parameter passed to the page or null
*/
public function execute( $par ) {
- global $wgActiveUserDays;
+ global $wgActiveUserDays, $wgMiserMode;
$this->setHeaders();
$this->outputHeader();
+ if ( $wgMiserMode ) {
+ throw new ErrorPageError( 'activeusers',
'querypage-disabled' );
+ }
+
$out = $this->getOutput();
$out->wrapWikiMsg( "<div
class='mw-activeusers-intro'>\n$1\n</div>",
array( 'activeusers-intro',
$this->getLanguage()->formatNum( $wgActiveUserDays ) ) );
--
To view, visit https://gerrit.wikimedia.org/r/109496
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29a063bb8659ae0d55397715da5b98ab16d336fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TTO <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits