r24020 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24019‎ | r24020 | r24021 >
Date:20:07, 11 July 2007
Author:aaron
Status:old
Tags:
Comment:
*Make null values of arrays use NULL(for lists) or IS NULL, rather than x = NULL, which doesn't work
Modified paths:
  • /trunk/phase3/includes/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Database.php
@@ -1531,8 +1531,13 @@
15321532 $list .= "($value)";
15331533 } elseif ( ($mode == LIST_SET) && is_numeric( $field ) ) {
15341534 $list .= "$value";
1535 - } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array ($value) ) {
 1535+ } elseif ( ($mode == LIST_AND || $mode == LIST_OR) && is_array($value) ) {
15361536 $list .= $field." IN (".$this->makeList($value).") ";
 1537+ } elseif( is_null($value) ) {
 1538+ if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) {
 1539+ $list .= "$field IS ";
 1540+ }
 1541+ $list .= 'NULL';
15371542 } else {
15381543 if ( $mode == LIST_AND || $mode == LIST_OR || $mode == LIST_SET ) {
15391544 $list .= "$field = ";

Follow-up revisions

RevisionCommit summaryAuthorDate
r24096Merged revisions 23910-24094 via svnmerge from...david22:38, 14 July 2007

Status & tagging log