dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Pass $archivedRevisionCount to the ArticleDeleteComplete hook"
[lhc/web/wiklou.git]
/
includes
/
db
/
CloneDatabase.php
diff --git
a/includes/db/CloneDatabase.php
b/includes/db/CloneDatabase.php
index
bc703f3
..
3cd09e2
100644
(file)
--- 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 $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;
/** @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
$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
) {
if ( $oldTableName === $newTableName ) {
// Last ditch check to avoid data loss
@@
-129,7
+129,7
@@
class CloneDatabase {
*/
public static function changePrefix( $prefix ) {
global $wgDBprefix;
*/
public static function changePrefix( $prefix ) {
global $wgDBprefix;
- wfGetLBFactory()->forEachLB(
array( 'CloneDatabase', 'changeLBPrefix' ), array( $prefix )
);
+ wfGetLBFactory()->forEachLB(
[ 'CloneDatabase', 'changeLBPrefix' ], [ $prefix ]
);
$wgDBprefix = $prefix;
}
$wgDBprefix = $prefix;
}
@@
-139,7
+139,7
@@
class CloneDatabase {
* @return void
*/
public static function changeLBPrefix( $lb, $prefix ) {
* @return void
*/
public static function changeLBPrefix( $lb, $prefix ) {
- $lb->forEachOpenConnection(
array( 'CloneDatabase', 'changeDBPrefix' ), array( $prefix )
);
+ $lb->forEachOpenConnection(
[ 'CloneDatabase', 'changeDBPrefix' ], [ $prefix ]
);
}
/**
}
/**