[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/extensions/SpamBlacklist/ -> SpamBlacklist_body.php (summary)

(no description)

File Size: 176 lines (5 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SpamBlacklist:: (7 methods):
  getBlacklistType()
  antiSpoof()
  filter()
  getCurrentLinks()
  getRegexStart()
  getRegexEnd()
  logFilterHit()


Class: SpamBlacklist  - X-Ref

getBlacklistType()   X-Ref
Returns the code for the blacklist implementation

return: string

antiSpoof( $text )   X-Ref
Apply some basic anti-spoofing to the links before they get filtered,
see @bug 12896

param: string $text
return: string

filter( array $links, Title $title = null, $preventLog = false )   X-Ref

param: string[] $links An array of links to check against the blacklist
param: Title  $title The title of the page to which the filter shall be applied.
param: boolean $preventLog Whether to prevent logging of hits. Set to true when
return: Array Matched text(s) if the edit should not be allowed, false otherwise

getCurrentLinks( $title )   X-Ref
Look up the links currently in the article, so we can
ignore them on a second run.

WARNING: I can add more *of the same link* with no problem here.
param: $title Title
return: array

getRegexStart()   X-Ref
Returns the start of the regex for matches

return: string

getRegexEnd( $batchSize )   X-Ref
Returns the end of the regex for matches

param: $batchSize
return: string

logFilterHit( $title, $url )   X-Ref
Logs the filter hit to Special:Log if
$wgLogSpamBlacklistHits is enabled.

param: Title $title
param: string $url URL that the user attempted to add



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1