From: Tim Starling Date: Fri, 18 Dec 2009 02:49:07 +0000 (+0000) Subject: Fix breakage of LinkFilter::makeLike() due to attempted rewrite in r60162. It's meant... X-Git-Tag: 1.31.0-rc.0~38508 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=a612b092cb58b5ac464195092ad41272a775a5c1;p=lhc%2Fweb%2Fwiklou.git Fix breakage of LinkFilter::makeLike() due to attempted rewrite in r60162. It's meant to return the string without the quotes, not the whole clause. --- diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index 27641858f3..be071723a4 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -59,8 +59,13 @@ class LinkFilter { return false; } $dbw = wfGetDB( DB_MASTER ); - - return $dbw->buildLike( $like ); + $s = $dbw->buildLike( $like ); + $m = false; + if ( preg_match( "/^ *LIKE '(.*)' *$/", $s, $m ) ) { + return $m[1]; + } else { + throw new MWException( __METHOD__.': this DBMS is not supported by this function.' ); + } } /**