From 21216bd52dd8408d926f799a41e4be0a520d0dc7 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 1 Sep 2010 18:52:06 +0000 Subject: [PATCH] Deprecate archive() in favor of DatabaseBase::patchPath() --- includes/installer/DatabaseUpdater.php | 2 +- includes/installer/PostgresUpdater.php | 2 +- maintenance/updaters.inc | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index ccf008b37c..7a321262c3 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -165,7 +165,7 @@ abstract class DatabaseUpdater { if ( $isFullPath ) { $this->db->sourceFile( $path ); } else { - $this->db->sourceFile( archive( $path ) ); + $this->db->sourceFile( DatabaseBase::patchPath( $path ) ); } } diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 04f8053bdd..ba25dd05ed 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -564,7 +564,7 @@ END; wfOut( "Dropping rule \"archive_delete\"\n" ); $this->db->query( 'DROP RULE archive_delete ON archive' ); } - $this->db->sourceFile( archive( 'patch-remove-archive2.sql' ) ); + $this->applyPatch( 'patch-remove-archive2.sql' ); } else { wfOut( "... obsolete table \"archive2\" does not exist\n" ); } diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index b708476c35..856c3e7bb1 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -103,12 +103,8 @@ function do_all_updates( $shared = false, $purge = true ) { } function archive( $name ) { - global $wgDBtype, $IP; - if ( file_exists( "$IP/maintenance/$wgDBtype/archives/$name" ) ) { - return "$IP/maintenance/$wgDBtype/archives/$name"; - } else { - return "$IP/maintenance/archives/$name"; - } + wfDeprecated( __FUNCTION__ ); + return DatabaseBase::patchPath( $name ); } function do_interwiki_update() { -- 2.20.1