From: Brion Vibber Date: Sat, 16 Jul 2005 00:03:52 +0000 (+0000) Subject: Revert 1.106, needless complication that duplicates existing functionality with harde... X-Git-Tag: 1.5.0beta4~120 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=32e1a5dfc76abfee31d7b0e02ec1731467e48647;p=lhc%2Fweb%2Fwiklou.git Revert 1.106, needless complication that duplicates existing functionality with harder to read syntax. Use array('user_id=user_name') to do the same, already used in existing code. --- diff --git a/includes/Database.php b/includes/Database.php index c4d90ca10b..98bf45eddf 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -967,15 +967,13 @@ class Database { } if ( $mode == LIST_AND && is_numeric( $field ) ) { $list .= "($value)"; - } elseif ( $mode == LIST_AND && is_array ($value) && $value[0] !== false ) { + } elseif ( $mode == LIST_AND && is_array ($value) ) { $list .= $field." IN (".$this->makeList($value).") "; - } elseif ( $mode == LIST_AND && is_array ($value) && $value[0] === false ) { - $list .= "$field = {$value[1]}"; } else { if ( $mode == LIST_AND || $mode == LIST_SET ) { $list .= $field.'='; } - $list .= ($mode == LIST_NAMES ? $value : $this->addQuotes( $value )); + $list .= ($mode==LIST_NAMES?$value:$this->addQuotes( $value )); } } return $list;