From: Platonides Date: Mon, 7 Nov 2011 17:19:08 +0000 (+0000) Subject: Allow raw conditions on insertSelect, given that array syntax isn't always expressive... X-Git-Tag: 1.31.0-rc.0~26659 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=a7704b70754dd42303f3a7294c6c9cf12224e17f;p=lhc%2Fweb%2Fwiklou.git Allow raw conditions on insertSelect, given that array syntax isn't always expressive enough (r96930) --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 4967d77ed7..4d56a5cfe4 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2531,7 +2531,10 @@ abstract class DatabaseBase implements DatabaseType { " FROM $srcTable $useIndex "; if ( $conds != '*' ) { - $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND ); + if ( is_array( $conds ) ) { + $conds = $this->makeList( $conds, LIST_AND ); + } + $sql .= " WHERE $conds"; } $sql .= " $tailOpts";