Index: trunk/extensions/RPED/RPED.hooks.php |
— | — | @@ -1,13 +1,17 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | class RPEDHooks { |
5 | | - public static function RPEDCreateTable() { |
6 | | - global $wgExtNewTables; |
7 | | - |
8 | | - $wgExtNewTables[] = array( |
9 | | - 'rped_page', |
10 | | - dirname( __FILE__ ) . '/rpedtable.sql' |
11 | | - ); |
| 5 | + public static function RPEDCreateTable( $updater = null ) { |
| 6 | + if ( $updater === null ) { |
| 7 | + global $wgExtNewTables; |
| 8 | + $wgExtNewTables[] = array( |
| 9 | + 'rped_page', |
| 10 | + dirname( __FILE__ ) . '/rpedtable.sql' |
| 11 | + ); |
| 12 | + } else { |
| 13 | + $updater->addExtensionUpdate( array( 'addTable', 'rped_page', |
| 14 | + dirname( __FILE__ ) . '/rpedtable.sql', true ) ); |
| 15 | + } |
12 | 16 | return true; |
13 | 17 | } |
14 | 18 | |