Index: trunk/extensions/PrefStats/PrefStats.hooks.php |
— | — | @@ -13,9 +13,14 @@ |
14 | 14 | /** |
15 | 15 | * LoadExtensionSchemaUpdates hook |
16 | 16 | */ |
17 | | - public static function loadExtensionSchemaUpdates() { |
18 | | - global $wgExtNewTables; |
19 | | - $wgExtNewTables[] = array( 'prefstats', dirname( __FILE__ ) . '/patches/PrefStats.sql' ); |
| 17 | + public static function loadExtensionSchemaUpdates( $updater = null ) { |
| 18 | + if ( $updater === null ) { |
| 19 | + global $wgExtNewTables; |
| 20 | + $wgExtNewTables[] = array( 'prefstats', dirname( __FILE__ ) . '/patches/PrefStats.sql' ); |
| 21 | + } else { |
| 22 | + $updater->addExtensionUpdate( array( 'addTable', 'prefstats', |
| 23 | + dirname( __FILE__ ) . '/patches/PrefStats.sql', true ) ); |
| 24 | + } |
20 | 25 | return true; |
21 | 26 | } |
22 | 27 | |