Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
PageTriageLogFormatter | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
getMessageParameters | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\PageTriage; |
4 | |
5 | use LogFormatter; |
6 | |
7 | /** |
8 | * Formats the logs for display on Special:Log |
9 | */ |
10 | class PageTriageLogFormatter extends LogFormatter { |
11 | |
12 | /** |
13 | * @inheritDoc |
14 | */ |
15 | protected function getMessageParameters() { |
16 | $lang = $this->context->getLanguage(); |
17 | $params = parent::getMessageParameters(); |
18 | $parameters = $this->entry->getParameters(); |
19 | |
20 | // backward compatibility |
21 | if ( isset( $parameters['4::tags'] ) ) { |
22 | $params[3] = $lang->listToText( $parameters['4::tags'] ); |
23 | $params[4] = count( $parameters['4::tags'] ); |
24 | } else { |
25 | $params[3] = $lang->listToText( $parameters['tags'] ); |
26 | $params[4] = count( $parameters['tags'] ); |
27 | } |
28 | |
29 | return $params; |
30 | } |
31 | } |