MediaWiki r19195 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r19194‎ | r19195 (on ViewVC)‎ | r19196 >
Date:04:25, 13 January 2007
Author:brion
Status:old
Tags:
Comment:
* Add 'purge' privilege to replace the hardcoded check for login state in
determining whether action=purge can be done via GET. Switching the
permission on for anons can be helpful for benchmarking.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -911,7 +911,7 @@
912912 function purge() {
913913 global $wgUser, $wgRequest, $wgOut;
914914
915 - if ( $wgUser->isLoggedIn() || $wgRequest->wasPosted() ) {
 915+ if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) {
916916 if( wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
917917 $this->doPurge();
918918 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -964,6 +964,7 @@
965965 $wgGroupPermissions['user' ]['reupload'] = true;
966966 $wgGroupPermissions['user' ]['reupload-shared'] = true;
967967 $wgGroupPermissions['user' ]['minoredit'] = true;
 968+$wgGroupPermissions['user' ]['purge'] = true; // can use ?action=purge without clicking "ok"
968969
969970 // Implicit group for accounts that pass $wgAutoConfirmAge
970971 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
Index: trunk/phase3/RELEASE-NOTES
@@ -59,6 +59,9 @@
6060 * (bug 8613) Fix error when viewing "Recent Changes" and using Postgres.
6161 * Initialise site_stats table at upgrade time if data was missing
6262 * (bug 7250) Updated Unicode normalization tables to Unicode 5.0
 63+* Add 'purge' privilege to replace the hardcoded check for login state in
 64+ determining whether action=purge can be done via GET. Switching the
 65+ permission on for anons can be helpful for benchmarking.
6366
6467
6568 == Languages updated ==