38 $params = parent::getMessageParameters();
40 $title = $this->entry->getTarget();
41 if ( substr( $title->getText(), 0, 1 ) ===
'#' ) {
47 $username = $title->getText();
50 $targetUser = User::newFromName( $username,
false );
51 $params[2] = Message::rawParam( $this->
makeUserLink( $targetUser, Linker::TOOL_LINKS_NOBLOCK ) );
55 $subtype = $this->entry->getSubtype();
56 if ( $subtype ===
'block' || $subtype ===
'reblock' ) {
66 $durationTooltip =
'‎' . htmlspecialchars(
$params[4] );
67 $blockExpiry = $this->context->getLanguage()->translateBlockExpiry(
69 $this->context->getUser(),
70 (
int)
wfTimestamp( TS_UNIX, $this->entry->getTimestamp() )
72 if ( $this->plaintext ) {
74 $params[4] = Message::rawParam( $blockExpiry );
77 "<span class=\"blockExpiry\" title=\"$durationTooltip\">" .
79 htmlspecialchars( $blockExpiry ) .
84 self::formatBlockFlags(
$params[5], $this->context->getLanguage() ) :
'';
88 $pages =
$params[6][
'pages'] ?? [];
90 foreach ( $pages as $page ) {
91 $pageLinks[] = $this->
makePageLink( Title::newFromText( $page ) );
94 $rawNamespaces =
$params[6][
'namespaces'] ?? [];
96 foreach ( $rawNamespaces as $ns ) {
98 ? $this->
msg(
'blanknamespace' )->escaped()
99 : htmlspecialchars( $this->context->getLanguage()->getFormattedNsText( $ns ) );
100 if ( $this->plaintext ) {
104 $namespaces[] = $text;
107 SpecialPage::getTitleFor(
'Allpages' ),
108 [
'namespace' => $ns ],
114 $rawActions =
$params[6][
'actions'] ?? [];
116 foreach ( $rawActions as $action ) {
117 $actions[] = $this->
msg(
'ipb-action-' . $action )->escaped();
122 $restrictions[] = $this->
msg(
'logentry-partialblock-block-page' )
123 ->numParams( count( $pageLinks ) )
124 ->rawParams( $this->context->getLanguage()->listToText( $pageLinks ) )->escaped();
128 $restrictions[] = $this->
msg(
'logentry-partialblock-block-ns' )
129 ->numParams( count( $namespaces ) )
130 ->rawParams( $this->context->getLanguage()->listToText( $namespaces ) )->escaped();
132 $enablePartialActionBlocks = $this->context->getConfig()
133 ->get( MainConfigNames::EnablePartialActionBlocks );
134 if ( $actions && $enablePartialActionBlocks ) {
135 $restrictions[] = $this->
msg(
'logentry-partialblock-block-action' )
136 ->numParams( count( $actions ) )
137 ->rawParams( $this->context->getLanguage()->listToText( $actions ) )->escaped();
140 $params[6] = Message::rawParam( $this->context->getLanguage()->listToText( $restrictions ) );
161 $title = $this->entry->getTarget();
164 if ( substr( $title->getText(), 0, 1 ) !==
'#' && $title->canExist() ) {
165 $preload[] = $title->getTalkPage();
169 if ( isset(
$params[6][
'pages'] ) ) {
170 foreach (
$params[6][
'pages'] as $page ) {
171 $preload[] = Title::newFromText( $page );
178 $subtype = $this->entry->getSubtype();
180 if ( $this->entry->isDeleted( LogPage::DELETED_ACTION )
181 || !( $subtype ===
'block' || $subtype ===
'reblock' )
182 || !$this->context->getAuthority()->isAllowed(
'block' )
188 $title = $this->entry->getTarget();
190 $linkRenderer->makeKnownLink(
191 SpecialPage::getTitleFor(
'Unblock', $title->getDBkey() ),
192 $this->msg(
'unblocklink' )->text()
194 $linkRenderer->makeKnownLink(
195 SpecialPage::getTitleFor(
'Block', $title->getDBkey() ),
196 $this->msg(
'change-blocklink' )->text()
200 return $this->
msg(
'parentheses' )->rawParams(
201 $this->context->getLanguage()->pipeList( $links ) )->escaped();