66 if ( $msg ===
null ) {
72 'blocklist-nousertalk',
77 foreach (
$keys as $key ) {
78 $msg[$key] = $this->
msg( $key )->text();
89 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
93 $formatted = htmlspecialchars( $language->userTimeAndDate(
$value, $this->getUser() ) );
97 if ( $row->ipb_auto ) {
98 $formatted = $this->
msg(
'autoblockid', $row->ipb_id )->parse();
113 $formatted = htmlspecialchars( $target );
119 $formatted = htmlspecialchars( $language->formatExpiry(
123 if ( $this->
getUser()->isAllowed(
'block' ) ) {
124 if ( $row->ipb_auto ) {
126 SpecialPage::getTitleFor(
'Unblock' ),
129 [
'wpTarget' =>
"#{$row->ipb_id}" ]
133 SpecialPage::getTitleFor(
'Unblock', $row->ipb_address ),
137 SpecialPage::getTitleFor(
'Block', $row->ipb_address ),
138 $msg[
'change-blocklink']
141 $formatted .=
' ' . Html::rawElement(
143 [
'class' =>
'mw-blocklist-actions' ],
144 $this->
msg(
'parentheses' )->rawParams(
145 $language->pipeList( $links ) )->escaped()
148 if (
$value !==
'infinity' ) {
150 $formatted .=
'<br />' . $this->
msg(
151 'ipb-blocklist-duration-left',
152 $language->formatDuration(
153 $timestamp->getTimestamp() - time(),
167 if ( isset( $row->by_user_name ) ) {
171 $formatted = htmlspecialchars( $row->ipb_by_text );
176 $value = CommentStore::getStore()->getComment(
'ipb_reason', $row )->text;
182 if ( $row->ipb_anon_only ) {
183 $properties[] = htmlspecialchars( $msg[
'anononlyblock'] );
185 if ( $row->ipb_create_account ) {
186 $properties[] = htmlspecialchars( $msg[
'createaccountblock'] );
188 if ( $row->ipb_user && !$row->ipb_enable_autoblock ) {
189 $properties[] = htmlspecialchars( $msg[
'noautoblockblock'] );
192 if ( $row->ipb_block_email ) {
193 $properties[] = htmlspecialchars( $msg[
'emailblock'] );
196 if ( !$row->ipb_allow_usertalk ) {
197 $properties[] = htmlspecialchars( $msg[
'blocklist-nousertalk'] );
200 $formatted = $language->commaList( $properties );
204 $formatted =
"Unable to format $name";