- /**
- * Make an array to be used for calls to DatabaseBase::buildLike(), which
- * will match the specified string. There are several kinds of filter entry:
- * *.domain.com - Produces http://com.domain.%, matches domain.com
- * and www.domain.com
- * domain.com - Produces http://com.domain./%, matches domain.com
- * or domain.com/ but not www.domain.com
- * *.domain.com/x - Produces http://com.domain.%/x%, matches
- * www.domain.com/xy
- * domain.com/x - Produces http://com.domain./x%, matches
- * domain.com/xy but not www.domain.com/xy
- *
- * Asterisks in any other location are considered invalid.
- *
- * @param $filterEntry String: domainparts
- * @param $prot String: protocol
- * @return Array to be passed to DatabaseBase::buildLike() or false on error
- */
- public static function makeLikeArray( $filterEntry , $prot = 'http://' ) {
- $db = wfGetDB( DB_MASTER );
- if ( substr( $filterEntry, 0, 2 ) == '*.' ) {