Index: trunk/extensions/WhosOnline/whosonline.sql |
— | — | @@ -1,7 +1,7 @@ |
2 | | -CREATE TABLE /*$wgDBprefix*/online ( |
| 2 | +CREATE TABLE /*_*/online ( |
3 | 3 | `userid` int(5) NOT NULL default '0', |
4 | 4 | `username` varchar(255) NOT NULL default '', |
5 | 5 | `timestamp` char(14) NOT NULL default '', |
6 | 6 | PRIMARY KEY USING HASH (`userid`, `username`), |
7 | 7 | INDEX USING BTREE (`timestamp`) |
8 | | -) TYPE=MEMORY; |
\ No newline at end of file |
| 8 | +) ENGINE=MEMORY; |
\ No newline at end of file |
Index: trunk/extensions/WhosOnline/WhosOnline.php |
— | — | @@ -62,10 +62,14 @@ |
63 | 63 | // Register database operations |
64 | 64 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'wfWhosOnlineCheckSchema'; |
65 | 65 | |
66 | | -function wfWhosOnlineCheckSchema() { |
67 | | - global $wgExtNewTables; |
68 | | - $wgExtNewTables[] = array( 'online', |
69 | | - dirname( __FILE__ ) . '/whosonline.sql' ); |
70 | | - // Continue |
| 66 | +function wfWhosOnlineCheckSchema( $updater = null ) { |
| 67 | + if ( $updater === null ) { |
| 68 | + global $wgExtNewTables; |
| 69 | + $wgExtNewTables[] = array( 'online', |
| 70 | + dirname( __FILE__ ) . '/whosonline.sql' ); |
| 71 | + } else { |
| 72 | + $updater->addExtensionUpdate( array( 'addTable', 'online', |
| 73 | + dirname( __FILE__ ) . '/whosonline.sql', true ) ); |
| 74 | + } |
71 | 75 | return true; |
72 | 76 | } |