Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -12,8 +12,11 @@ |
13 | 13 | class TranslateEditAddons { |
14 | 14 | const MSG = 'translate-edit-'; |
15 | 15 | |
16 | | - static function addedNavigation( &$text ) { |
| 16 | + static function addNavigation( &$outputpage, &$text ) { |
17 | 17 | global $wgUser, $wgTitle; |
| 18 | + static $done = false; |
| 19 | + if ($done) return true; |
| 20 | + $done = true; |
18 | 21 | |
19 | 22 | if ( !self::isMessageNamespace( $wgTitle ) ) return true; |
20 | 23 | |
— | — | @@ -118,8 +121,8 @@ |
119 | 122 | |
120 | 123 | static function addTools( $object ) { |
121 | 124 | if ( !self::isMessageNamespace( $object->mTitle ) ) return true; |
122 | | - |
123 | | - TranslateEditAddons::addedNavigation( $object->editFormTextTop ); |
| 125 | + |
| 126 | + TranslateEditAddons::addNavigation( &$ignored, $object->editFormTextTop ); |
124 | 127 | $object->editFormTextTop .= self::editBoxes( $object ); |
125 | 128 | |
126 | 129 | return true; |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | $wgSpecialPageGroups['PageTranslation'] = 'pagetools'; |
51 | 51 | |
52 | 52 | $wgHooks['EditPage::showEditForm:initial'][] = 'TranslateEditAddons::addTools'; |
| 53 | +$wgHooks['OutputPageBeforeHTML'][] = 'TranslateEditAddons::addNavigation'; |
53 | 54 | $wgHooks['AlternateEdit'][] = 'TranslateEditAddons::intro'; |
54 | 55 | $wgHooks['EditPageBeforeEditButtons'][] = 'TranslateEditAddons::buttonHack'; |
55 | 56 | $wgHooks['EditPage::showEditForm:fields'][] = 'TranslateEditAddons::keepFields'; |