32 $subtype = $this->entry->getSubtype();
33 if ( $subtype ===
'move_prot' ) {
35 return [ Title::newFromText(
$params[3] ) ];
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' ) {
73 $params[3] = Message::rawParam( $oldname );
81 $subtype = $this->entry->getSubtype();
83 || $subtype ===
'move_prot'
89 $title = $this->entry->getTarget();
95 'action' =>
'history',
96 'offset' => $this->entry->getTimestamp(),
102 if ( $this->context->getUser()->isAllowed(
'protect' ) ) {
105 $this->
msg(
'protect_change' )->
text(),
107 [
'action' =>
'protect' ]
111 return $this->
msg(
'parentheses' )->rawParams(
112 $this->context->getLanguage()->pipeList( $links ) )->escaped();
121 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
125 'details' =>
':array:details',
127 } elseif ( $subtype ===
'move_prot' ) {
130 '4::oldtitle' =>
'4:title:oldtitle',
133 foreach ( $map as $index => $key ) {
134 if ( isset(
$params[$index] ) ) {
141 if ( isset(
$params[
'5:bool:cascade'] ) && is_string(
$params[
'5:bool:cascade'] ) ) {
142 $params[
'5:bool:cascade'] =
$params[
'5:bool:cascade'] ===
'cascade';
151 $ret = parent::formatParametersForApi();
152 if ( isset(
$ret[
'details'] ) && is_array(
$ret[
'details'] ) ) {
153 foreach (
$ret[
'details'] as &$detail ) {
154 if ( isset( $detail[
'expiry'] ) ) {
155 $detail[
'expiry'] =
$wgContLang->formatExpiry( $detail[
'expiry'], TS_ISO_8601,
'infinite' );
170 $protectDescription =
'';
172 foreach ( $details as $param ) {
177 $action = $this->context->msg(
'restriction-' . $param[
'type'] )->escaped();
179 $protectionLevel = $param[
'level'];
181 $message = $this->context->msg(
'protect-level-' . $protectionLevel );
182 if ( $message->isDisabled() ) {
184 $restrictions = $this->context->msg(
"protect-fallback", $protectionLevel )->parse();
186 $restrictions = $message->escaped();
189 if ( $protectDescription !==
'' ) {
190 $protectDescription .= $this->context->msg(
'word-separator' )->escaped();
193 $protectDescription .= $this->context->msg(
'protect-summary-desc' )
194 ->params( $action, $restrictions, $expiryText )->escaped();
197 return $protectDescription;
202 return $this->context->msg(
'protect-expiry-indefinite' )->text();
204 $lang = $this->context->getLanguage();
205 $user = $this->context->getUser();
206 return $this->context->msg(
207 'protect-expiring-local',
208 $lang->userTimeAndDate( $expiry, $user ),
209 $lang->userDate( $expiry, $user ),
210 $lang->userTime( $expiry, $user )
wfIsInfinity( $str)
Determine input string is represents as infinity.
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
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
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
getParameters()
Get the extra parameters stored for this message.
getSubtype()
The log subtype.
if(!isset( $args[0])) $lang