* @since 1.21
*/
class RightsLogFormatter extends LogFormatter {
- protected function makePageLink( Title $title = null, $parameters = array(), $html = null ) {
+ protected function makePageLink( Title $title = null, $parameters = [], $html = null ) {
global $wgContLang, $wgUserrightsInterwikiDelimiter;
if ( !$this->plaintext ) {
$key = parent::getMessageKey();
$params = $this->getMessageParameters();
if ( !isset( $params[3] ) && !isset( $params[4] ) ) {
+ // Messages: logentry-rights-rights-legacy
$key .= '-legacy';
}
$entry = $this->entry;
$params = $entry->getParameters();
- static $map = array(
+ static $map = [
'4:array:oldgroups',
'5:array:newgroups',
'4::oldgroups' => '4:array:oldgroups',
'5::newgroups' => '5:array:newgroups',
- );
+ ];
foreach ( $map as $index => $key ) {
if ( isset( $params[$index] ) ) {
$params[$key] = $params[$index];
private function makeGroupArray( $group ) {
// Migrate old group params from string to array
if ( $group === '' ) {
- $group = array();
+ $group = [];
} elseif ( is_string( $group ) ) {
$group = array_map( 'trim', explode( ',', $group ) );
}