Fix breakage of LinkFilter::makeLike() due to attempted rewrite in r60162. It's meant...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 18 Dec 2009 02:49:07 +0000 (02:49 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 18 Dec 2009 02:49:07 +0000 (02:49 +0000)
includes/LinkFilter.php

index 2764185..be07172 100644 (file)
@@ -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.' );
+               }
        }
 
        /**