]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - maintenance/install-utils.inc
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / maintenance / install-utils.inc
1 <?php
2 /**
3  * This file contains ancient db-related functions that have been deprecated. Do
4  * not use them. Please find the appropriate replacements.
5  *
6  * @file
7  */
8
9 /**
10  * @deprecated Use DatabaseBase::sourceFile(). Will probably be removed in 1.19
11  */
12 function dbsource( $fname, $db = false ) {
13         wfDeprecated( __METHOD__ );
14         if ( !$db ) {
15                 $db = wfGetDB( DB_MASTER );
16         }
17         $error = $db->sourceFile( $fname );
18         if ( $error !== true ) {
19                 print $error;
20                 exit( 1 );
21         }
22 }
23
24 /**
25  * @deprecated Use DatabaseBase::patchPath(). Will probably be removed in 1.18
26  */
27 function archive( $name ) {
28         wfDeprecated( __METHOD__ );
29         $dbr = wfGetDB( DB_SLAVE );
30         return $dbr->patchPath( $name );
31 }