Index: trunk/phase3/maintenance/install-utils.inc |
— | — | @@ -180,14 +180,7 @@ |
181 | 181 | function dbsource( $fname, $db = false ) { |
182 | 182 | wfDeprecated( __METHOD__ ); |
183 | 183 | 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 ); |
192 | 185 | } |
193 | 186 | $error = $db->sourceFile( $fname ); |
194 | 187 | if ( $error !== true ) { |