r35163 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r35162 | r35163 (on ViewVC) | r35164 >
Date:23:23, 21 May 2008
Author:vyznev
Status:ok
Tags:
Comment:Add new option "moveonly" to forbid moves but allow ordinary creation (should be good against pagemove vandalism).
Modified paths:

Diff [purge]

Index: trunk/extensions/TitleBlacklist/TitleBlacklist.list.php
===================================================================
--- trunk/extensions/TitleBlacklist/TitleBlacklist.list.php	(revision 35162)
+++ trunk/extensions/TitleBlacklist/TitleBlacklist.list.php	(revision 35163)
@@ -206,6 +206,9 @@
 			if( isset( $this->mParams['autoconfirmed'] ) && $user->isAllowed( 'autoconfirmed' ) ) {
 				return true;
 			}
+			if( isset( $this->mParams['moveonly'] ) && $action != 'move' ) {
+				return true;
+			}
 			if( !isset( $this->mParams['noedit'] ) && $action == 'edit' ) {
 				return true;
 			}
@@ -237,6 +240,9 @@
 			if( $opt2 == 'autoconfirmed' ) {
 				$options['autoconfirmed'] = true;
 			}
+			if( $opt2 == 'moveonly' ) {
+				$options['moveonly'] = true;
+			}
 			if( $opt2 == 'noedit' ) {
 				$options['noedit'] = true;
 			}
Views
Toolbox