Static Public Member Functions | |
| static | matchEntry ($text, $filterEntry) |
| static | makeLike ($filterEntry, $prot= 'http://') |
| Make a string to go after an SQL LIKE, which will match the specified string. | |
Static Private Member Functions | |
| static | makeRegex ($filterEntry) |
TODO: implement the filter. Currently these are just some functions to help maintenance/cleanupSpam.php remove links to a single specified domain. The next thing is to implement functions for checking a given page against a big list of domains.
Another cool thing to do would be a web interface for fast spam removal.
Definition at line 13 of file LinkFilter.php.
| static LinkFilter::makeLike | ( | $ | filterEntry, | |
| $ | prot = 'http://' | |||
| ) | [static] |
Make a string to go after an SQL LIKE, 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.
| $filterEntry | String: domainparts | |
| $prot | String: protocol |
Definition at line 53 of file LinkFilter.php.
References $db, $like, $path, and wfGetDB().
Referenced by LinkSearchPage::mungeQuery(), and ApiQueryExtLinksUsage::run().
| static LinkFilter::makeRegex | ( | $ | filterEntry | ) | [static, private] |
| static LinkFilter::matchEntry | ( | $ | text, | |
| $ | filterEntry | |||
| ) | [static] |
Definition at line 17 of file LinkFilter.php.
References $text, and makeRegex().
Referenced by cleanupArticle().
1.5.9