X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flogging%2FPatrolLogFormatter.php;h=5b933ce269651c631b15ca6eac439f68fb0475bb;hb=6fa889309d6dde3bcfd1c5f939e317abf0f3e790;hp=7fe0143ffb82ec3b5ae12901374e1d08acdd7fd3;hpb=9c092814c7f275db78a6ed769aa76fdd87709c60;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/PatrolLogFormatter.php b/includes/logging/PatrolLogFormatter.php index 7fe0143ffb..5b933ce269 100644 --- a/includes/logging/PatrolLogFormatter.php +++ b/includes/logging/PatrolLogFormatter.php @@ -30,10 +30,11 @@ */ class PatrolLogFormatter extends LogFormatter { protected function getMessageKey() { - $key = parent::getMessageKey(); $params = $this->getMessageParameters(); if ( isset( $params[5] ) && $params[5] ) { - $key .= '-auto'; + $key = 'logentry-patrol-patrol-auto'; + } else { + $key = 'logentry-patrol-patrol'; } return $key; @@ -49,11 +50,11 @@ class PatrolLogFormatter extends LogFormatter { if ( $this->plaintext ) { $revlink = $revision; } elseif ( $target->exists() ) { - $query = array( + $query = [ 'oldid' => $oldid, 'diff' => 'prev' - ); - $revlink = Linker::link( $target, htmlspecialchars( $revision ), array(), $query ); + ]; + $revlink = Linker::link( $target, htmlspecialchars( $revision ), [], $query ); } else { $revlink = htmlspecialchars( $revision ); } @@ -67,14 +68,14 @@ class PatrolLogFormatter extends LogFormatter { $entry = $this->entry; $params = $entry->getParameters(); - static $map = array( + static $map = [ '4:number:curid', '5:number:previd', '6:bool:auto', '4::curid' => '4:number:curid', '5::previd' => '5:number:previd', '6::auto' => '6:bool:auto', - ); + ]; foreach ( $map as $index => $key ) { if ( isset( $params[$index] ) ) { $params[$key] = $params[$index];