From a612b092cb58b5ac464195092ad41272a775a5c1 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 18 Dec 2009 02:49:07 +0000 Subject: [PATCH] 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. --- includes/LinkFilter.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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.' ); + } } /** -- 2.20.1