r77196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77195‎ | r77196 | r77197 >
Date:22:34, 23 November 2010
Author:ialex
Status:deferred
Tags:
Comment:
Converted Storyboard extension to use the new version of the LoadExtensionSchemaUpdates hook
Modified paths:
  • /trunk/extensions/Storyboard/Storyboard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/Storyboard.php
@@ -91,13 +91,21 @@
9292 'descriptionmsg' => 'storyboard-desc',
9393 );
9494
95 -function efStoryboardSchemaUpdate() {
96 - global $wgExtNewTables, $egStoryboardDir;
 95+function efStoryboardSchemaUpdate( $updater = null ) {
 96+ global $egStoryboardDir;
9797
98 - $wgExtNewTables[] = array(
99 - 'storyboard',
100 - $egStoryboardDir . 'storyboard.sql'
101 - );
 98+ if ( $updater === null ) {
 99+ global $wgExtNewTables;
 100+ $wgExtNewTables[] = array(
 101+ 'storyboard',
 102+ $egStoryboardDir . 'storyboard.sql'
 103+ );
 104+ } else {
 105+ $updater->addExtensionUpdate( array(
 106+ 'addTable', 'storyboard',
 107+ $egStoryboardDir . 'storyboard.sql', true
 108+ ) );
 109+ }
102110
103111 return true;
104112 }

Status & tagging log