X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBlock.php;h=c18ae0e33651f2e4eba3b3d9d6a39ca6bf568057;hb=03000d40b7e5d8136ef28d1bd78c40fdd0776a12;hp=ce7d24e57b588d0130df13e056b9725a4fec6478;hpb=500889f19005b4aed93c5b6eaafd35689fce7dcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index ce7d24e57b..c18ae0e336 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -372,12 +372,13 @@ class SpecialBlock extends FormSpecialPage { $this->getOutput()->addModuleStyles( 'mediawiki.special' ); + $linkRenderer = $this->getLinkRenderer(); # Link to the user's contributions, if applicable if ( $this->target instanceof User ) { $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->target->getName() ); - $links[] = Linker::link( + $links[] = $linkRenderer->makeLink( $contribsPage, - $this->msg( 'ipb-blocklist-contribs', $this->target->getName() )->escaped() + $this->msg( 'ipb-blocklist-contribs', $this->target->getName() )->text() ); } @@ -392,21 +393,24 @@ class SpecialBlock extends FormSpecialPage { $message = $this->msg( 'ipb-unblock' )->parse(); $list = SpecialPage::getTitleFor( 'Unblock' ); } - $links[] = Linker::linkKnown( $list, $message, [] ); + $links[] = $linkRenderer->makeKnownLink( + $list, + new HtmlArmor( $message ) + ); # Link to the block list - $links[] = Linker::linkKnown( + $links[] = $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'BlockList' ), - $this->msg( 'ipb-blocklist' )->escaped() + $this->msg( 'ipb-blocklist' )->text() ); $user = $this->getUser(); # Link to edit the block dropdown reasons, if applicable if ( $user->isAllowed( 'editinterface' ) ) { - $links[] = Linker::linkKnown( + $links[] = $linkRenderer->makeKnownLink( $this->msg( 'ipbreason-dropdown' )->inContentLanguage()->getTitle(), - $this->msg( 'ipb-edit-dropdown' )->escaped(), + $this->msg( 'ipb-edit-dropdown' )->text(), [], [ 'action' => 'edit' ] ); @@ -824,9 +828,13 @@ class SpecialBlock extends FormSpecialPage { $blockIds = array_merge( [ $status['id'] ], $status['autoIds'] ); $logEntry->setRelations( [ 'ipb_id' => $blockIds ] ); $logId = $logEntry->insert(); + + if ( !empty( $data['Tags'] ) ) { + $logEntry->setTags( $data['Tags'] ); + } + $logEntry->publish( $logId ); - # Report to the user return true; }