New $wgGroupPermissions option 'move-subpages' added to control bulk-moving subpages...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 8 Jun 2008 18:27:56 +0000 (18:27 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 8 Jun 2008 18:27:56 +0000 (18:27 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialMovepage.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 508df83..3aa966d 100644 (file)
@@ -54,6 +54,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * $wgActiveUserDays is that number of days
 * $wgRateLimitsExcludedGroups has been deprecated in favor of 
   $wgGroupPermissions[]['noratelimit']. The former still works, however.
+* New $wgGroupPermissions option 'move-subpages' added to control bulk-moving
+  subpages along with pages.  Assigned to 'user' and 'sysop' by default.
 
 === New features in 1.13 ===
 
index 79698bc..aabc875 100644 (file)
@@ -1085,6 +1085,7 @@ $wgGroupPermissions['*'    ]['writeapi']         = true;
 
 // Implicit group for all logged-in accounts
 $wgGroupPermissions['user' ]['move']             = true;
+$wgGroupPermissions['user' ]['move-subpages']    = true;
 $wgGroupPermissions['user' ]['read']             = true;
 $wgGroupPermissions['user' ]['edit']             = true;
 $wgGroupPermissions['user' ]['createpage']       = true;
@@ -1122,6 +1123,7 @@ $wgGroupPermissions['sysop']['editusercssjs']    = true;
 $wgGroupPermissions['sysop']['import']           = true;
 $wgGroupPermissions['sysop']['importupload']     = true;
 $wgGroupPermissions['sysop']['move']             = true;
+$wgGroupPermissions['sysop']['move-subpages']    = true;
 $wgGroupPermissions['sysop']['patrol']           = true;
 $wgGroupPermissions['sysop']['autopatrol']       = true;
 $wgGroupPermissions['sysop']['protect']          = true;
index 82a8b8d..d08fb66 100644 (file)
@@ -193,7 +193,8 @@ class MovePageForm {
                        );
                }
 
-               if( $ot->hasSubpages() || $ot->getTalkPage()->hasSubpages() ) {
+               if( ($ot->hasSubpages() || $ot->getTalkPage()->hasSubpages())
+               && $ot->userCan( 'move-subpages' ) ) {
                        $wgOut->addHTML( "
                                <tr>
                                        <td></td>
@@ -299,6 +300,10 @@ class MovePageForm {
                        $this->moveTalk = false;
                }
 
+               if( !$ot->userCan( 'move-subpages' ) ) {
+                       $this->moveSubpages = false;
+               }
+
                # Next make a list of id's.  This might be marginally less efficient
                # than a more direct method, but this is not a highly performance-cri-
                # tical code path and readable code is more important here.
index 23d1fc0..cf36f66 100644 (file)
@@ -1479,6 +1479,7 @@ please see math/README to configure.',
 'right-createaccount'        => 'Create new user accounts',
 'right-minoredit'            => 'Mark edits as minor',
 'right-move'                 => 'Move pages',
+'right-move-subpages'        => 'Move pages with their subpages',
 'right-suppressredirect'     => 'Not create a redirect from the old name when moving a page',
 'right-upload'               => 'Upload files',
 'right-reupload'             => 'Overwrite an existing file',
index a553566..039b59d 100644 (file)
@@ -862,6 +862,7 @@ $wgMessageStructure = array(
                'right-createaccount',
                'right-minoredit',
                'right-move',
+               'right-move-subpages',
                'right-suppressredirect',
                'right-upload',
                'right-reupload',