Moving Special:Userlevels and Special:Grouplevels to Special:Userrights and Special:Groups respectively.
This commit is contained in:
parent
846e571c36
commit
faef2026c9
5 changed files with 54 additions and 59 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* This file contain a class to easily build HTML forms as well as custom
|
||||
* functions used by SpecialUserlevels.php and SpecialGrouplevels.php
|
||||
* functions used by SpecialUserrights.php and SpecialGroups.php
|
||||
* @package MediaWiki
|
||||
*/
|
||||
|
||||
|
|
@ -95,8 +95,6 @@ class HTMLForm {
|
|||
} // end class
|
||||
|
||||
|
||||
// functions used by SpecialUserlevels & SpecialGrouplevels
|
||||
|
||||
/** Build a select with all existent groups
|
||||
* @param string $selectname Name of this element. Name of form is automaticly prefixed.
|
||||
* @param array $selected Array of element selected when posted. Multiples will only show them.
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ require_once('HTMLForm.php');
|
|||
require_once('Group.php');
|
||||
|
||||
/** Entry point */
|
||||
function wfSpecialGrouplevels($par=null) {
|
||||
function wfSpecialGroups($par=null) {
|
||||
global $wgRequest;
|
||||
# Debug statement
|
||||
// print_r($_POST);
|
||||
$form = new GrouplevelsForm($wgRequest);
|
||||
$form = new GroupsForm($wgRequest);
|
||||
$form->execute();
|
||||
}
|
||||
|
||||
|
|
@ -24,18 +24,18 @@ function wfSpecialGrouplevels($par=null) {
|
|||
* @package MediaWiki
|
||||
* @subpackage SpecialPage
|
||||
*/
|
||||
class GrouplevelsForm extends HTMLForm {
|
||||
class GroupsForm extends HTMLForm {
|
||||
var $mPosted, $mRequest, $mSaveprefs;
|
||||
/** Escaped local url name*/
|
||||
var $action;
|
||||
|
||||
/** Constructor*/
|
||||
function GrouplevelsForm ( &$request ) {
|
||||
function GroupsForm ( &$request ) {
|
||||
$this->mPosted = $request->wasPosted();
|
||||
$this->mRequest = $request;
|
||||
$this->mName = 'grouplevels';
|
||||
$this->mName = 'groups';
|
||||
|
||||
$titleObj = Title::makeTitle( NS_SPECIAL, 'Grouplevels' );
|
||||
$titleObj = Title::makeTitle( NS_SPECIAL, 'Groups' );
|
||||
$this->action = $titleObj->escapeLocalURL();
|
||||
}
|
||||
|
||||
|
|
@ -146,5 +146,5 @@ class GrouplevelsForm extends HTMLForm {
|
|||
|
||||
$wgOut->addHTML( "</form>\n" );
|
||||
}
|
||||
} // end class GrouplevelsForm
|
||||
?>
|
||||
} // end class GroupsForm
|
||||
?>
|
||||
|
|
@ -49,29 +49,7 @@ $wgSpecialPages = array(
|
|||
'Lonelypages' => new SpecialPage( 'Lonelypages' ),
|
||||
'Uncategorizedpages'=> new SpecialPage( 'Uncategorizedpages' ),
|
||||
'Uncategorizedcategories'=> new SpecialPage( 'Uncategorizedcategories' ),
|
||||
'Unusedimages' => new SpecialPage( 'Unusedimages' )
|
||||
);
|
||||
|
||||
global $wgUseValidation ;
|
||||
if ( $wgUseValidation )
|
||||
$wgSpecialPages['Validate'] = new SpecialPage( 'Validate' );
|
||||
|
||||
global $wgDisableCounters;
|
||||
if( !$wgDisableCounters ) {
|
||||
$wgSpecialPages['Popularpages'] = new SpecialPage( 'Popularpages' );
|
||||
}
|
||||
|
||||
global $wgDisableInternalSearch;
|
||||
if( !$wgDisableInternalSearch ) {
|
||||
$wgSpecialPages['Search'] = new UnlistedSpecialPage( 'Search' );
|
||||
}
|
||||
|
||||
global $wgEmailAuthentication;
|
||||
if( $wgEmailAuthentication ) {
|
||||
$wgSpecialPages['Confirmemail'] = new UnlistedSpecialPage( 'Confirmemail' );
|
||||
}
|
||||
|
||||
$wgSpecialPages = array_merge($wgSpecialPages, array (
|
||||
'Unusedimages' => new SpecialPage( 'Unusedimages' ),
|
||||
'Wantedpages' => new SpecialPage( 'Wantedpages' ),
|
||||
'Shortpages' => new SpecialPage( 'Shortpages' ),
|
||||
'Longpages' => new SpecialPage( 'Longpages' ),
|
||||
|
|
@ -99,9 +77,28 @@ $wgSpecialPages = array_merge($wgSpecialPages, array (
|
|||
'Lockdb' => new SpecialPage( 'Lockdb', 'siteadmin' ),
|
||||
'Unlockdb' => new SpecialPage( 'Unlockdb', 'siteadmin' ),
|
||||
# 'Sitesettings' => new SpecialPage( 'Sitesettings', 'siteadmin' ),
|
||||
'Userlevels' => new SpecialPage( 'Userlevels', 'userrights' ),
|
||||
'Grouplevels' => new SpecialPage( 'Grouplevels', 'grouprights' ),
|
||||
));
|
||||
'Userrights' => new SpecialPage( 'Userrights', 'userrights' ),
|
||||
'Groups' => new SpecialPage( 'Groups', 'grouprights' ),
|
||||
);
|
||||
|
||||
global $wgUseValidation ;
|
||||
if ( $wgUseValidation )
|
||||
$wgSpecialPages['Validate'] = new SpecialPage( 'Validate' );
|
||||
|
||||
global $wgDisableCounters;
|
||||
if( !$wgDisableCounters ) {
|
||||
$wgSpecialPages['Popularpages'] = new SpecialPage( 'Popularpages' );
|
||||
}
|
||||
|
||||
global $wgDisableInternalSearch;
|
||||
if( !$wgDisableInternalSearch ) {
|
||||
$wgSpecialPages['Search'] = new UnlistedSpecialPage( 'Search' );
|
||||
}
|
||||
|
||||
global $wgEmailAuthentication;
|
||||
if( $wgEmailAuthentication ) {
|
||||
$wgSpecialPages['Confirmemail'] = new UnlistedSpecialPage( 'Confirmemail' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parent special page class, also static functions for handling the special
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ require_once('HTMLForm.php');
|
|||
require_once('Group.php');
|
||||
|
||||
/** Entry point */
|
||||
function wfSpecialUserlevels($par=null) {
|
||||
function wfSpecialUserrights($par=null) {
|
||||
global $wgRequest;
|
||||
# Debug statement
|
||||
// print_r($_POST);
|
||||
$form = new UserlevelsForm($wgRequest);
|
||||
$form = new UserrightsForm($wgRequest);
|
||||
$form->execute();
|
||||
}
|
||||
|
||||
|
|
@ -26,18 +26,18 @@ function wfSpecialUserlevels($par=null) {
|
|||
* @package MediaWiki
|
||||
* @subpackage SpecialPage
|
||||
*/
|
||||
class UserlevelsForm extends HTMLForm {
|
||||
class UserrightsForm extends HTMLForm {
|
||||
var $mPosted, $mRequest, $mSaveprefs;
|
||||
/** Escaped local url name*/
|
||||
var $action;
|
||||
|
||||
/** Constructor*/
|
||||
function UserlevelsForm ( &$request ) {
|
||||
function UserrightsForm ( &$request ) {
|
||||
$this->mPosted = $request->wasPosted();
|
||||
$this->mRequest = $request;
|
||||
$this->mName = 'userlevels';
|
||||
$this->mName = 'userrights';
|
||||
|
||||
$titleObj = Title::makeTitle( NS_SPECIAL, 'Userlevels' );
|
||||
$titleObj = Title::makeTitle( NS_SPECIAL, 'Userrights' );
|
||||
$this->action = $titleObj->escapeLocalURL();
|
||||
}
|
||||
|
||||
|
|
@ -150,10 +150,10 @@ class UserlevelsForm extends HTMLForm {
|
|||
'</td><td>'.
|
||||
HTMLSelectGroups($this->mName.'-groupsavailable', $groups,true,6,true).
|
||||
'</td></tr></table>'."\n".
|
||||
'<p>'.wfMsg('userlevels-groupshelp').'</p>'."\n".
|
||||
'<p>'.wfMsg('userrights-groupshelp').'</p>'."\n".
|
||||
'<input type="submit" name="saveusergroups" value="'.wfMsg('saveusergroups').'" />'
|
||||
));
|
||||
$wgOut->addHTML( "</form>\n" );
|
||||
}
|
||||
} // end class UserlevelsForm
|
||||
} // end class UserrightsForm
|
||||
?>
|
||||
|
|
@ -890,29 +890,29 @@ See [[Project:User preferences help]] for help deciphering the options.",
|
|||
#
|
||||
|
||||
# switching pan
|
||||
'grouplevels-lookup-group' => 'Manage group rights',
|
||||
'grouplevels-group-edit' => 'Existing groups: ',
|
||||
'groups-lookup-group' => 'Manage group rights',
|
||||
'groups-group-edit' => 'Existing groups: ',
|
||||
'editgroup' => 'Edit Group',
|
||||
'addgroup' => 'Add Group',
|
||||
|
||||
'userlevels-lookup-user' => 'Manage user groups',
|
||||
'userlevels-user-editname' => 'Enter a username: ',
|
||||
'userrights-lookup-user' => 'Manage user groups',
|
||||
'userrights-user-editname' => 'Enter a username: ',
|
||||
'editusergroup' => 'Edit User Groups',
|
||||
|
||||
# group editing
|
||||
'grouplevels-editgroup' => 'Edit group',
|
||||
'grouplevels-addgroup' => 'Add group',
|
||||
'grouplevels-editgroup-name' => 'Group name: ',
|
||||
'grouplevels-editgroup-description' => 'Group description (max 255 characters):<br />',
|
||||
'groups-editgroup' => 'Edit group',
|
||||
'groups-addgroup' => 'Add group',
|
||||
'groups-editgroup-name' => 'Group name: ',
|
||||
'groups-editgroup-description' => 'Group description (max 255 characters):<br />',
|
||||
'savegroup' => 'Save Group',
|
||||
|
||||
# user groups editing
|
||||
#
|
||||
'userlevels-editusergroup' => 'Edit user groups',
|
||||
'userrights-editusergroup' => 'Edit user groups',
|
||||
'saveusergroups' => 'Save User Groups',
|
||||
'userlevels-groupsmember' => 'Member of:',
|
||||
'userlevels-groupsavailable' => 'Available groups:',
|
||||
'userlevels-groupshelp' => 'Select groups you want the user to be removed from or added to.
|
||||
'userrights-groupsmember' => 'Member of:',
|
||||
'userrights-groupsavailable' => 'Available groups:',
|
||||
'userrights-groupshelp' => 'Select groups you want the user to be removed from or added to.
|
||||
Unselected groups will not be changed. You can deselect a group with CTRL + Left Click',
|
||||
|
||||
# Recent changes
|
||||
|
|
@ -1140,8 +1140,8 @@ in active use.</p>',
|
|||
'booksources' => 'Book sources',
|
||||
'categoriespagetext' => 'The following categories exist in the wiki.',
|
||||
'data' => 'Data',
|
||||
'userlevels' => 'User rights management',
|
||||
'grouplevels' => 'User group management',
|
||||
'userrights' => 'User rights management',
|
||||
'groups' => 'User groups',
|
||||
|
||||
# FIXME: Other sites, of course, may have affiliate relations with the booksellers list
|
||||
'booksourcetext' => "Below is a list of links to other sites that
|
||||
|
|
|
|||
Loading…
Reference in a new issue