r78515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78514‎ | r78515 | r78516 >
Date:20:55, 16 December 2010
Author:ialex
Status:deferred
Tags:
Comment:
Converted PrefStats extension to use the new version of the LoadExtensionSchemaUpdates hook
Modified paths:
  • /trunk/extensions/PrefStats/PrefStats.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PrefStats/PrefStats.hooks.php
@@ -13,9 +13,14 @@
1414 /**
1515 * LoadExtensionSchemaUpdates hook
1616 */
17 - public static function loadExtensionSchemaUpdates() {
18 - global $wgExtNewTables;
19 - $wgExtNewTables[] = array( 'prefstats', dirname( __FILE__ ) . '/patches/PrefStats.sql' );
 17+ public static function loadExtensionSchemaUpdates( $updater = null ) {
 18+ if ( $updater === null ) {
 19+ global $wgExtNewTables;
 20+ $wgExtNewTables[] = array( 'prefstats', dirname( __FILE__ ) . '/patches/PrefStats.sql' );
 21+ } else {
 22+ $updater->addExtensionUpdate( array( 'addTable', 'prefstats',
 23+ dirname( __FILE__ ) . '/patches/PrefStats.sql', true ) );
 24+ }
2025 return true;
2126 }
2227

Status & tagging log