Index: trunk/extensions/DonationInterface/GeoIP/GeoIP.php |
— | — | @@ -43,12 +43,14 @@ |
44 | 44 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'fnGeoIPSchema'; |
45 | 45 | $wgSpecialPages['GeoIP'] = 'GeoIP'; |
46 | 46 | |
47 | | -function fnGeoIPSchema() { |
48 | | - global $wgExtNewTables; |
49 | | - $wgExtNewTables[] = array( |
50 | | - 'geoip', |
51 | | - dirname( __FILE__ ) . '/GeoIP.sql' |
52 | | - ); |
| 47 | +function fnGeoIPSchema( $updater = null ) { |
| 48 | + if ( $updater === null ) { |
| 49 | + global $wgExtNewTables; |
| 50 | + $wgExtNewTables[] = array( 'geoip', dirname( __FILE__ ) . '/GeoIP.sql' ); |
| 51 | + } else { |
| 52 | + $updater->addExtensionUpdate( array( 'addTable', 'geoip', |
| 53 | + dirname( __FILE__ ) . '/GeoIP.sql', true ) ); |
| 54 | + } |
53 | 55 | return true; |
54 | 56 | } |
55 | 57 | |