Index: trunk/extensions/CategoryIntersection/CategoryIntersection.php |
— | — | @@ -95,12 +95,18 @@ |
96 | 96 | # new tables needed (based on how ReaderFeedback extension does it) |
97 | 97 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efCategoryIntersectionSchemaUpdates'; |
98 | 98 | |
99 | | -function efCategoryIntersectionSchemaUpdates() { |
100 | | - global $wgDBtype, $wgExtNewTables; |
101 | | - $base = dirname( __FILE__ ); |
102 | | - if ( $wgDBtype == 'mysql' ) { |
103 | | - $wgExtNewTables[] = array( 'categoryintersections', "$base/CategoryIntersection.sql" ); |
104 | | - } |
105 | | - return true; |
| 99 | +function efCategoryIntersectionSchemaUpdates( $updater = null ) { |
| 100 | + $base = dirname( __FILE__ ); |
| 101 | + if ( $updater === null ) { |
| 102 | + global $wgDBtype, $wgExtNewTables; |
| 103 | + if ( $wgDBtype == 'mysql' ) { |
| 104 | + $wgExtNewTables[] = array( 'categoryintersections', "$base/CategoryIntersection.sql" ); |
| 105 | + } |
| 106 | + } else { |
| 107 | + if ( $updater->getDB()->getType() == 'mysql' ) { |
| 108 | + $updater->addExtensionUpdate( array( 'addTable', 'categoryintersections', "$base/CategoryIntersection.sql", true ) ); |
| 109 | + } |
| 110 | + } |
| 111 | + return true; |
106 | 112 | } |
107 | 113 | |