Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / maintenance / patchSql.php
index 43fbd38..3ba962f 100644 (file)
@@ -45,11 +45,13 @@ class PatchSql extends Maintenance {
 
        public function execute() {
                $dbw = $this->getDB( DB_MASTER );
+               $updater = DatabaseUpdater::newForDB( $dbw, true, $this );
+
                foreach ( $this->mArgs as $arg ) {
                        $files = [
                                $arg,
-                               $dbw->patchPath( $arg ),
-                               $dbw->patchPath( "patch-$arg.sql" ),
+                               $updater->patchPath( $dbw, $arg ),
+                               $updater->patchPath( $dbw, "patch-$arg.sql" ),
                        ];
                        foreach ( $files as $file ) {
                                if ( file_exists( $file ) ) {
@@ -64,5 +66,5 @@ class PatchSql extends Maintenance {
        }
 }
 
-$maintClass = "PatchSql";
+$maintClass = PatchSql::class;
 require_once RUN_MAINTENANCE_IF_MAIN;