r81472 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81471‎ | r81472 | r81473 >
Date:17:34, 3 February 2011
Author:ialex
Status:deferred
Tags:
Comment:
Converted RPED extension to use the new version of the LoadExtensionSchemaUpdates hook
Modified paths:
  • /trunk/extensions/RPED/RPED.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RPED/RPED.hooks.php
@@ -1,13 +1,17 @@
22 <?php
33
44 class RPEDHooks {
5 - public static function RPEDCreateTable() {
6 - global $wgExtNewTables;
7 -
8 - $wgExtNewTables[] = array(
9 - 'rped_page',
10 - dirname( __FILE__ ) . '/rpedtable.sql'
11 - );
 5+ public static function RPEDCreateTable( $updater = null ) {
 6+ if ( $updater === null ) {
 7+ global $wgExtNewTables;
 8+ $wgExtNewTables[] = array(
 9+ 'rped_page',
 10+ dirname( __FILE__ ) . '/rpedtable.sql'
 11+ );
 12+ } else {
 13+ $updater->addExtensionUpdate( array( 'addTable', 'rped_page',
 14+ dirname( __FILE__ ) . '/rpedtable.sql', true ) );
 15+ }
1216 return true;
1317 }
1418

Status & tagging log