41 $params = parent::getMessageParameters();
43 $title = $this->entry->getTarget();
44 if ( substr( $title->getText(), 0, 1 ) ===
'#' ) {
50 $username = $title->getText();
53 $targetUser = User::newFromName( $username,
false );
54 $params[2] = Message::rawParam( $this->
makeUserLink( $targetUser, Linker::TOOL_LINKS_NOBLOCK ) );
58 $subtype = $this->entry->getSubtype();
59 if ( $subtype ===
'block' || $subtype ===
'reblock' ) {
69 $durationTooltip =
'‎' . htmlspecialchars(
$params[4] );
70 $blockExpiry = $this->context->getLanguage()->translateBlockExpiry(
72 $this->context->getUser(),
73 (
int)
wfTimestamp( TS_UNIX, $this->entry->getTimestamp() )
75 if ( $this->plaintext ) {
77 $params[4] = Message::rawParam( $blockExpiry );
80 "<span class=\"blockExpiry\" title=\"$durationTooltip\">" .
82 htmlspecialchars( $blockExpiry ) .
87 self::formatBlockFlags(
$params[5], $this->context->getLanguage() ) :
'';
91 $pages =
$params[6][
'pages'] ?? [];
93 foreach ( $pages as $page ) {
94 $pageLinks[] = $this->
makePageLink( Title::newFromText( $page ) );
97 $rawNamespaces =
$params[6][
'namespaces'] ?? [];
99 foreach ( $rawNamespaces as $ns ) {
101 ? $this->
msg(
'blanknamespace' )->escaped()
102 : htmlspecialchars( $this->context->getLanguage()->getFormattedNsText( $ns ) );
103 if ( $this->plaintext ) {
107 $namespaces[] = $text;
110 SpecialPage::getTitleFor(
'Allpages' ),
111 [
'namespace' => $ns ],
117 $rawActions =
$params[6][
'actions'] ?? [];
119 foreach ( $rawActions as $action ) {
120 $actions[] = $this->
msg(
'ipb-action-' . $action )->escaped();
125 $restrictions[] = $this->
msg(
'logentry-partialblock-block-page' )
126 ->numParams( count( $pageLinks ) )
127 ->rawParams( $this->context->getLanguage()->listToText( $pageLinks ) )->escaped();
131 $restrictions[] = $this->
msg(
'logentry-partialblock-block-ns' )
132 ->numParams( count( $namespaces ) )
133 ->rawParams( $this->context->getLanguage()->listToText( $namespaces ) )->escaped();
135 $enablePartialActionBlocks = $this->context->getConfig()
136 ->get( MainConfigNames::EnablePartialActionBlocks );
137 if ( $actions && $enablePartialActionBlocks ) {
138 $restrictions[] = $this->
msg(
'logentry-partialblock-block-action' )
139 ->numParams( count( $actions ) )
140 ->rawParams( $this->context->getLanguage()->listToText( $actions ) )->escaped();
143 $params[6] = Message::rawParam( $this->context->getLanguage()->listToText( $restrictions ) );
164 $title = $this->entry->getTarget();
167 if ( substr( $title->getText(), 0, 1 ) !==
'#' && $title->canExist() ) {
168 $preload[] = $title->getTalkPage();
172 if ( isset(
$params[6][
'pages'] ) ) {
173 foreach (
$params[6][
'pages'] as $page ) {
174 $preload[] = Title::newFromText( $page );
181 $subtype = $this->entry->getSubtype();
183 if ( $this->entry->isDeleted( LogPage::DELETED_ACTION )
184 || !( $subtype ===
'block' || $subtype ===
'reblock' )
185 || !$this->context->getAuthority()->isAllowed(
'block' )
191 $title = $this->entry->getTarget();
193 $linkRenderer->makeKnownLink(
194 SpecialPage::getTitleFor(
'Unblock', $title->getDBkey() ),
195 $this->msg(
'unblocklink' )->text()
197 $linkRenderer->makeKnownLink(
198 SpecialPage::getTitleFor(
'Block', $title->getDBkey() ),
199 $this->msg(
'change-blocklink' )->text()
203 return $this->
msg(
'parentheses' )->rawParams(
204 $this->context->getLanguage()->pipeList( $links ) )->escaped();