32 $subtype = $this->entry->getSubtype();
33 if ( $subtype ===
'move_prot' ) {
41 $key = parent::getMessageKey();
52 $params = parent::getMessageParameters();
54 $subtype = $this->entry->getSubtype();
55 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
56 $rawParams = $this->entry->getParameters();
57 if ( isset( $rawParams[
'details'] ) ) {
59 } elseif ( isset(
$params[3] ) ) {
61 $params[3] = $this->context->getLanguage()->getDirMark() .
$params[3];
71 } elseif ( $subtype ===
'move_prot' ) {
80 $subtype = $this->entry->getSubtype();
82 || $subtype ===
'move_prot'
88 $title = $this->entry->getTarget();
91 $this->
msg(
'hist' )->escaped(),
94 'action' =>
'history',
95 'offset' => $this->entry->getTimestamp(),
101 if ( $this->context->getUser()->isAllowed(
'protect' ) ) {
104 $this->
msg(
'protect_change' )->escaped(),
106 [
'action' =>
'protect' ]
110 return $this->
msg(
'parentheses' )->rawParams(
111 $this->context->getLanguage()->pipeList( $links ) )->escaped();
120 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
124 'details' =>
':array:details',
126 } elseif ( $subtype ===
'move_prot' ) {
129 '4::oldtitle' =>
'4:title:oldtitle',
132 foreach ( $map
as $index => $key ) {
133 if ( isset(
$params[$index] ) ) {
140 if ( isset(
$params[
'5:bool:cascade'] ) && is_string(
$params[
'5:bool:cascade'] ) ) {
141 $params[
'5:bool:cascade'] =
$params[
'5:bool:cascade'] ===
'cascade';
150 $ret = parent::formatParametersForApi();
151 if ( isset(
$ret[
'details'] ) && is_array(
$ret[
'details'] ) ) {
152 foreach (
$ret[
'details']
as &$detail ) {
153 if ( isset( $detail[
'expiry'] ) ) {
154 $detail[
'expiry'] = $wgContLang->formatExpiry( $detail[
'expiry'],
TS_ISO_8601,
'infinite' );
169 $protectDescription =
'';
171 foreach ( $details
as $param ) {
176 $action = $this->context->msg(
'restriction-' . $param[
'type'] )->escaped();
178 $protectionLevel = $param[
'level'];
180 $message = $this->context->msg(
'protect-level-' . $protectionLevel );
181 if ( $message->isDisabled() ) {
183 $restrictions = $this->context->msg(
"protect-fallback", $protectionLevel )->parse();
185 $restrictions = $message->escaped();
188 if ( $protectDescription !==
'' ) {
189 $protectDescription .= $this->context->msg(
'word-separator' )->escaped();
192 $protectDescription .= $this->context->msg(
'protect-summary-desc' )
193 ->params( $action, $restrictions, $expiryText )->escaped();
196 return $protectDescription;
201 return $this->context->msg(
'protect-expiry-indefinite' )->text();
203 $lang = $this->context->getLanguage();
204 $user = $this->context->getUser();
205 return $this->context->msg(
206 'protect-expiring-local',
the array() calling protocol came about after MediaWiki 1.4rc1.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
if(!isset($args[0])) $lang
getSubtype()
The log subtype.
static newFromText($text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
when a variable name is used in a it is silently declared as a new local masking the global
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
wfIsInfinity($str)
Determine input string is represents as infinity.
namespace and then decline to actually register it file or subcat img or subcat $title
static linkKnown($target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
static link($target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
getParameters()
Get the extra parameters stored for this message.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang