r81522 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81521‎ | r81522 | r81523 >
Date:16:24, 4 February 2011
Author:ialex
Status:deferred
Tags:
Comment:
Converted UserDailyContribs extension to use the new version of the LoadExtensionSchemaUpdates hook
Modified paths:
  • /trunk/extensions/UserDailyContribs/UserDailyContribs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UserDailyContribs/UserDailyContribs.hooks.php
@@ -13,10 +13,14 @@
1414 /**
1515 * LoadExtensionSchemaUpdates hook
1616 */
17 - public static function loadExtensionSchemaUpdates() {
18 - global $wgExtNewTables;
19 -
20 - $wgExtNewTables[] = array( 'user_daily_contribs', dirname( __FILE__ ) . '/patches/UserDailyContribs.sql' );
 17+ public static function loadExtensionSchemaUpdates( $updater = null ) {
 18+ if ( $updater === null ) {
 19+ global $wgExtNewTables;
 20+ $wgExtNewTables[] = array( 'user_daily_contribs', dirname( __FILE__ ) . '/patches/UserDailyContribs.sql' );
 21+ } else {
 22+ $updater->addExtensionUpdate( array( 'addTable', 'user_daily_contribs',
 23+ dirname( __FILE__ ) . '/patches/UserDailyContribs.sql', true ) );
 24+ }
2125 return true;
2226 }
2327
@@ -58,4 +62,4 @@
5963 }
6064 return true;
6165 }
62 -}
\ No newline at end of file
 66+}

Status & tagging log