Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -385,16 +385,6 @@ |
386 | 386 | return true; |
387 | 387 | } |
388 | 388 | |
389 | | - public static function schemaUpdates( $updater ) { |
390 | | - $dir = dirname( __FILE__ ) . '/../sql'; |
391 | | - |
392 | | - $updater->addExtensionUpdate( array( 'addTable', 'translate_sections', "$dir/translate_sections.sql", true ) ); |
393 | | - $updater->addExtensionUpdate( array( 'addField', 'translate_sections', 'trs_order', "$dir/translate_sections-trs_order.patch.sql", true ) ); |
394 | | - $updater->addExtensionUpdate( array( 'addTable', 'revtag', "$dir/revtag.sql", true ) ); |
395 | | - $updater->addExtensionUpdate( array( 'addTable', 'translate_groupstats', "$dir/translate_groupstats.sql", true ) ); |
396 | | - return true; |
397 | | - } |
398 | | - |
399 | 389 | /// @todo: fix method name. |
400 | 390 | public static function test( &$article, &$outputDone, &$pcache ) { |
401 | 391 | if ( !$article->getOldID() ) { |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | $wgExtensionFunctions[] = 'TranslateHooks::setupTranslate'; |
54 | 54 | $wgHooks['CanonicalNamespaces'][] = 'TranslateHooks::setupNamespaces'; |
55 | 55 | $wgHooks['UnitTestsList'][] = 'TranslateHooks::setupUnitTests'; |
| 56 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'TranslateHooks::schemaUpdates'; |
56 | 57 | |
57 | 58 | // Register special pages into MediaWiki |
58 | 59 | $wgSpecialPages['Translate'] = 'SpecialTranslate'; |
— | — | @@ -92,8 +93,6 @@ |
93 | 94 | $wgHooks['SkinTemplateTabs'][] = 'TranslateEditAddons::tabs'; |
94 | 95 | $wgHooks['LanguageGetTranslatedLanguageNames'][] = 'TranslateEditAddons::translateMessageDocumentationLanguage'; |
95 | 96 | $wgHooks['ArticlePrepareTextForEdit'][] = 'TranslateEditAddons::disablePreSaveTransform'; |
96 | | -// Hook for database schema. |
97 | | -$wgHooks['LoadExtensionSchemaUpdates'][] = 'PageTranslationHooks::schemaUpdates'; |
98 | 97 | // Fuzzy tags for speed. |
99 | 98 | $wgHooks['ArticleSaveComplete'][] = 'TranslateEditAddons::onSave'; |
100 | 99 | $wgHooks['Translate:newTranslation'][] = 'TranslateEditAddons::updateTransverTag'; |
Index: trunk/extensions/Translate/TranslateHooks.php |
— | — | @@ -160,4 +160,15 @@ |
161 | 161 | return true; |
162 | 162 | } |
163 | 163 | |
| 164 | + /// Hook: LoadExtensionSchemaUpdates |
| 165 | + public static function schemaUpdates( $updater ) { |
| 166 | + $dir = dirname( __FILE__ ) . '/sql'; |
| 167 | + |
| 168 | + $updater->addExtensionUpdate( array( 'addTable', 'translate_sections', "$dir/translate_sections.sql", true ) ); |
| 169 | + $updater->addExtensionUpdate( array( 'addField', 'translate_sections', 'trs_order', "$dir/translate_sections-trs_order.patch.sql", true ) ); |
| 170 | + $updater->addExtensionUpdate( array( 'addTable', 'revtag', "$dir/revtag.sql", true ) ); |
| 171 | + $updater->addExtensionUpdate( array( 'addTable', 'translate_groupstats', "$dir/translate_groupstats.sql", true ) ); |
| 172 | + return true; |
| 173 | + } |
| 174 | + |
164 | 175 | } |