http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72147
Revision: 72147
Author: demon
Date: 2010-09-01 18:52:06 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
Deprecate archive() in favor of DatabaseBase::patchPath()
Modified Paths:
--------------
trunk/phase3/includes/installer/DatabaseUpdater.php
trunk/phase3/includes/installer/PostgresUpdater.php
trunk/phase3/maintenance/updaters.inc
Modified: trunk/phase3/includes/installer/DatabaseUpdater.php
===================================================================
--- trunk/phase3/includes/installer/DatabaseUpdater.php 2010-09-01 18:49:59 UTC
(rev 72146)
+++ trunk/phase3/includes/installer/DatabaseUpdater.php 2010-09-01 18:52:06 UTC
(rev 72147)
@@ -165,7 +165,7 @@
if ( $isFullPath ) {
$this->db->sourceFile( $path );
} else {
- $this->db->sourceFile( archive( $path ) );
+ $this->db->sourceFile( DatabaseBase::patchPath( $path )
);
}
}
Modified: trunk/phase3/includes/installer/PostgresUpdater.php
===================================================================
--- trunk/phase3/includes/installer/PostgresUpdater.php 2010-09-01 18:49:59 UTC
(rev 72146)
+++ trunk/phase3/includes/installer/PostgresUpdater.php 2010-09-01 18:52:06 UTC
(rev 72147)
@@ -564,7 +564,7 @@
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" );
}
Modified: trunk/phase3/maintenance/updaters.inc
===================================================================
--- trunk/phase3/maintenance/updaters.inc 2010-09-01 18:49:59 UTC (rev
72146)
+++ trunk/phase3/maintenance/updaters.inc 2010-09-01 18:52:06 UTC (rev
72147)
@@ -103,12 +103,8 @@
}
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() {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs