MediaWiki REL1_32
ContentModelLogFormatter.php
Go to the documentation of this file.
1<?php
2
4 protected function getMessageParameters() {
5 $lang = $this->context->getLanguage();
6 $params = parent::getMessageParameters();
7 $params[3] = ContentHandler::getLocalizedName( $params[3], $lang );
8 $params[4] = ContentHandler::getLocalizedName( $params[4], $lang );
9 return $params;
10 }
11
12 public function getActionLinks() {
13 if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
14 || $this->entry->getSubtype() !== 'change'
15 || !$this->context->getUser()->isAllowed( 'editcontentmodel' )
16 ) {
17 return '';
18 }
19
20 $params = $this->extractParameters();
21 $revert = $this->getLinkRenderer()->makeKnownLink(
22 SpecialPage::getTitleFor( 'ChangeContentModel' ),
23 $this->msg( 'logentry-contentmodel-change-revertlink' )->text(),
24 [],
25 [
26 'pagetitle' => $this->entry->getTarget()->getPrefixedText(),
27 'model' => $params[3],
28 'reason' => $this->msg( 'logentry-contentmodel-change-revert' )->inContentLanguage()->text(),
29 ]
30 );
31
32 return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();
33 }
34}
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
getActionLinks()
Returns extra links that comes after the action text, like "revert", etc.
getMessageParameters()
Formats parameters intented for action message from array of all parameters.
Implements the default log formatting.
msg( $key)
Shortcut for wfMessage which honors local context.
extractParameters()
Extracts the optional extra parameters for use in action messages.
const DELETED_ACTION
Definition LogPage.php:34
returning false will NOT prevent logging a wrapping ErrorException instead of letting the login form give the generic error message that the account does not exist For when the account has been renamed or deleted or an array to pass a message key and parameters create2 Corresponds to logging log_action database field and which is displayed in the UI & $revert
Definition hooks.txt:2256
$params
if(!isset( $args[0])) $lang