33 parent::__construct(
$query, $moduleName,
'tb' );
39 $override = !
$params[
'nooverride'];
42 if ( $action ===
'createpage' || $action ===
'createtalk' ) {
46 $title = Title::newFromText(
$params[
'title'] );
54 $title, $this->
getUser(), $action, $override
64 $res->addValue(
'titleblacklist',
'result',
'blacklisted' );
66 $message = $blacklisted->getErrorMessage( $action !==
'create' ? $action :
'edit' );
67 $res->addValue(
'titleblacklist',
'reason',
wfMessage( $message, $result )->text() );
68 $res->addValue(
'titleblacklist',
'message', $message );
72 $this->
getResult()->addValue(
'titleblacklist',
'result',
'ok' );
86 'create',
'edit',
'upload',
'createtalk',
'createpage',
'move',
'new-account'
101 'action=titleblacklist&tbtitle=Foo'
102 =>
'apihelp-titleblacklist-example-1',
103 'action=titleblacklist&tbtitle=Bar&tbaction=edit'
104 =>
'apihelp-titleblacklist-example-2',
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
This abstract class implements many basic API functions, and is the base of all API classes.
const PARAM_REQUIRED
(boolean) Is the parameter required?
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
getResult()
Get the result object.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
TitleBlacklist extension API.
__construct( $query, $moduleName)
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Represents a title blacklist entry.
static singleton()
Get an instance of this class.
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query