From: Niklas Laxström Date: Sun, 25 Jan 2009 09:12:41 +0000 (+0000) Subject: * (bug 17150) escapeLike now escapes literal \ properly X-Git-Tag: 1.31.0-rc.0~43257 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=794eb21733792a44f839162b72723a928f72f33f;p=lhc%2Fweb%2Fwiklou.git * (bug 17150) escapeLike now escapes literal \ properly --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 24c52b430a..6153ba1b2f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -81,6 +81,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 10569) redirects to Special:Mypage and Special:Mytalk are no longer allowed by default. Change $wgInvalidRedirectTargets to re-enable. * (bug 3043) Feed links of given page are now preceded by standard feed icon +* (bug 17150) escapeLike now escapes literal \ properly == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/db/Database.php b/includes/db/Database.php index b86f35d21d..586baee4bc 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1397,7 +1397,7 @@ class Database { } else { $list .= $field." IN (".$this->makeList($value).") "; } - } elseif( is_null($value) ) { + } elseif( $value === null ) { if ( $mode == LIST_AND || $mode == LIST_OR ) { $list .= "$field IS "; } elseif ( $mode == LIST_SET ) { @@ -1605,7 +1605,7 @@ class Database { * Otherwise returns as-is */ function addQuotes( $s ) { - if ( is_null( $s ) ) { + if ( $s === null ) { return 'NULL'; } else { # This will also quote numeric values. This should be harmless, @@ -1621,7 +1621,7 @@ class Database { */ function escapeLike( $s ) { $s=$this->strencode( $s ); - $s=str_replace(array('%','_'),array('\%','\_'),$s); + $s=str_replace(array('%','_','\\'),array('\%','\_','\\\\'),$s); return $s; }