Index: trunk/phase3/includes/specials/SpecialUnblock.php |
— | — | @@ -35,10 +35,8 @@ |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function execute( $par ){ |
39 | | - global $wgUser, $wgOut, $wgRequest; |
40 | | - |
41 | 39 | # Check permissions |
42 | | - if( !$this->userCanExecute( $wgUser ) ) { |
| 40 | + if( !$this->userCanExecute( $this->getUser() ) ) { |
43 | 41 | $this->displayRestrictionError(); |
44 | 42 | return; |
45 | 43 | } |
— | — | @@ -48,11 +46,12 @@ |
49 | 47 | throw new ReadOnlyError; |
50 | 48 | } |
51 | 49 | |
52 | | - list( $this->target, $this->type ) = SpecialBlock::getTargetAndType( $par, $wgRequest ); |
| 50 | + list( $this->target, $this->type ) = SpecialBlock::getTargetAndType( $par, $this->getRequest() ); |
53 | 51 | $this->block = Block::newFromTarget( $this->target ); |
54 | 52 | |
55 | | - $wgOut->setPageTitle( wfMsg( 'unblockip' ) ); |
56 | | - $wgOut->addModules( 'mediawiki.special' ); |
| 53 | + $out = $this->getOutput(); |
| 54 | + $out->setPageTitle( wfMsg( 'unblockip' ) ); |
| 55 | + $out->addModules( 'mediawiki.special' ); |
57 | 56 | |
58 | 57 | $form = new HTMLForm( $this->getFields(), $this->getContext() ); |
59 | 58 | $form->setWrapperLegend( wfMsg( 'unblockip' ) ); |
— | — | @@ -64,14 +63,14 @@ |
65 | 64 | switch( $this->type ){ |
66 | 65 | case Block::TYPE_USER: |
67 | 66 | case Block::TYPE_IP: |
68 | | - $wgOut->addWikiMsg( 'unblocked', $this->target ); |
| 67 | + $out->addWikiMsg( 'unblocked', $this->target ); |
69 | 68 | break; |
70 | 69 | case Block::TYPE_RANGE: |
71 | | - $wgOut->addWikiMsg( 'unblocked-range', $this->target ); |
| 70 | + $out->addWikiMsg( 'unblocked-range', $this->target ); |
72 | 71 | break; |
73 | 72 | case Block::TYPE_ID: |
74 | 73 | case Block::TYPE_AUTO: |
75 | | - $wgOut->addWikiMsg( 'unblocked-id', $this->target ); |
| 74 | + $out->addWikiMsg( 'unblocked-id', $this->target ); |
76 | 75 | break; |
77 | 76 | } |
78 | 77 | } |
— | — | @@ -113,8 +112,7 @@ |
114 | 113 | switch( $type ){ |
115 | 114 | case Block::TYPE_USER: |
116 | 115 | case Block::TYPE_IP: |
117 | | - $skin = $this->getSkin(); |
118 | | - $fields['Name']['default'] = $skin->link( |
| 116 | + $fields['Name']['default'] = Linker::link( |
119 | 117 | $target->getUserPage(), |
120 | 118 | $target->getName() |
121 | 119 | ); |