Index: trunk/extensions/Translate/scripts/magic-export.php |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | |
82 | 82 | global $wgTranslateExtensionDirectory; |
83 | 83 | $inFile = "$wgTranslateExtensionDirectory/$filename"; |
84 | | - $dir = dirname( $inFile ); |
| 84 | + |
85 | 85 | if ( !file_exists( $inFile ) ) { |
86 | 86 | continue; |
87 | 87 | } |
Index: trunk/extensions/Translate/tests/MessageGroupBaseTest.php |
— | — | @@ -57,7 +57,6 @@ |
58 | 58 | public function testGetNamespaceNumber() { |
59 | 59 | $conf = $this->groupConfiguration; |
60 | 60 | $conf['BASIC']['namespace'] = NS_MEDIAWIKI; |
61 | | - $group = MessageGroupBase::factory( $conf ); |
62 | 61 | |
63 | 62 | $this->assertEquals( |
64 | 63 | NS_MEDIAWIKI, |
— | — | @@ -69,7 +68,6 @@ |
70 | 69 | public function testGetNamespaceString() { |
71 | 70 | $conf = $this->groupConfiguration; |
72 | 71 | $conf['BASIC']['namespace'] = 'mediawiki'; |
73 | | - $group = MessageGroupBase::factory( $conf ); |
74 | 72 | |
75 | 73 | $this->assertEquals( |
76 | 74 | NS_MEDIAWIKI, |
— | — | @@ -85,7 +83,6 @@ |
86 | 84 | public function testGetNamespaceInvalid() { |
87 | 85 | $conf = $this->groupConfiguration; |
88 | 86 | $conf['BASIC']['namespace'] = 'ergweofijwef'; |
89 | | - $group = MessageGroupBase::factory( $conf ); |
90 | 87 | } |
91 | 88 | |
92 | 89 | } |
Index: trunk/extensions/Translate/FFS.php |
— | — | @@ -729,7 +729,7 @@ |
730 | 730 | |
731 | 731 | $messages = $this->flatten( $messages ); |
732 | 732 | $messages = $this->group->getMangler()->mangle( $messages ); |
733 | | - foreach ( $messages as $key => &$value ) { |
| 733 | + foreach ( $messages as &$value ) { |
734 | 734 | $value = rtrim( $value, "\n" ); |
735 | 735 | } |
736 | 736 | |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -429,8 +429,6 @@ |
430 | 430 | protected function setDescriptionMsgReal( $key, $url ) { |
431 | 431 | $this->description = ''; |
432 | 432 | |
433 | | - global $wgLang; |
434 | | - |
435 | 433 | $desc = null; |
436 | 434 | |
437 | 435 | if ( !wfEmptyMsg( $key ) ) { |
Index: trunk/extensions/Translate/tag/SpecialPageTranslationDeletePage.php |
— | — | @@ -154,7 +154,6 @@ |
155 | 155 | |
156 | 156 | $wgOut->addWikiMsg( 'pt-deletepage-intro' ); |
157 | 157 | |
158 | | - $br = Html::element( 'br' ); |
159 | 158 | $subaction = array( 'name' => 'subaction' ); |
160 | 159 | $formParams = array( 'method' => 'post', 'action' => $this->getTitle( $this->text )->getLocalURL() ); |
161 | 160 | |
— | — | @@ -195,7 +194,6 @@ |
196 | 195 | |
197 | 196 | $wgOut->addWikiMsg( 'pt-deletepage-intro' ); |
198 | 197 | |
199 | | - $base = $this->title->getPrefixedText(); |
200 | 198 | $target = $this->title; |
201 | 199 | $count = 1; // Base page |
202 | 200 | |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -584,7 +584,7 @@ |
585 | 585 | } |
586 | 586 | |
587 | 587 | public static function replaceSubtitle( &$subpages, $skin = null , $out = null ) { |
588 | | - global $wgOut, $wgUser; |
| 588 | + global $wgOut; |
589 | 589 | // $out was only added in some MW version |
590 | 590 | if ( $out === null ) $out = $wgOut; |
591 | 591 | $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
Index: trunk/extensions/Translate/tag/SpecialPageTranslationMovePage.php |
— | — | @@ -91,9 +91,7 @@ |
92 | 92 | $this->page = $page; |
93 | 93 | |
94 | 94 | $wgOut->setPagetitle( wfMsg( 'pt-movepage-title', $this->oldText ) ); |
95 | | - $link = $this->user->getSkin()->link( $this->oldTitle ); |
96 | 95 | |
97 | | - |
98 | 96 | if ( !$this->user->isAllowed( 'pagetranslation' ) ) { |
99 | 97 | $wgOut->permissionRequired( 'pagetranslation' ); |
100 | 98 | return; |
Index: trunk/extensions/Translate/utils/CompatibilityCode.php |
— | — | @@ -21,6 +21,8 @@ |
22 | 22 | * which evaluates to a function object which is called. |
23 | 23 | * @param $args Array of arguments to pass to the function. |
24 | 24 | * @since 1.17 |
| 25 | + * |
| 26 | + * @return string |
25 | 27 | */ |
26 | 28 | public static function encodeJsCall( $name, $args ) { |
27 | 29 | $realFunction = array( 'Xml', 'encodeJsCall' ); |
Index: trunk/extensions/Translate/utils/TranslateYaml.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | } |
76 | 76 | |
77 | 77 | public static function fixSyckBooleans( &$yaml ) { |
78 | | - foreach ( $yaml as $key => &$value ) { |
| 78 | + foreach ( $yaml as &$value ) { |
79 | 79 | if ( is_array( $value ) ) { |
80 | 80 | self::fixSyckBooleans( $value ); |
81 | 81 | } elseif ( $value === 'yes' ) { |
Index: trunk/extensions/Translate/utils/ToolBox.php |
— | — | @@ -17,6 +17,10 @@ |
18 | 18 | * Adds link in toolbox to Special:Prefixindex to show all other |
19 | 19 | * available translations for a message. Only shown when it |
20 | 20 | * actually is a translatable/translated message. |
| 21 | + * |
| 22 | + * @param $skin Skin |
| 23 | + * |
| 24 | + * @return bool |
21 | 25 | */ |
22 | 26 | static function toolboxAllTranslations( &$skin ) { |
23 | 27 | global $wgTranslateMessageNamespaces; |
Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php |
— | — | @@ -286,8 +286,6 @@ |
287 | 287 | } |
288 | 288 | |
289 | 289 | protected function makeGroupRow( $group, $cache, $parent = false ) { |
290 | | - global $wgLang; |
291 | | - |
292 | 290 | $out = ''; |
293 | 291 | $code = $this->code; |
294 | 292 | $suppressComplete = $this->suppressComplete; |
— | — | @@ -422,7 +420,6 @@ |
423 | 421 | } |
424 | 422 | |
425 | 423 | protected function makeGroupLink( $group, $code, $params ) { |
426 | | - global $wgOut; |
427 | 424 | |
428 | 425 | $queryParameters = $params + array( |
429 | 426 | 'group' => $group->getId(), |