mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
Normalize IPv6 addresses in Special:AbuseFilter/examine
This is re-application of I0b4a5468c. Change-Id: Ifad191f460717e70203f1740103f3af77b21b03d
This commit is contained in:
parent
6945284054
commit
a7ac1f2b3f
|
@ -199,23 +199,15 @@ class AbuseFilterViewExamine extends AbuseFilterView {
|
|||
|
||||
function loadParameters() {
|
||||
$request = $this->getRequest();
|
||||
$searchUsername = $request->getText( 'wpSearchUser' );
|
||||
$this->mSearchPeriodStart = $request->getText( 'wpSearchPeriodStart' );
|
||||
$this->mSearchPeriodEnd = $request->getText( 'wpSearchPeriodEnd' );
|
||||
$this->mSubmit = $request->getCheck( 'submit' );
|
||||
$this->mTestFilter = $request->getText( 'testfilter' );
|
||||
|
||||
// Normalise username
|
||||
$userTitle = Title::newFromText( $searchUsername );
|
||||
|
||||
if ( $userTitle && $userTitle->getNamespace() == NS_USER ) {
|
||||
$this->mSearchUser = $userTitle->getText(); // Allow User:Blah syntax.
|
||||
} elseif ( $userTitle ) {
|
||||
// Not sure of the value of prefixedText over text, but no need to munge unnecessarily.
|
||||
$this->mSearchUser = $userTitle->getPrefixedText();
|
||||
} else {
|
||||
$this->mSearchUser = '';
|
||||
}
|
||||
$searchUsername = $request->getText( 'wpSearchUser' );
|
||||
$userTitle = Title::newFromText( $searchUsername, NS_USER );
|
||||
$this->mSearchUser = $userTitle ? $userTitle->getText() : '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue