X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flogging%2FRightsLogFormatter.php;h=b9dfb6c04436542dfacbfe2121ef96eb2b446dd2;hp=352bda58ca4285ddeac23d1d2b6bbeafcdef5166;hb=e3bd13db0c285f312e31bb1b7271af4628cca80c;hpb=d4cc4117d79648ab5f6d1d3f7dc84b043b073008 diff --git a/includes/logging/RightsLogFormatter.php b/includes/logging/RightsLogFormatter.php index 352bda58ca..b9dfb6c044 100644 --- a/includes/logging/RightsLogFormatter.php +++ b/includes/logging/RightsLogFormatter.php @@ -29,7 +29,7 @@ * @since 1.21 */ class RightsLogFormatter extends LogFormatter { - protected function makePageLink( Title $title = null, $parameters = array() ) { + protected function makePageLink( Title $title = null, $parameters = [], $html = null ) { global $wgContLang, $wgUserrightsInterwikiDelimiter; if ( !$this->plaintext ) { @@ -38,7 +38,7 @@ class RightsLogFormatter extends LogFormatter { if ( count( $parts ) === 2 ) { $titleLink = WikiMap::foreignUserLink( $parts[1], $parts[0], - htmlspecialchars( $title->getPrefixedText() ) ); + htmlspecialchars( $title->getText() ) ); if ( $titleLink !== false ) { return $titleLink; @@ -46,13 +46,14 @@ class RightsLogFormatter extends LogFormatter { } } - return parent::makePageLink( $title, $parameters ); + return parent::makePageLink( $title, $parameters, $title ? $title->getText() : null ); } protected function getMessageKey() { $key = parent::getMessageKey(); $params = $this->getMessageParameters(); if ( !isset( $params[3] ) && !isset( $params[4] ) ) { + // Messages: logentry-rights-rights-legacy $key .= '-legacy'; } @@ -103,12 +104,12 @@ class RightsLogFormatter extends LogFormatter { $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]; @@ -141,7 +142,7 @@ class RightsLogFormatter extends LogFormatter { 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 ) ); }