Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | if( !empty($wgFlaggedRevTags) ) { |
33 | 33 | self::$qualityVersions = true; |
34 | 34 | self::$pristineVersions = true; |
35 | | - self::$binaryFlagging = (count($wgFlaggedRevTags) == 1); |
| 35 | + self::$binaryFlagging = (count($wgFlaggedRevTags) <= 1); |
36 | 36 | } |
37 | 37 | foreach( $wgFlaggedRevTags as $tag => $levels ) { |
38 | 38 | # Sanity checks |
— | — | @@ -342,7 +342,7 @@ |
343 | 343 | } |
344 | 344 | |
345 | 345 | /** |
346 | | - * Get the message name for a tag |
| 346 | + * Get the UI name for a tag |
347 | 347 | * @param string $tag |
348 | 348 | * @returns string |
349 | 349 | */ |
— | — | @@ -357,11 +357,12 @@ |
358 | 358 | */ |
359 | 359 | public static function getTagLevels( $tag ) { |
360 | 360 | self::load(); |
361 | | - return isset(self::$dimensions[$tag]) ? self::$dimensions[$tag] : array(); |
| 361 | + return isset(self::$dimensions[$tag]) ? |
| 362 | + self::$dimensions[$tag] : array(); |
362 | 363 | } |
363 | 364 | |
364 | 365 | /** |
365 | | - * Get the the message name for a value of a tag |
| 366 | + * Get the the UI name for a value of a tag |
366 | 367 | * @param string $tag |
367 | 368 | * @param int $value |
368 | 369 | * @returns string |
— | — | @@ -369,10 +370,12 @@ |
370 | 371 | public static function getTagValueMsg( $tag, $value ) { |
371 | 372 | self::load(); |
372 | 373 | if( !isset(self::$dimensions[$tag]) ) |
373 | | - return ""; |
| 374 | + return ''; |
| 375 | + if( !isset(self::$dimensions[$tag][$value]) ) |
| 376 | + return ''; |
374 | 377 | # Return empty string if not there |
375 | | - return isset(self::$dimensions[$tag][$value]) ? |
376 | | - self::$dimensions[$tag][$value] : ""; |
| 378 | + return wfMsgExt( 'revreview-' . self::$dimensions[$tag][$value], |
| 379 | + array( 'escapenoentities' ) ); |
377 | 380 | } |
378 | 381 | |
379 | 382 | /** |