MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/55804


Change subject: Disable ActiveUsers in miser mode, this query too slow
......................................................................

Disable ActiveUsers in miser mode, this query too slow

Change-Id: I1b34034a4198f3c054a4247e20faea7db822cb02
---
M RELEASE-NOTES-1.21
M includes/specials/SpecialActiveusers.php
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/55804/1

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 56d812c..5c87e2d 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -335,6 +335,7 @@
   - ShowStats -> ShowSiteStats.
 * BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module
   and moved it to the TitleBlacklist extension.
+* Special:ActiveUsers is now disabled in miser mode.
 
 == Compatibility ==
 
diff --git a/includes/specials/SpecialActiveusers.php 
b/includes/specials/SpecialActiveusers.php
index c9c82ad..bf9c29b 100644
--- a/includes/specials/SpecialActiveusers.php
+++ b/includes/specials/SpecialActiveusers.php
@@ -218,11 +218,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( 'error', '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/55804
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b34034a4198f3c054a4247e20faea7db822cb02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to