From 049c27d1dd641808a80b38dcdfa31f680ff1a6fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 19 Sep 2005 13:04:13 +0000 Subject: [PATCH] * (bug 2929) Make Special:Blockip/Username work --- includes/SpecialBlockip.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 162faa3360..41ebef58e5 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -9,14 +9,14 @@ /** * Constructor */ -function wfSpecialBlockip() { +function wfSpecialBlockip( $par ) { global $wgUser, $wgOut, $wgRequest; if ( ! $wgUser->isAllowed('block') ) { $wgOut->sysopRequired(); return; } - $ipb = new IPBlockForm(); + $ipb = new IPBlockForm( $par ); $action = $wgRequest->getVal( 'action' ); if ( 'success' == $action ) { @@ -38,9 +38,10 @@ function wfSpecialBlockip() { class IPBlockForm { var $BlockAddress, $BlockExpiry, $BlockReason; - function IPBlockForm() { + function IPBlockForm( $par ) { global $wgRequest; - $this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip' ) ); + + $this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip', $par ) ); $this->BlockReason = $wgRequest->getText( 'wpBlockReason' ); $this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') ); $this->BlockOther = $wgRequest->getVal( 'wpBlockOther', '' ); -- 2.20.1