Index: trunk/extensions/UserDailyContribs/UserDailyContribs.hooks.php |
— | — | @@ -13,10 +13,14 @@ |
14 | 14 | /** |
15 | 15 | * LoadExtensionSchemaUpdates hook |
16 | 16 | */ |
17 | | - public static function loadExtensionSchemaUpdates() { |
18 | | - global $wgExtNewTables; |
19 | | - |
20 | | - $wgExtNewTables[] = array( 'user_daily_contribs', dirname( __FILE__ ) . '/patches/UserDailyContribs.sql' ); |
| 17 | + public static function loadExtensionSchemaUpdates( $updater = null ) { |
| 18 | + if ( $updater === null ) { |
| 19 | + global $wgExtNewTables; |
| 20 | + $wgExtNewTables[] = array( 'user_daily_contribs', dirname( __FILE__ ) . '/patches/UserDailyContribs.sql' ); |
| 21 | + } else { |
| 22 | + $updater->addExtensionUpdate( array( 'addTable', 'user_daily_contribs', |
| 23 | + dirname( __FILE__ ) . '/patches/UserDailyContribs.sql', true ) ); |
| 24 | + } |
21 | 25 | return true; |
22 | 26 | } |
23 | 27 | |
— | — | @@ -58,4 +62,4 @@ |
59 | 63 | } |
60 | 64 | return true; |
61 | 65 | } |
62 | | -} |
\ No newline at end of file |
| 66 | +} |