Deprecate archive() in favor of DatabaseBase::patchPath()
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 1 Sep 2010 18:52:06 +0000 (18:52 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 1 Sep 2010 18:52:06 +0000 (18:52 +0000)
includes/installer/DatabaseUpdater.php
includes/installer/PostgresUpdater.php
maintenance/updaters.inc

index ccf008b..7a32126 100644 (file)
@@ -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 ) );
                }
        }
 
index 04f8053..ba25dd0 100644 (file)
@@ -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" );
                }
index b708476..856c3e7 100644 (file)
@@ -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() {