* Manage forms to be shown according to posted data.
* Depending on the submit button used, call a form or a save function.
*
- * @param $par Mixed: string if any subpage provided, else null
+ * @param string|null $par String if any subpage provided, else null
* @throws UserBlockedError|PermissionsError
*/
public function execute( $par ) {
* Save user groups changes in the database.
* Data comes from the editUserGroupsForm() form function
*
- * @param string $username username to apply changes to.
- * @param string $reason reason for group change
+ * @param string $username Username to apply changes to.
+ * @param string $reason Reason for group change
* @param User|UserRightsProxy $user Target user object.
* @return null
*/
/**
* Save user groups changes in the database.
*
- * @param $user User object
- * @param array $add of groups to add
- * @param array $remove of groups to remove
- * @param string $reason reason for group change
- * @return Array: Tuple of added, then removed groups
+ * @param User $user
+ * @param array $add Array of groups to add
+ * @param array $remove Array of groups to remove
+ * @param string $reason Reason for group change
+ * @return array Tuple of added, then removed groups
*/
function doSaveUserGroups( $user, $add, $remove, $reason = '' ) {
global $wgAuth;
/**
* Add a rights log entry for an action.
+ * @param User $user
+ * @param array $oldGroups
+ * @param array $newGroups
+ * @param array $reason
*/
function addLogEntry( $user, $oldGroups, $newGroups, $reason ) {
$logEntry = new ManualLogEntry( 'rights', 'rights' );
/**
* Edit user groups membership
- * @param string $username name of the user.
+ * @param string $username Name of the user.
*/
function editUserGroupsForm( $username ) {
$status = $this->fetchUser( $username );
*
* Side effects: error output for invalid access
* @param string $username
- * @return Status object
+ * @return Status
*/
public function fetchUser( $username ) {
global $wgUserrightsInterwikiDelimiter;
/**
* Make a list of group names to be stored as parameter for log entries
*
- * @deprecated in 1.21; use LogFormatter instead.
- * @param $ids array
+ * @deprecated since 1.21; use LogFormatter instead.
+ * @param array $ids
* @return string
*/
function makeGroupNameListForLog( $ids ) {
* form will be able to manipulate based on the current user's system
* permissions.
*
- * @param array $groups list of groups the given user is in
- * @return Array: Tuple of addable, then removable groups
+ * @param array $groups List of groups the given user is in
+ * @return array Tuple of addable, then removable groups
*/
protected function splitGroups( $groups ) {
list( $addable, $removable, $addself, $removeself ) = array_values( $this->changeableGroups() );
/**
* Show the form to edit group memberships.
*
- * @param $user User or UserRightsProxy you're editing
- * @param $groups Array: Array of groups the user is in
+ * @param User|UserRightsProxy $user User or UserRightsProxy you're editing
+ * @param array $groups Array of groups the user is in
*/
protected function showEditUserGroupsForm( $user, $groups ) {
$list = array();
->rawParams( $userToolLinks )->parse() .
$this->msg( 'userrights-groups-help', $user->getName() )->parse() .
$grouplist .
- Xml::tags( 'p', null, $this->groupCheckboxes( $groups, $user ) ) .
+ $this->groupCheckboxes( $groups, $user ) .
Xml::openElement( 'table', array( 'id' => 'mw-userrights-table-outer' ) ) .
"<tr>
<td class='mw-label'>" .
/**
* Format a link to a group description page
*
- * @param $group string
+ * @param string $group
* @return string
*/
private static function buildGroupLink( $group ) {
/**
* Format a link to a group member description page
*
- * @param $group string
+ * @param string $group
* @return string
*/
private static function buildGroupMemberLink( $group ) {
* Adds a table with checkboxes where you can select what groups to add/remove
*
* @todo Just pass the username string?
- * @param array $usergroups groups the user belongs to
- * @param $user User a user object
+ * @param array $usergroups Groups the user belongs to
+ * @param User $user
* @return string XHTML table element with checkboxes
*/
private function groupCheckboxes( $usergroups, $user ) {
}
/**
- * @param $group String: the name of the group to check
+ * @param string $group The name of the group to check
* @return bool Can we remove the group?
*/
private function canRemove( $group ) {
}
/**
- * @param string $group the name of the group to check
+ * @param string $group The name of the group to check
* @return bool Can we add the group?
*/
private function canAdd( $group ) {
/**
* Returns $this->getUser()->changeableGroups()
*
- * @return array array(
+ * @return array Array(
* 'add' => array( addablegroups ),
* 'remove' => array( removablegroups ),
* 'add-self' => array( addablegroups to self ),
/**
* Show a rights log fragment for the specified user
*
- * @param $user User to show log for
- * @param $output OutputPage to use
+ * @param User $user User to show log for
+ * @param OutputPage $output OutputPage to use
*/
protected function showLogFragment( $user, $output ) {
$rightsLogPage = new LogPage( 'rights' );