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
Fix stray $1 in some Special:Tags error messages
[lhc/web/wiklou.git]
/
includes
/
db
/
CloneDatabase.php
diff --git
a/includes/db/CloneDatabase.php
b/includes/db/CloneDatabase.php
index
3017ea8
..
bc703f3
100644
(file)
--- a/
includes/db/CloneDatabase.php
+++ b/
includes/db/CloneDatabase.php
@@
-91,9
+91,14
@@
class CloneDatabase {
if ( $this->dropCurrentTables
&& !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) )
) {
if ( $this->dropCurrentTables
&& !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) )
) {
+ if ( $oldTableName === $newTableName ) {
+ // Last ditch check to avoid data loss
+ throw new MWException( "Not dropping new table, as '$newTableName'"
+ . " is name of both the old and the new table." );
+ }
$this->db->dropTable( $tbl, __METHOD__ );
wfDebug( __METHOD__ . " dropping {$newTableName}\n" );
$this->db->dropTable( $tbl, __METHOD__ );
wfDebug( __METHOD__ . " dropping {$newTableName}\n" );
- //Dropping the oldTable because the prefix was changed
+ //
Dropping the oldTable because the prefix was changed
}
# Create new table
}
# Create new table