$this->setHeaders();
$this->outputHeader();
- $out->addModuleStyles( 'mediawiki.special.userrights.styles' );
+ $out->addModuleStyles( 'mediawiki.special' );
$this->addHelpLink( 'Help:Assigning permissions' );
$this->switchForm();
/**
* Adds a table with checkboxes where you can select what groups to add/remove
*
- * @param array $usergroups Associative array of (group name as string =>
+ * @param UserGroupMembership[] $usergroups Associative array of (group name as string =>
* UserGroupMembership object) for groups the user belongs to
* @param User $user
* @return Array with 2 elements: the XHTML table element with checkxboes, and
} else {
$expiryHtml = $this->msg( 'userrights-expiry-none' )->text();
}
+ // T171345: Add a hidden form element so that other groups can still be manipulated,
+ // otherwise saving errors out with an invalid expiry time for this group.
+ $expiryHtml .= Html::Hidden( "wpExpiry-$group",
+ $currentExpiry ? 'existing' : 'infinite' );
$expiryHtml .= "<br />\n";
} else {
$expiryHtml = Xml::element( 'span', null,