r94993 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94992‎ | r94993 | r94994 >
Date:10:21, 19 August 2011
Author:flohack
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/CollabWatchlist/CollabWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CollabWatchlist/CollabWatchlist.php
@@ -45,30 +45,29 @@
4646 $wgHooks['LoadExtensionSchemaUpdates'][] = 'fnCollabWatchlistDbSchema';
4747 $wgHooks['GetPreferences'][] = 'fnCollabWatchlistPreferences';
4848
49 -function fnCollabWatchlistDbSchema() {
50 - global $updater;
51 - $wgSql = dirname(__FILE__) . '/sql/';
 49+function fnCollabWatchlistDbSchema( $updater = null ) {
 50+ $sqlDir = dirname(__FILE__) . '/sql/';
5251 if ( $updater === null ) { // <= 1.16 support
5352 global $wgExtNewTables, $wgExtNewFields;
54 - $wgExtNewTables[] = array('collabwatchlist', $wgSql . 'collabwatchlist.sql');
55 - $wgExtNewTables[] = array('collabwatchlistuser', $wgSql . 'collabwatchlistuser.sql');
56 - $wgExtNewTables[] = array('collabwatchlistcategory', $wgSql . 'collabwatchlistcategory.sql');
57 - $wgExtNewTables[] = array('collabwatchlistrevisiontag', $wgSql . 'collabwatchlistrevisiontag.sql');
58 - $wgExtNewTables[] = array('collabwatchlisttag', $wgSql . 'collabwatchlisttag.sql');
59 - $wgExtNewFields[] = array('collabwatchlistrevisiontag', 'ct_rc_id', $wgSql . 'patch-collabwatchlist_noctid.sql');
 53+ $wgExtNewTables[] = array('collabwatchlist', $sqlDir . 'collabwatchlist.sql');
 54+ $wgExtNewTables[] = array('collabwatchlistuser', $sqlDir . 'collabwatchlistuser.sql');
 55+ $wgExtNewTables[] = array('collabwatchlistcategory', $sqlDir . 'collabwatchlistcategory.sql');
 56+ $wgExtNewTables[] = array('collabwatchlistrevisiontag', $sqlDir . 'collabwatchlistrevisiontag.sql');
 57+ $wgExtNewTables[] = array('collabwatchlisttag', $sqlDir . 'collabwatchlisttag.sql');
 58+ $wgExtNewFields[] = array('collabwatchlistrevisiontag', 'ct_rc_id', $sqlDir . 'patch-collabwatchlist_noctid.sql');
6059 } else { // >= 1.17 support
6160 $updater->addExtensionUpdate( array ( 'addTable', 'collabwatchlist',
62 - $wgSql . 'collabwatchlist.sql', true ) );
 61+ $sqlDir . 'collabwatchlist.sql', true ) );
6362 $updater->addExtensionUpdate( array ( 'addTable', 'collabwatchlistuser',
64 - $wgSql . 'collabwatchlistuser.sql', true ) );
 63+ $sqlDir . 'collabwatchlistuser.sql', true ) );
6564 $updater->addExtensionUpdate( array ( 'addTable', 'collabwatchlistcategory',
66 - $wgSql . 'collabwatchlistcategory.sql', true ) );
 65+ $sqlDir . 'collabwatchlistcategory.sql', true ) );
6766 $updater->addExtensionUpdate( array ( 'addTable', 'collabwatchlistrevisiontag',
68 - $wgSql . 'collabwatchlistrevisiontag.sql', true ) );
 67+ $sqlDir . 'collabwatchlistrevisiontag.sql', true ) );
6968 $updater->addExtensionUpdate( array ( 'addTable', 'collabwatchlisttag',
70 - $wgSql . 'collabwatchlisttag.sql', true ) );
 69+ $sqlDir . 'collabwatchlisttag.sql', true ) );
7170 $updater->addExtensionUpdate( array( 'modifyField', 'collabwatchlistrevisiontag', 'ct_rc_id',
72 - $wgSql . 'patch-collabwatchlist_noctid.sql', true ) );
 71+ $sqlDir . 'patch-collabwatchlist_noctid.sql', true ) );
7372 }
7473 return true;
7574 }

Status & tagging log