Index: trunk/extensions/Translate/SpecialManageGroups.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Implements classes for Special:Translate/manage from where file based message |
| 4 | + * Implements special page for group management, where file based message |
5 | 5 | * groups are be managed. |
6 | 6 | * |
7 | 7 | * @ingroup SpecialPage |
— | — | @@ -11,23 +11,17 @@ |
12 | 12 | */ |
13 | 13 | |
14 | 14 | /** |
15 | | - * Class for special page Special:Translate/manage. On this special page file |
16 | | - * based message groups can be managed (FileBasedMessageGroup). This page |
| 15 | + * Class for special page Special:ManageMessageGroups. On this special page |
| 16 | + * file based message groups can be managed (FileBasedMessageGroup). This page |
17 | 17 | * allows updating of the file cache, import and fuzzy for source language |
18 | 18 | * messages, as well as import/update of messages in other languages. |
19 | | - * |
20 | | - * @todo Needs documentation. |
21 | 19 | */ |
22 | 20 | class SpecialManageGroups extends SpecialPage { |
23 | 21 | protected $skin, $user, $out; |
24 | | - /** |
25 | | - * Maximum allowed processing time in seconds. |
26 | | - */ |
| 22 | + /// Maximum allowed processing time in seconds. |
27 | 23 | protected $processingTime = 30; |
28 | 24 | |
29 | | - /** |
30 | | - * Constructor |
31 | | - */ |
| 25 | + /// Constructor |
32 | 26 | public function __construct() { |
33 | 27 | global $wgOut, $wgUser; |
34 | 28 | $this->out = $wgOut; |
— | — | @@ -44,9 +38,6 @@ |
45 | 39 | $group = $wgRequest->getText( 'group' ); |
46 | 40 | $group = MessageGroups::getGroup( $group ); |
47 | 41 | |
48 | | - /** |
49 | | - * Only supported for FileBasedMessageGroups. |
50 | | - */ |
51 | 42 | if ( !$group instanceof FileBasedMessageGroup ) { |
52 | 43 | $group = null; |
53 | 44 | } |
— | — | @@ -423,6 +414,7 @@ |
424 | 415 | /** |
425 | 416 | * Reports if processing time for current page has exceeded the set |
426 | 417 | * maximum ($processingTime). |
| 418 | + * @return \bool |
427 | 419 | */ |
428 | 420 | protected function checkProcessTime() { |
429 | 421 | return wfTimestamp() - $this->time >= $this->processingTime; |
— | — | @@ -433,7 +425,7 @@ |
434 | 426 | * based on group and language code. The language part is not shown if |
435 | 427 | * it is 'en', and all three possible parts of the subtitle are linked. |
436 | 428 | * |
437 | | - * @param $group Object MessageGroup. |
| 429 | + * @param $group MessageGroup |
438 | 430 | * @param $code \string Language code. |
439 | 431 | */ |
440 | 432 | protected function setSubtitle( $group, $code ) { |
— | — | @@ -446,16 +438,17 @@ |
447 | 439 | |
448 | 440 | $links[] = $this->skin->link( |
449 | 441 | $this->getTitle(), |
450 | | - $group->getLabel(), |
| 442 | + htmlspecialchars( $group->getLabel() ), |
451 | 443 | array(), |
452 | 444 | array( 'group' => $group->getId() ) |
453 | 445 | ); |
454 | 446 | |
455 | 447 | // Do not show language part for English. |
456 | 448 | if ( $code !== 'en' ) { |
| 449 | + $langname = TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() ); |
457 | 450 | $links[] = $this->skin->link( |
458 | 451 | $this->getTitle(), |
459 | | - TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() ), |
| 452 | + htmlspecialchars( $langname ), |
460 | 453 | array(), |
461 | 454 | array( 'group' => $group->getId(), 'language' => $code ) |
462 | 455 | ); |