Remove Profiler specific code from fileOpPerfTest
[mediawiki.git] / includes / logging / ContentModelLogFormatter.php
blobf130740a8d79a3559b99b65dbabafdb3906a203d
1 <?php
3 class ContentModelLogFormatter extends LogFormatter {
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;
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 '';
20 $params = $this->extractParameters();
21 $revert = Linker::linkKnown(
22 SpecialPage::getTitleFor( 'ChangeContentModel' ),
23 $this->msg( 'logentry-contentmodel-change-revertlink' )->escaped(),
24 [],
26 'pagetitle' => $this->entry->getTarget()->getPrefixedText(),
27 'model' => $params[3],
28 'reason' => $this->msg( 'logentry-contentmodel-change-revert' )->inContentLanguage()->text(),
32 return $this->msg( 'parentheses' )->rawParams( $revert )->escaped();