r72709 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72708‎ | r72709 | r72710 >
Date:11:10, 10 September 2010
Author:ialex
Status:ok
Tags:
Comment:
Removed $wgDatabase from dbsource()
Modified paths:
  • /trunk/phase3/maintenance/install-utils.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/install-utils.inc
@@ -180,14 +180,7 @@
181181 function dbsource( $fname, $db = false ) {
182182 wfDeprecated( __METHOD__ );
183183 if ( !$db ) {
184 - // Try $wgDatabase, which is used in the install and update scripts
185 - global $wgDatabase;
186 - if ( isset( $wgDatabase ) ) {
187 - $db = $wgDatabase;
188 - } else {
189 - // No? Well, we must be outside of those scripts, so use the standard method
190 - $db = wfGetDB( DB_MASTER );
191 - }
 184+ $db = wfGetDB( DB_MASTER );
192185 }
193186 $error = $db->sourceFile( $fname );
194187 if ( $error !== true ) {

Status & tagging log