Set relevant User on Special:Unblock
authorumherirrender <umherirrender_de.wp@web.de>
Wed, 9 Oct 2013 18:47:45 +0000 (20:47 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Wed, 9 Oct 2013 18:47:45 +0000 (20:47 +0200)
Special:Block sets the relevant user to get links in the sidebar,
do this also on unblock

Change-Id: I3715ce63aae5ff7eb4aca9ef479020747fdc8ce8

includes/specials/SpecialUnblock.php

index ca93b6d..fbc8e91 100644 (file)
@@ -42,6 +42,11 @@ class SpecialUnblock extends SpecialPage {
 
                list( $this->target, $this->type ) = SpecialBlock::getTargetAndType( $par, $this->getRequest() );
                $this->block = Block::newFromTarget( $this->target );
+               if ( $this->target instanceof User ) {
+                       # Set the 'relevant user' in the skin, so it displays links like Contributions,
+                       # User logs, UserRights, etc.
+                       $this->getSkin()->setRelevantUser( $this->target );
+               }
 
                $this->setHeaders();
                $this->outputHeader();