summaryrefslogtreecommitdiff
path: root/maintenance/patchSql.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/patchSql.php')
-rw-r--r--maintenance/patchSql.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/maintenance/patchSql.php b/maintenance/patchSql.php
index 69cb0f56..1f96d62c 100644
--- a/maintenance/patchSql.php
+++ b/maintenance/patchSql.php
@@ -21,7 +21,7 @@
* @ingroup Maintenance
*/
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class PatchSql extends Maintenance {
public function __construct() {
@@ -36,14 +36,14 @@ class PatchSql extends Maintenance {
public function execute() {
$dbw = wfGetDB( DB_MASTER );
- foreach( $this->mArgs as $arg ) {
+ foreach ( $this->mArgs as $arg ) {
$files = array(
$arg,
- DatabaseBase::patchPath( $arg ),
- DatabaseBase::patchPath( "patch-$arg.sql" ),
+ $dbw->patchPath( $arg ),
+ $dbw->patchPath( "patch-$arg.sql" ),
);
- foreach( $files as $file ) {
- if( file_exists( $file ) ) {
+ foreach ( $files as $file ) {
+ if ( file_exists( $file ) ) {
$this->output( "$file ...\n" );
$dbw->sourceFile( $file );
continue 2;
@@ -56,4 +56,4 @@ class PatchSql extends Maintenance {
}
$maintClass = "PatchSql";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );