X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fdb%2FCloneDatabase.php;h=3cd09e257f8dfcbfb162430473c6a298c15e8d99;hb=ce3a2f56216256aa22d709e810107c592655034b;hp=bc703f3658b995acdf16426ddd1f937a46681638;hpb=10973705e0429fc6d909c4995f55179381c906b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index bc703f3658..3cd09e257f 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -32,7 +32,7 @@ class CloneDatabase { private $oldTablePrefix = ''; /** @var array List of tables to be cloned */ - private $tablesToClone = array(); + private $tablesToClone = []; /** @var bool Should we DROP tables containing the new names? */ private $dropCurrentTables = true; @@ -89,7 +89,7 @@ class CloneDatabase { $newTableName = $this->db->tableName( $tbl, 'raw' ); if ( $this->dropCurrentTables - && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) + && !in_array( $this->db->getType(), [ 'postgres', 'oracle' ] ) ) { if ( $oldTableName === $newTableName ) { // Last ditch check to avoid data loss @@ -129,7 +129,7 @@ class CloneDatabase { */ public static function changePrefix( $prefix ) { global $wgDBprefix; - wfGetLBFactory()->forEachLB( array( 'CloneDatabase', 'changeLBPrefix' ), array( $prefix ) ); + wfGetLBFactory()->forEachLB( [ 'CloneDatabase', 'changeLBPrefix' ], [ $prefix ] ); $wgDBprefix = $prefix; } @@ -139,7 +139,7 @@ class CloneDatabase { * @return void */ public static function changeLBPrefix( $lb, $prefix ) { - $lb->forEachOpenConnection( array( 'CloneDatabase', 'changeDBPrefix' ), array( $prefix ) ); + $lb->forEachOpenConnection( [ 'CloneDatabase', 'changeDBPrefix' ], [ $prefix ] ); } /**