X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpatchSql.php;h=43fbd38cd181aa8bc55328864f0a36ac5fad0e2e;hb=9ee6461287f5d2d6fae719ec62ae6465e0a3809d;hp=1f77bdb30ca6058ac2d309d724c574a642c2edcf;hpb=072e84d2480446f3b76c6cffe9cd414de5b0860c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/patchSql.php b/maintenance/patchSql.php index 1f77bdb30c..43fbd38cd1 100644 --- a/maintenance/patchSql.php +++ b/maintenance/patchSql.php @@ -32,7 +32,7 @@ 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->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' @@ -46,11 +46,11 @@ class PatchSql extends Maintenance { public function execute() { $dbw = $this->getDB( DB_MASTER ); foreach ( $this->mArgs as $arg ) { - $files = array( + $files = [ $arg, $dbw->patchPath( $arg ), $dbw->patchPath( "patch-$arg.sql" ), - ); + ]; foreach ( $files as $file ) { if ( file_exists( $file ) ) { $this->output( "$file ...\n" );