r74138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74137‎ | r74138 | r74139 >
Date:08:55, 2 October 2010
Author:ialex
Status:ok
Tags:
Comment:
removed calls to dbsource()
Modified paths:
  • /trunk/extensions/AbuseFilter/install.php (modified) (history)
  • /trunk/extensions/LiquidThreads/migrateDatabase.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMVAdmin.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/mv_update.php (modified) (history)
  • /trunk/extensions/MultilingualLiquidThreads/LiquidThreads/migrateDatabase.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MultilingualLiquidThreads/LiquidThreads/migrateDatabase.php
@@ -34,19 +34,19 @@
3535
3636 foreach ( $threadFieldUpdates as $field => $patch ) {
3737 if ( !$db->fieldExists( 'thread', $field, 'lqt-update-script' ) ) {
38 - dbsource( dirname( __FILE__ ) . '/schema-changes/' . $patch );
 38+ $db->sourceFile( dirname( __FILE__ ) . '/schema-changes/' . $patch );
3939 }
4040 }
4141
4242 foreach ( $threadIndexUpdates as $index => $patch ) {
4343 if ( !$db->indexExists( 'thread', $index, 'lqt-update-script' ) ) {
44 - dbsource( dirname( __FILE__ ) . '/schema-changes/' . $patch );
 44+ $db->sourceFile( dirname( __FILE__ ) . '/schema-changes/' . $patch );
4545 }
4646 }
4747
4848 foreach ( $newTableUpdates as $table => $patch ) {
4949 if ( !$db->tableExists( $table, 'lqt-update-script' ) ) {
50 - dbsource( dirname( __FILE__ ) . '/schema-changes/' . $patch );
 50+ $db->sourceFile( dirname( __FILE__ ) . '/schema-changes/' . $patch );
5151 }
5252 }
5353
Index: trunk/extensions/LiquidThreads/migrateDatabase.php
@@ -34,19 +34,19 @@
3535
3636 foreach ( $threadFieldUpdates as $field => $patch ) {
3737 if ( !$db->fieldExists( 'thread', $field, 'lqt-update-script' ) ) {
38 - dbsource( dirname( __FILE__ ) . '/schema-changes/' . $patch );
 38+ $db->sourceFile( dirname( __FILE__ ) . '/schema-changes/' . $patch );
3939 }
4040 }
4141
4242 foreach ( $threadIndexUpdates as $index => $patch ) {
4343 if ( !$db->indexExists( 'thread', $index, 'lqt-update-script' ) ) {
44 - dbsource( dirname( __FILE__ ) . '/schema-changes/' . $patch );
 44+ $db->sourceFile( dirname( __FILE__ ) . '/schema-changes/' . $patch );
4545 }
4646 }
4747
4848 foreach ( $newTableUpdates as $table => $patch ) {
4949 if ( !$db->tableExists( $table, 'lqt-update-script' ) ) {
50 - dbsource( dirname( __FILE__ ) . '/schema-changes/' . $patch );
 50+ $db->sourceFile( dirname( __FILE__ ) . '/schema-changes/' . $patch );
5151 }
5252 }
5353
Index: trunk/extensions/MetavidWiki/maintenance/mv_update.php
@@ -13,7 +13,7 @@
1414 $wgDatabase = new $dbclass( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1 );
1515
1616 //first run the mv_tables.sql
17 -dbsource('mv_tables.sql');
 17+$wgDatabase->sourceFile( 'mv_tables.sql' );
1818
1919 // do mvd_index text removal update:
2020 // check if mvd_index has text field
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMVAdmin.php
@@ -73,7 +73,7 @@
7474 require_once( "$IP/install-utils.inc" );
7575
7676 print '<p><b>Creating database tables</b><p><pre>';
77 - dbsource( "extensions/MetavidWiki/maintenance/mv_tables.sql" );
 77+ wfGetDB( DB_MASTER )->sourceFile( "extensions/MetavidWiki/maintenance/mv_tables.sql" );
7878
7979 print '</p><p><b>Creating templates</b><pre>';
8080 upTemplates( false );
Index: trunk/extensions/AbuseFilter/install.php
@@ -11,7 +11,7 @@
1212 if ( $wgDBtype == 'postgres' )
1313 $sqlfile = '/abusefilter.tables.pg.sql';
1414
15 -dbsource( dirname( __FILE__ ) . $sqlfile );
 15+wfGetDB( DB_MASTER )->sourceFile( dirname( __FILE__ ) . $sqlfile );
1616
1717 // Create the Abuse Filter user.
1818 wfLoadExtensionMessages( 'AbuseFilter' );

Status & tagging log