Fixed some errors while running patchSql.php:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 14 Mar 2010 15:48:29 +0000 (15:48 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 14 Mar 2010 15:48:29 +0000 (15:48 +0000)
* Notice: Undefined variable: name in includes/db/Database.php on lines 2209 and 2212
* Fatal error: Call to undefined method DatabaseMysql::fileSource() in maintenance/patchSql.php on line 48

includes/db/Database.php
maintenance/patchSql.php

index e198eab..c997544 100644 (file)
@@ -2182,10 +2182,10 @@ abstract class DatabaseBase {
         */
        public static function patchPath( $patch ) {
                global $wgDBtype, $IP;
-               if ( file_exists( "$IP/maintenance/$wgDBtype/archives/$name" ) ) {
-                       return "$IP/maintenance/$wgDBtype/archives/$name";
+               if ( file_exists( "$IP/maintenance/$wgDBtype/archives/$patch" ) ) {
+                       return "$IP/maintenance/$wgDBtype/archives/$patch";
                } else {
-                       return "$IP/maintenance/archives/$name";
+                       return "$IP/maintenance/archives/$patch";
                }
        }
 
index 0aee36f..69cb0f5 100644 (file)
@@ -45,7 +45,7 @@ class PatchSql extends Maintenance {
                        foreach( $files as $file ) {
                                if( file_exists( $file ) ) {
                                        $this->output( "$file ...\n" );
-                                       $dbw->fileSource( $file );
+                                       $dbw->sourceFile( $file );
                                        continue 2;
                                }
                        }