Index: trunk/extensions/CategoryMultisort/CategoryMultisort.hooks.php |
— | — | @@ -30,14 +30,20 @@ |
31 | 31 | $this->integrate = $integrate; |
32 | 32 | } |
33 | 33 | |
34 | | - function onLoadExtensionSchemaUpdates() { |
35 | | - global $wgExtNewTables, $wgDBtype; |
36 | | - |
37 | | - $sql = dirname( __FILE__ ) . "/tables.$wgDBtype.sql"; |
38 | | - if ( file_exists( $sql ) ) { |
39 | | - $wgExtNewTables[] = array( 'categorylinks_multisort', $sql ); |
| 34 | + function onLoadExtensionSchemaUpdates( $updater = null ) { |
| 35 | + if ( $updater === null ) { |
| 36 | + global $wgExtNewTables, $wgDBtype; |
| 37 | + $sql = dirname( __FILE__ ) . "/tables.$wgDBtype.sql"; |
| 38 | + if ( file_exists( $sql ) ) { |
| 39 | + $wgExtNewTables[] = array( 'categorylinks_multisort', $sql ); |
| 40 | + } |
| 41 | + } else { |
| 42 | + $sql = dirname( __FILE__ ) . '/tables.' . $updater->getDB()->getType() . '.sql'; |
| 43 | + if ( file_exists( $sql ) ) { |
| 44 | + $updater->addExtensionUpdate( array( 'addTable', 'categorylinks_multisort', $sql, true ) ); |
| 45 | + } |
40 | 46 | } |
41 | | - |
| 47 | + |
42 | 48 | return true; |
43 | 49 | } |
44 | 50 | |