http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73284
Revision: 73284 Author: ialex Date: 2010-09-18 11:31:34 +0000 (Sat, 18 Sep 2010) Log Message: ----------- Coverted AntiSpoof extension to use the new version of the LoadExtensionSchemaUpdates hook Modified Paths: -------------- trunk/extensions/AntiSpoof/AntiSpoof.php Modified: trunk/extensions/AntiSpoof/AntiSpoof.php =================================================================== --- trunk/extensions/AntiSpoof/AntiSpoof.php 2010-09-18 11:24:45 UTC (rev 73283) +++ trunk/extensions/AntiSpoof/AntiSpoof.php 2010-09-18 11:31:34 UTC (rev 73284) @@ -41,11 +41,16 @@ $wgHooks['UserCreateForm'][] = 'asUserCreateFormHook'; $wgHooks['AddNewAccount'][] = 'asAddNewAccountHook'; -function asUpdateSchema() { - global $wgExtNewTables, $wgDBtype; - $wgExtNewTables[] = array( - 'spoofuser', - dirname( __FILE__ ) . '/sql/patch-antispoof.' . $wgDBtype . '.sql' ); +function asUpdateSchema( $updater = null ) { + if ( $updater === null ) { + global $wgExtNewTables, $wgDBtype; + $wgExtNewTables[] = array( + 'spoofuser', + dirname( __FILE__ ) . '/sql/patch-antispoof.' . $wgDBtype . '.sql' ); + } else { + $updater->addExtensionUpdate( array( 'addTable', 'spoofuser', + dirname( __FILE__ ) . '/sql/patch-antispoof.' . $updater->getDB()->getType() . '.sql' ) ); + } return true; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs