r56348 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56347‎ | r56348 | r56349 >
Date:23:04, 14 September 2009
Author:purodha
Status:deferred
Tags:
Comment:
partial revert and fix of r56344
Modified paths:
  • /trunk/extensions/Translate/Translate.php (modified) (history)
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -12,8 +12,11 @@
1313 class TranslateEditAddons {
1414 const MSG = 'translate-edit-';
1515
16 - static function addedNavigation( &$text ) {
 16+ static function addNavigation( &$outputpage, &$text ) {
1717 global $wgUser, $wgTitle;
 18+ static $done = false;
 19+ if ($done) return true;
 20+ $done = true;
1821
1922 if ( !self::isMessageNamespace( $wgTitle ) ) return true;
2023
@@ -118,8 +121,8 @@
119122
120123 static function addTools( $object ) {
121124 if ( !self::isMessageNamespace( $object->mTitle ) ) return true;
122 -
123 - TranslateEditAddons::addedNavigation( $object->editFormTextTop );
 125+
 126+ TranslateEditAddons::addNavigation( &$ignored, $object->editFormTextTop );
124127 $object->editFormTextTop .= self::editBoxes( $object );
125128
126129 return true;
Index: trunk/extensions/Translate/Translate.php
@@ -49,6 +49,7 @@
5050 $wgSpecialPageGroups['PageTranslation'] = 'pagetools';
5151
5252 $wgHooks['EditPage::showEditForm:initial'][] = 'TranslateEditAddons::addTools';
 53+$wgHooks['OutputPageBeforeHTML'][] = 'TranslateEditAddons::addNavigation';
5354 $wgHooks['AlternateEdit'][] = 'TranslateEditAddons::intro';
5455 $wgHooks['EditPageBeforeEditButtons'][] = 'TranslateEditAddons::buttonHack';
5556 $wgHooks['EditPage::showEditForm:fields'][] = 'TranslateEditAddons::keepFields';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56344Show the local navigation even if the current page did not yet exist.purodha22:06, 14 September 2009

Status & tagging log