r98344 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98343‎ | r98344 | r98345 >
Date:18:32, 28 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix old style updater, add new style updater too
Modified paths:
  • /trunk/extensions/SignupAPI/includes/SignupAPI.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SignupAPI/includes/SignupAPI.hooks.php
@@ -8,13 +8,23 @@
99
1010 class SignupAPIHooks {
1111
12 - static function onSourceTracking() {
13 - global $wgExtNewTables;
 12+ /**
 13+ * @param $updater DatabaseUpdater
 14+ * @return bool
 15+ */
 16+ static function onSourceTracking( $updater = null ) {
 17+ if ( $updater !== null ) {
 18+ $base = dirname( dirname( __FILE__ ) );
 19+ $updater->addExtensionUpdate( array( 'addTable', 'sourcetracking',
 20+ "$base/sourcetracking.sql", true ) );
 21+ } else {
 22+ global $wgExtNewTables;
1423
15 - $wgExtNewTables[] = array(
16 - 'sourcetracking',
17 - dirname( __FILE__ ) . '/sourcetracking.sql'
18 - );
 24+ $wgExtNewTables[] = array(
 25+ 'sourcetracking',
 26+ 'sourcetracking.sql'
 27+ );
 28+ }
1929 return true;
2030 }
2131

Status & tagging log