r76513 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76512‎ | r76513 | r76514 >
Date:12:01, 11 November 2010
Author:ialex
Status:ok
Tags:
Comment:
Converted ProofreadPage extension to use the new version of the LoadExtensionSchemaUpdates hook
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php
@@ -125,10 +125,15 @@
126126 return true;
127127 }
128128
129 - function schema_update() {
130 - global $wgExtNewTables;
 129+ function schema_update( $updater = null ) {
131130 $base = dirname( __FILE__ );
132 - $wgExtNewTables[] = array( 'pr_index', "$base/ProofreadPage.sql" );
 131+ if ( $updater === null ) {
 132+ global $wgExtNewTables;
 133+ $wgExtNewTables[] = array( 'pr_index', "$base/ProofreadPage.sql" );
 134+ } else {
 135+ $updater->addExtensionUpdate( array( 'addTable', 'pr_index',
 136+ "$base/ProofreadPage.sql", true ) );
 137+ }
133138 return true;
134139 }
135140

Status & tagging log