From: Ævar Arnfjörð Bjarmason Date: Mon, 19 Sep 2005 13:04:13 +0000 (+0000) Subject: * (bug 2929) Make Special:Blockip/Username work X-Git-Tag: 1.6.0~1607 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=049c27d1dd641808a80b38dcdfa31f680ff1a6fe;p=lhc%2Fweb%2Fwiklou.git * (bug 2929) Make Special:Blockip/Username work --- 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', '' );