34 $subtype = $this->entry->getSubtype();
35 if ( $subtype ===
'move_prot' ) {
37 return [ Title::newFromText(
$params[3] ) ];
43 $key = parent::getMessageKey();
54 $params = parent::getMessageParameters();
56 $subtype = $this->entry->getSubtype();
57 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
58 $rawParams = $this->entry->getParameters();
59 if ( isset( $rawParams[
'details'] ) ) {
61 } elseif ( isset(
$params[3] ) ) {
63 $params[3] = $this->context->getLanguage()->getDirMark() .
$params[3];
73 } elseif ( $subtype ===
'move_prot' ) {
75 $params[3] = Message::rawParam( $oldname );
83 $subtype = $this->entry->getSubtype();
85 || $subtype ===
'move_prot'
91 $title = $this->entry->getTarget();
97 'action' =>
'history',
98 'offset' => $this->entry->getTimestamp(),
104 if ( $this->context->getUser()->isAllowed(
'protect' ) ) {
107 $this->
msg(
'protect_change' )->
text(),
109 [
'action' =>
'protect' ]
113 return $this->
msg(
'parentheses' )->rawParams(
114 $this->context->getLanguage()->pipeList( $links ) )->escaped();
123 if ( $subtype ===
'protect' || $subtype ===
'modify' ) {
127 'details' =>
':array:details',
129 } elseif ( $subtype ===
'move_prot' ) {
132 '4::oldtitle' =>
'4:title:oldtitle',
135 foreach ( $map as $index => $key ) {
136 if ( isset(
$params[$index] ) ) {
143 if ( isset(
$params[
'5:bool:cascade'] ) && is_string(
$params[
'5:bool:cascade'] ) ) {
144 $params[
'5:bool:cascade'] =
$params[
'5:bool:cascade'] ===
'cascade';
151 $ret = parent::formatParametersForApi();
152 if ( isset(
$ret[
'details'] ) && is_array(
$ret[
'details'] ) ) {
153 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
154 foreach (
$ret[
'details'] as &$detail ) {
155 if ( isset( $detail[
'expiry'] ) ) {
156 $detail[
'expiry'] = $contLang->
157 formatExpiry( $detail[
'expiry'], TS_ISO_8601,
'infinite' );
172 $protectDescription =
'';
174 foreach ( $details as $param ) {
179 $action = $this->context->msg(
'restriction-' . $param[
'type'] )->escaped();
181 $protectionLevel = $param[
'level'];
183 $message = $this->context->msg(
'protect-level-' . $protectionLevel );
184 if ( $message->isDisabled() ) {
186 $restrictions = $this->context->msg(
"protect-fallback", $protectionLevel )->parse();
188 $restrictions = $message->escaped();
191 if ( $protectDescription !==
'' ) {
192 $protectDescription .= $this->context->msg(
'word-separator' )->escaped();
195 $protectDescription .= $this->context->msg(
'protect-summary-desc' )
196 ->params( $action, $restrictions, $expiryText )->escaped();
199 return $protectDescription;
204 return $this->context->msg(
'protect-expiry-indefinite' )->text();
206 $lang = $this->context->getLanguage();
207 $user = $this->context->getUser();
208 return $this->context->msg(
209 'protect-expiring-local',
210 $lang->userTimeAndDate( $expiry, $user ),
211 $lang->userDate( $expiry, $user ),
212 $lang->userTime( $expiry, $user )
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
wfIsInfinity( $str)
Determine input string is represents as infinity.
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.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
if(!isset( $args[0])) $lang