dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
0ee8d69
)
Merge "(bug 50078) Allow a string other than '*' as condition for DatabaseBase::delete()"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Tue, 25 Jun 2013 17:18:10 +0000
(17:18 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Tue, 25 Jun 2013 17:18:10 +0000
(17:18 +0000)
includes/db/Database.php
patch
|
blob
|
history
diff --git
a/includes/db/Database.php
b/includes/db/Database.php
index
4b2eae7
..
e06d80d
100644
(file)
--- a/
includes/db/Database.php
+++ b/
includes/db/Database.php
@@
-2712,7
+2712,10
@@
abstract class DatabaseBase implements DatabaseType {
$sql = "DELETE FROM $table";
if ( $conds != '*' ) {
- $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND );
+ if ( is_array( $conds ) ) {
+ $conds = $this->makeList( $conds, LIST_AND );
+ }
+ $sql .= ' WHERE ' . $conds;
}
return $this->query( $sql, $fname );