33 $subtype = $this->entry->getSubtype();
34 if ( $subtype ===
'move_prot' ) {
36 return [ Title::newFromText(
$params[3] ) ];
42 $key = parent::getMessageKey();
53 $params = parent::getMessageParameters();
55 $subtype = $this->entry->getSubtype();
56 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
57 $rawParams = $this->entry->getParameters();
58 if ( isset( $rawParams[
'details'] ) ) {
60 } elseif ( isset(
$params[3] ) ) {
62 $params[3] = $this->context->getLanguage()->getDirMark() .
$params[3];
72 } elseif ( $subtype ===
'move_prot' ) {
74 $params[3] = Message::rawParam( $oldname );
81 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
82 $subtype = $this->entry->getSubtype();
84 || $subtype ===
'move_prot'
90 $title = $this->entry->getTarget();
96 'action' =>
'history',
97 'offset' => $this->entry->getTimestamp(),
103 if ( $this->context->getUser()->isAllowed(
'protect' ) ) {
106 $this->
msg(
'protect_change' )->
text(),
108 [
'action' =>
'protect' ]
112 return $this->
msg(
'parentheses' )->rawParams(
113 $this->context->getLanguage()->pipeList( $links ) )->escaped();
122 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
126 'details' =>
':array:details',
128 } elseif ( $subtype ===
'move_prot' ) {
131 '4::oldtitle' =>
'4:title:oldtitle',
134 foreach ( $map as $index => $key ) {
135 if ( isset(
$params[$index] ) ) {
142 if ( isset(
$params[
'5:bool:cascade'] ) && is_string(
$params[
'5:bool:cascade'] ) ) {
143 $params[
'5:bool:cascade'] =
$params[
'5:bool:cascade'] ===
'cascade';
152 $ret = parent::formatParametersForApi();
153 if ( isset(
$ret[
'details'] ) && is_array(
$ret[
'details'] ) ) {
154 foreach (
$ret[
'details'] as &$detail ) {
155 if ( isset( $detail[
'expiry'] ) ) {
156 $detail[
'expiry'] =
$wgContLang->formatExpiry( $detail[
'expiry'], TS_ISO_8601,
'infinite' );
171 $protectDescription =
'';
173 foreach ( $details as $param ) {
178 $action = $this->context->msg(
'restriction-' . $param[
'type'] )->escaped();
180 $protectionLevel = $param[
'level'];
182 $message = $this->context->msg(
'protect-level-' . $protectionLevel );
183 if ( $message->isDisabled() ) {
185 $restrictions = $this->context->msg(
"protect-fallback", $protectionLevel )->parse();
187 $restrictions = $message->escaped();
190 if ( $protectDescription !==
'' ) {
191 $protectDescription .= $this->context->msg(
'word-separator' )->escaped();
194 $protectDescription .= $this->context->msg(
'protect-summary-desc' )
195 ->params( $action, $restrictions, $expiryText )->escaped();
198 return $protectDescription;
203 return $this->context->msg(
'protect-expiry-indefinite' )->text();
205 $lang = $this->context->getLanguage();
206 $user = $this->context->getUser();
207 return $this->context->msg(
208 'protect-expiring-local',
209 $lang->userTimeAndDate( $expiry, $user ),
210 $lang->userDate( $expiry, $user ),
211 $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