summaryrefslogtreecommitdiff
path: root/maintenance/install-utils.inc
blob: 93ca0b583851b96a9dba84e88962ecfe127fa473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
 * This file contains ancient db-related functions that have been deprecated. Do
 * not use them. Please find the appropriate replacements.
 *
 * @file
 */

/**
 * @deprecated Use DatabaseBase::sourceFile(). Will probably be removed in 1.19
 */
function dbsource( $fname, $db = false ) {
	wfDeprecated( __METHOD__ );
	if ( !$db ) {
		$db = wfGetDB( DB_MASTER );
	}
	$error = $db->sourceFile( $fname );
	if ( $error !== true ) {
		print $error;
		exit( 1 );
	}
}

/**
 * @deprecated Use DatabaseBase::patchPath(). Will probably be removed in 1.18
 */
function archive( $name ) {
	wfDeprecated( __METHOD__ );
	$dbr = wfGetDB( DB_SLAVE );
	return $dbr->patchPath( $name );
}