Merge "Replaced Linker::link() usage with LinkRenderer in some special pages"
[lhc/web/wiklou.git] / includes / specials / SpecialUnblock.php
index cc7a091..326a1fa 100644 (file)
@@ -119,14 +119,14 @@ class SpecialUnblock extends SpecialPage {
                                $fields['Target']['type'] = 'hidden';
                                switch ( $type ) {
                                        case Block::TYPE_IP:
-                                               $fields['Name']['default'] = Linker::linkKnown(
+                                               $fields['Name']['default'] = $this->getLinkRenderer()->makeKnownLink(
                                                        SpecialPage::getTitleFor( 'Contributions', $target->getName() ),
                                                        $target->getName()
                                                );
                                                $fields['Name']['raw'] = true;
                                                break;
                                        case Block::TYPE_USER:
-                                               $fields['Name']['default'] = Linker::link(
+                                               $fields['Name']['default'] = $this->getLinkRenderer()->makeLink(
                                                        $target->getUserPage(),
                                                        $target->getName()
                                                );
@@ -238,7 +238,9 @@ class SpecialUnblock extends SpecialPage {
                $logEntry->setTarget( $page );
                $logEntry->setComment( $data['Reason'] );
                $logEntry->setPerformer( $performer );
-               $logEntry->setTags( $data['Tags'] );
+               if ( isset( $data['Tags'] ) ) {
+                       $logEntry->setTags( $data['Tags'] );
+               }
                $logId = $logEntry->insert();
                $logEntry->publish( $logId );