r58404 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58403‎ | r58404 | r58405 >
Date:20:01, 1 November 2009
Author:churchofemacs
Status:ok
Tags:
Comment:
Make it possible to link to Special:Ipblocklist/<ip> instead of just Special:Ipblocklist?ip=<ip>
Modified paths:
  • /trunk/phase3/includes/specials/SpecialIpblocklist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialIpblocklist.php
@@ -5,12 +5,13 @@
66 */
77
88 /**
 9+ * @param $ip part of title: Special:Ipblocklist/<ip>.
910 * @todo document
1011 */
11 -function wfSpecialIpblocklist() {
 12+function wfSpecialIpblocklist( $ip = '' ) {
1213 global $wgUser, $wgOut, $wgRequest;
13 -
14 - $ip = trim( $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) ) );
 14+ $ip = $wgRequest->getVal( 'ip', $ip );
 15+ $ip = trim( $wgRequest->getVal( 'wpUnblockAddress', $ip ) );
1516 $id = $wgRequest->getVal( 'id' );
1617 $reason = $wgRequest->getText( 'wpUnblockReason' );
1718 $action = $wgRequest->getText( 'action' );

Status & tagging log