Database::makeList() now checks in LIST_AND mode if supplied list item
authorDomas Mituzas <midom@users.mediawiki.org>
Mon, 4 Oct 2004 19:43:49 +0000 (19:43 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Mon, 4 Oct 2004 19:43:49 +0000 (19:43 +0000)
value is an array, and uses IN (x,y,...). This extends select() syntax
as well, as arrays can be specified for conditions.

includes/Database.php

index c908196..e0f534c 100644 (file)
@@ -808,6 +808,8 @@ class Database {
                        }
                        if ( $mode == LIST_AND && is_numeric( $field ) ) {
                                $list .= "($value)";
+                       } elseif ( $mode == LIST_AND && is_array ($value) ) {
+                               $list .= $field." IN (".$this->makeList($value).") ";
                        } else {
                                if ( $mode == LIST_AND || $mode == LIST_SET ) {
                                        $list .= $field.'=';