return 0;
}
- $text = $content->getNativeData();
+ $text = $content->getText();
$regex = self::makeRegex( $filterEntry, $protocol );
return preg_match( $regex, $text );
/**
* Canonicalize a hostname for el_index
- * @param string $hose
+ * @param string $host
* @return string
*/
private static function indexifyHost( $host ) {
// The constant prefix is smaller than el_index_60, so we use a LIKE
// for a prefix search.
return [
- "{$p}_index_60" . $db->buildLike( [ $index, $db->anyString() ] ),
+ "{$p}_index_60" . $db->buildLike( $index, $db->anyString() ),
"{$p}_index" . $db->buildLike( $like ),
];
}
*/
public static function makeLikeArray( $filterEntry, $protocol = 'http://' ) {
$db = wfGetDB( DB_REPLICA );
+ $like = [];
$target = $protocol . $filterEntry;
$bits = wfParseUrl( $target );