setHeaders(); $this->outputHeader(); $out = $this->getOutput(); $out->addModuleStyles( 'mediawiki.special' ); $out->addHTML( \Html::openElement( 'table', array( 'class' => 'wikitable mw-listgrouprights-table' ) ) . '' . \Html::element( 'th', null, $this->msg( 'listgrants-grant' )->text() ) . \Html::element( 'th', null, $this->msg( 'listgrants-rights' )->text() ) . '' ); foreach ( $this->getConfig()->get( 'GrantPermissions' ) as $grant => $rights ) { $descs = array(); $rights = array_filter( $rights ); // remove ones with 'false' foreach ( $rights as $permission => $granted ) { $descs[] = $this->msg( 'listgrouprights-right-display', \User::getRightDescription( $permission ), '' . $permission . '' )->parse(); } if ( !count( $descs ) ) { $grantCellHtml = ''; } else { sort( $descs ); $grantCellHtml = ''; } $id = \Sanitizer::escapeId( $grant ); $out->addHTML( \Html::rawElement( 'tr', array( 'id' => $id ), "" . $this->msg( "grant-$grant" )->escaped() . "" . "" . $grantCellHtml . '' ) ); } $out->addHTML( \Html::closeElement( 'table' ) ); } protected function getGroupName() { return 'users'; } }