public function userCanChangeRights( $user, $checkIfSelf = true ) {
$available = $this->changeableGroups();
+ if ( $user->getId() == 0 ) {
+ return false;
+ }
return !empty( $available['add'] )
|| !empty( $available['remove'] )
|| ( ( $this->isself || !$checkIfSelf ) &&
$grouplist = '';
$count = count( $list );
if( $count > 0 ) {
- $grouplist = $this->msg( 'userrights-groupsmember', $count )->parse();
+ $grouplist = $this->msg( 'userrights-groupsmember', $count, $user->getName() )->parse();
$grouplist = '<p>' . $grouplist . ' ' . $this->getLanguage()->listToText( $list ) . "</p>\n";
}
$count = count( $autolist );
if( $count > 0 ) {
- $autogrouplistintro = $this->msg( 'userrights-groupsmember-auto', $count )->parse();
+ $autogrouplistintro = $this->msg( 'userrights-groupsmember-auto', $count, $user->getName() )->parse();
$grouplist .= '<p>' . $autogrouplistintro . ' ' . $this->getLanguage()->listToText( $autolist ) . "</p>\n";
}
$this->msg( 'userrights-groups-help', $user->getName() )->parse() .
$grouplist .
Xml::tags( 'p', null, $this->groupCheckboxes( $groups, $user ) ) .
- Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-userrights-table-outer' ) ) .
+ Xml::openElement( 'table', array( 'id' => 'mw-userrights-table-outer' ) ) .
"<tr>
<td class='mw-label'>" .
Xml::label( $this->msg( 'userrights-reason' )->text(), 'wpReason' ) .
}
# Build the HTML table
- $ret .= Xml::openElement( 'table', array( 'border' => '0', 'class' => 'mw-userrights-groups' ) ) .
+ $ret .= Xml::openElement( 'table', array( 'class' => 'mw-userrights-groups' ) ) .
"<tr>\n";
foreach( $columns as $name => $column ) {
if( $column === array() )
* @param $output OutputPage to use
*/
protected function showLogFragment( $user, $output ) {
- $output->addHTML( Xml::element( 'h2', null, LogPage::logName( 'rights' ) . "\n" ) );
+ $rightsLogPage = new LogPage( 'rights' );
+ $output->addHTML( Xml::element( 'h2', null, $rightsLogPage->getName()->text() ) );
LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage() );
}
}