Deprecating: Consolidating `progressive` & `constructive` buttons
[lhc/web/wiklou.git] / maintenance / patchSql.php
index 31ce156..f94046a 100644 (file)
@@ -32,8 +32,11 @@ require_once __DIR__ . '/Maintenance.php';
 class PatchSql extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Run an SQL file into the DB, replacing prefix and charset vars";
-               $this->addArg( 'patch-name', 'Name of the patch file, either full path or in maintenance/archives' );
+               $this->addDescription( 'Run an SQL file into the DB, replacing prefix and charset vars' );
+               $this->addArg(
+                       'patch-name',
+                       'Name of the patch file, either full path or in maintenance/archives'
+               );
        }
 
        public function getDbType() {
@@ -41,7 +44,7 @@ class PatchSql extends Maintenance {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                foreach ( $this->mArgs as $arg ) {
                        $files = array(
                                $arg,