[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/extensions/TitleBlacklist/ -> TitleBlacklist.list.php (summary)

Title Blacklist class

Author: Victor Vasiliev
Copyright: © 2007-2010 Victor Vasiliev et al
License: GNU General Public License 2.0 or later
File Size: 535 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

TitleBlacklist:: (14 methods):
  singleton()
  load()
  loadWhitelist()
  getBlacklistText()
  parseBlacklist()
  userCannot()
  isBlacklisted()
  isWhitelisted()
  getBlacklist()
  getWhitelist()
  getHttp()
  invalidate()
  validate()
  userCanOverride()

TitleBlacklistEntry:: (11 methods):
  __construct()
  filtersNewAccounts()
  matches()
  newFromString()
  getRegex()
  getRaw()
  getParams()
  getCustomMessage()
  getFormatVersion()
  setFormatVersion()
  getErrorMessage()


Class: TitleBlacklist  - X-Ref

Implements a title blacklist for MediaWiki

singleton()   X-Ref
Get an instance of this class

return: TitleBlacklist

load()   X-Ref
Load all configured blacklist sources


loadWhitelist()   X-Ref
Load local whitelist


getBlacklistText( $source )   X-Ref
Get the text of a blacklist from a specified source

param: $source A blacklist source from $wgTitleBlacklistSources
return: The content of the blacklist source as a string

parseBlacklist( $list, $sourceName )   X-Ref
Parse blacklist from a string

param: $list string Text of a blacklist source
return: array of TitleBlacklistEntry entries

userCannot( $title, $user, $action = 'edit', $override = true )   X-Ref
Check whether the blacklist restricts giver nuser
performing a specific action on the given Title

param: $title Title to check
param: $user User to check
param: $action string Action to check; 'edit' if unspecified
param: $override bool If set to true, overrides work
return: TitleBlacklistEntry|bool The corresponding TitleBlacklistEntry if

isBlacklisted( $title, $action = 'edit' )   X-Ref
Check whether the blacklist restricts
performing a specific action on the given Title

param: $title Title to check
param: $action string Action to check; 'edit' if unspecified
return: TitleBlacklistEntry|bool The corresponding TitleBlacklistEntry if blacklisted;

isWhitelisted( $title, $action = 'edit' )   X-Ref
Check whether it has been explicitly whitelisted that the
current User may perform a specific action on the given Title

param: $title Title to check
param: $action string Action to check; 'edit' if unspecified
return: bool True if whitelisted; otherwise false

getBlacklist()   X-Ref
Get the current blacklist

return: Array of TitleBlacklistEntry items

getWhitelist()   X-Ref
Get the current whitelist

return: Array of TitleBlacklistEntry items

getHttp( $url )   X-Ref
Get the text of a blacklist source via HTTP

param: $url string URL of the blacklist source
return: string The content of the blacklist source as a string

invalidate()   X-Ref
Invalidate the blacklist cache


validate( $blacklist )   X-Ref
Validate a new blacklist

param: $blacklist array
return: Array of bad entries; empty array means blacklist is valid

userCanOverride( $user, $action )   X-Ref
Inidcates whether user can override blacklist on certain action.

param: $action Action
return: bool

Class: TitleBlacklistEntry  - X-Ref

Represents a title blacklist entry

__construct( $regex, $params, $raw, $source )   X-Ref
Construct a new TitleBlacklistEntry.

param: $regex string Regular expression to match
param: $params array Parameters for this entry
param: $raw string Raw contents of this line

filtersNewAccounts()   X-Ref
Returns whether this entry is capable of filtering new accounts.


matches( $title, $action )   X-Ref
Check whether a user can perform the specified action
on the specified Title

param: $title string to check
param: $action %Action to check
return: bool TRUE if the the regex matches the title, and is not overridden

newFromString( $line, $source )   X-Ref
Create a new TitleBlacklistEntry from a line of text

param: $line String containing a line of blacklist text
return: TitleBlacklistEntry

getRegex()   X-Ref

return: string This entry's regular expression

getRaw()   X-Ref

return: string This entry's raw line

getParams()   X-Ref

return: array This entry's parameters

getCustomMessage()   X-Ref

return: string Custom message for this entry

getFormatVersion()   X-Ref

return: string The format version

setFormatVersion( $v )   X-Ref
Set the format version

param: $v string New version to set

getErrorMessage( $operation )   X-Ref
Return the error message name for the blacklist entry.

param: $operation string Operation name (as in titleblacklist-forbidden message name)
return: string The error message name



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