Revert 1.106, needless complication that duplicates existing functionality with harde...
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 16 Jul 2005 00:03:52 +0000 (00:03 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 16 Jul 2005 00:03:52 +0000 (00:03 +0000)
Use array('user_id=user_name') to do the same, already used in existing code.

includes/Database.php

index c4d90ca..98bf45e 100644 (file)
@@ -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;