From: Aryeh Gregor Date: Sun, 8 Jun 2008 18:27:56 +0000 (+0000) Subject: New $wgGroupPermissions option 'move-subpages' added to control bulk-moving subpages... X-Git-Tag: 1.31.0-rc.0~47115 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/%7Bmainpage%7D?a=commitdiff_plain;h=0a1b9b21cd868a185fd803f27f617b643d968a0b;p=lhc%2Fweb%2Fwiklou.git New $wgGroupPermissions option 'move-subpages' added to control bulk-moving subpages along with pages. Assigned to 'user' and 'sysop' by default. Probably a good idea to remove from user on wikis like enwiki. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 508df838c4..3aa966ddeb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 79698bc911..aabc875776 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index 82a8b8dceb..d08fb66bd8 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -193,7 +193,8 @@ class MovePageForm { ); } - if( $ot->hasSubpages() || $ot->getTalkPage()->hasSubpages() ) { + if( ($ot->hasSubpages() || $ot->getTalkPage()->hasSubpages()) + && $ot->userCan( 'move-subpages' ) ) { $wgOut->addHTML( " @@ -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. diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 23d1fc0ed9..cf36f66280 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index a553566d62..039b59d873 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -862,6 +862,7 @@ $wgMessageStructure = array( 'right-createaccount', 'right-minoredit', 'right-move', + 'right-move-subpages', 'right-suppressredirect', 'right-upload', 'right-reupload',