Index: trunk/extensions/Translate/scripts/list-mwext-i18n-files.php |
— | — | @@ -20,6 +20,12 @@ |
21 | 21 | |
22 | 22 | /// Script which lists required i18n files for MediaWiki extensions. |
23 | 23 | class MWExtFileList extends Maintenance { |
| 24 | + |
| 25 | + /** |
| 26 | + * @var array |
| 27 | + */ |
| 28 | + protected $files; |
| 29 | + |
24 | 30 | public function __construct() { |
25 | 31 | parent::__construct(); |
26 | 32 | $this->mDescription = 'Script which lists required i18n files for mediawiki extensions'; |
Index: trunk/extensions/Translate/scripts/yaml-tests.php |
— | — | @@ -79,14 +79,14 @@ |
80 | 80 | return $groups; |
81 | 81 | } |
82 | 82 | |
83 | | - public static function sortNestedArrayAssoc( &$a ) { |
84 | | - ksort( $a ); |
85 | | - foreach ( $a as $key => &$value ) { |
86 | | - if ( is_array( $value ) ) { |
87 | | - self::sortNestedArrayAssoc( $value ); |
88 | | - } |
89 | | - } |
90 | | - } |
| 83 | + public static function sortNestedArrayAssoc( &$a ) { |
| 84 | + ksort( $a ); |
| 85 | + foreach ( $a as &$value ) { |
| 86 | + if ( is_array( $value ) ) { |
| 87 | + self::sortNestedArrayAssoc( $value ); |
| 88 | + } |
| 89 | + } |
| 90 | + } |
91 | 91 | |
92 | 92 | } |
93 | 93 | |
Index: trunk/extensions/Translate/tests/MessageGroupBaseTest.php |
— | — | @@ -1,6 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | class MessageGroupBaseTest extends MediaWikiTestCase { |
| 5 | + |
| 6 | + /** |
| 7 | + * @var MessageGroup |
| 8 | + */ |
| 9 | + protected $group; |
| 10 | + |
5 | 11 | protected $groupConfiguration = array( |
6 | 12 | 'BASIC' => array( |
7 | 13 | 'class' => 'FileBasedMessageGroup', |
— | — | @@ -14,7 +20,6 @@ |
15 | 21 | protected function setUp() { |
16 | 22 | parent::setUp(); |
17 | 23 | $this->group = MessageGroupBase::factory( $this->groupConfiguration ); |
18 | | - |
19 | 24 | } |
20 | 25 | |
21 | 26 | protected function tearDown() { |
Index: trunk/extensions/Translate/tests/RubyYamlFFSTest.php |
— | — | @@ -1,6 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | class RubyYamlFFSTest extends MediaWikiTestCase { |
| 5 | + |
| 6 | + /** |
| 7 | + * @var MessageGroup |
| 8 | + */ |
| 9 | + protected $group; |
| 10 | + |
5 | 11 | protected $groupConfiguration = array( |
6 | 12 | 'BASIC' => array( |
7 | 13 | 'class' => 'FileBasedMessageGroup', |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -63,7 +63,6 @@ |
64 | 64 | * Hook: PageContentLanguage |
65 | 65 | */ |
66 | 66 | public static function onPageContentLanguage( $title, &$pageLang ) { |
67 | | - global $wgTranslateMessageNamespaces; |
68 | 67 | // For translation pages, parse plural, grammar etc with correct language, and set the right direction |
69 | 68 | if ( TranslatablePage::isTranslationPage( $title ) ) { |
70 | 69 | list( , $code ) = TranslateUtils::figureMessage( $title->getText() ); |
Index: trunk/extensions/Translate/specials/SpecialTranslationStats.php |
— | — | @@ -926,7 +926,6 @@ |
927 | 927 | */ |
928 | 928 | class TranslateRegistrationStats extends TranslationStatsBase { |
929 | 929 | public function preQuery( &$tables, &$fields, &$conds, &$type, &$options, $start, $end ) { |
930 | | - $db = wfGetDB( DB_SLAVE ); |
931 | 930 | $tables = 'user'; |
932 | 931 | $fields = 'user_registration'; |
933 | 932 | $conds = self::makeTimeCondition( 'user_registration', $start, $end ); |
Index: trunk/extensions/Translate/Groups.php |
— | — | @@ -135,6 +135,12 @@ |
136 | 136 | |
137 | 137 | protected function __construct() { } |
138 | 138 | |
| 139 | + /** |
| 140 | + * @static |
| 141 | + * @param $conf |
| 142 | + * |
| 143 | + * @return MessageGroup |
| 144 | + */ |
139 | 145 | public static function factory( $conf ) { |
140 | 146 | $obj = new $conf['BASIC']['class'](); |
141 | 147 | $obj->conf = $conf; |