Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -1397,7 +1397,7 @@ |
1398 | 1398 | } else { |
1399 | 1399 | $list .= $field." IN (".$this->makeList($value).") "; |
1400 | 1400 | } |
1401 | | - } elseif( is_null($value) ) { |
| 1401 | + } elseif( $value === null ) { |
1402 | 1402 | if ( $mode == LIST_AND || $mode == LIST_OR ) { |
1403 | 1403 | $list .= "$field IS "; |
1404 | 1404 | } elseif ( $mode == LIST_SET ) { |
— | — | @@ -1605,7 +1605,7 @@ |
1606 | 1606 | * Otherwise returns as-is |
1607 | 1607 | */ |
1608 | 1608 | function addQuotes( $s ) { |
1609 | | - if ( is_null( $s ) ) { |
| 1609 | + if ( $s === null ) { |
1610 | 1610 | return 'NULL'; |
1611 | 1611 | } else { |
1612 | 1612 | # This will also quote numeric values. This should be harmless, |
— | — | @@ -1621,7 +1621,7 @@ |
1622 | 1622 | */ |
1623 | 1623 | function escapeLike( $s ) { |
1624 | 1624 | $s=$this->strencode( $s ); |
1625 | | - $s=str_replace(array('%','_'),array('\%','\_'),$s); |
| 1625 | + $s=str_replace(array('%','_','\\'),array('\%','\_','\\\\'),$s); |
1626 | 1626 | return $s; |
1627 | 1627 | } |
1628 | 1628 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | * (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer |
83 | 83 | allowed by default. Change $wgInvalidRedirectTargets to re-enable. |
84 | 84 | * (bug 3043) Feed links of given page are now preceded by standard feed icon |
| 85 | +* (bug 17150) escapeLike now escapes literal \ properly |
85 | 86 | |
86 | 87 | == API changes in 1.15 == |
87 | 88 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |