r78273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78272‎ | r78273 | r78274 >
Date:20:30, 12 December 2010
Author:ialex
Status:deferred
Tags:
Comment:
Converted IndexFunction extension to use the new version of the LoadExtensionSchemaUpdates hook
Modified paths:
  • /trunk/extensions/IndexFunction/IndexFunction.php (modified) (history)

Diff [purge]

Index: trunk/extensions/IndexFunction/IndexFunction.php
@@ -63,11 +63,14 @@
6464 return true;
6565 }
6666
67 -function efIndexUpdateSchema() {
68 - global $wgExtNewTables;
69 - $wgExtNewTables[] = array(
70 - 'indexes',
71 - dirname( __FILE__ ) . '/indexes.sql' );
 67+function efIndexUpdateSchema( $updater = null ) {
 68+ if ( $updater === null ) {
 69+ global $wgExtNewTables;
 70+ $wgExtNewTables[] = array( 'indexes', dirname( __FILE__ ) . '/indexes.sql' );
 71+ } else {
 72+ $updater->addExtensionUpdate( array( 'addTable', 'indexes',
 73+ dirname( __FILE__ ) . '/indexes.sql', true ) );
 74+ }
7275 return true;
7376 }
7477 function efParserTestTables( &$tables ) {

Status & tagging log