Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -343,14 +343,20 @@ |
344 | 344 | return true; |
345 | 345 | } |
346 | 346 | |
347 | | - public static function schemaUpdates() { |
348 | | - global $wgExtNewTables, $wgExtNewFields; |
349 | | - |
| 347 | + public static function schemaUpdates( $updater = null ) { |
350 | 348 | $dir = dirname( __FILE__ ) . '/..'; |
351 | | - $wgExtNewTables[] = array( 'translate_sections', "$dir/translate.sql" ); |
352 | | - $wgExtNewFields[] = array( 'translate_sections', 'trs_order', "$dir/translate-add-trs_order.patch.sql" ); |
353 | | - $wgExtNewTables[] = array( 'revtag_type', "$dir/revtags.sql" ); |
354 | 349 | |
| 350 | + if ( $updater === null ) { |
| 351 | + global $wgExtNewTables, $wgExtNewFields; |
| 352 | + |
| 353 | + $wgExtNewTables[] = array( 'translate_sections', "$dir/translate.sql" ); |
| 354 | + $wgExtNewFields[] = array( 'translate_sections', 'trs_order', "$dir/translate-add-trs_order.patch.sql" ); |
| 355 | + $wgExtNewTables[] = array( 'revtag_type', "$dir/revtags.sql" ); |
| 356 | + } else { |
| 357 | + $updater->addExtensionUpdate( array( 'addTable', 'translate_sections', "$dir/translate.sql" ) ); |
| 358 | + $updater->addExtensionUpdate( array( 'addField', 'translate_sections', 'trs_order', "$dir/translate-add-trs_order.patch.sql" ) ); |
| 359 | + $updater->addExtensionUpdate( array( 'addTable', 'revtag_type', "$dir/revtags.sql" ) ); |
| 360 | + } |
355 | 361 | return true; |
356 | 362 | } |
357 | 363 | |