X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinkFilter.php;h=790e2be4489e58159b1e5f11966466110f6663ec;hb=387bfb4f8e82fd94d1e43016ea2c6e54062dd169;hp=d86291a7968a5c00c536e9bdb5bd0ec44fdc001b;hpb=f6c8b955bd6103e3084ec609902e68599cf11f23;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index d86291a796..790e2be448 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -19,6 +19,7 @@ * * @file */ +use Wikimedia\Rdbms\LikeMatch; /** * Some functions to help implement an external link filter for spam control. @@ -49,7 +50,7 @@ class LinkFilter { $text = $content->getNativeData(); - $regex = LinkFilter::makeRegex( $filterEntry ); + $regex = self::makeRegex( $filterEntry ); return preg_match( $regex, $text ); } @@ -89,7 +90,7 @@ class LinkFilter { * * @param string $filterEntry Domainparts * @param string $protocol Protocol (default http://) - * @return array Array to be passed to Database::buildLike() or false on error + * @return array|bool Array to be passed to Database::buildLike() or false on error */ public static function makeLikeArray( $filterEntry, $protocol = 'http://' ) { $db = wfGetDB( DB_REPLICA );