mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-11-15 03:35:39 +00:00
Use WebRequest::getRawVal instead of WebRequest::getText
The UTF-8 normalization for the URL attributes `action` and `namespace` are not needed. Also use === instead of ==. Change-Id: I03a844d58b11f45dc67f3dfb861d8f6e9ffcc18d
This commit is contained in:
parent
b124456dff
commit
cfc33f1a2a
|
@ -72,13 +72,13 @@ class SpecialNuke extends SpecialPage {
|
|||
$reason = $this->getDeleteReason( $this->getRequest(), $target );
|
||||
|
||||
$limit = $req->getInt( 'limit', 500 );
|
||||
$namespace = $req->getVal( 'namespace' );
|
||||
$namespace = $req->getRawVal( 'namespace' );
|
||||
$namespace = ctype_digit( $namespace ) ? (int)$namespace : null;
|
||||
|
||||
if ( $req->wasPosted()
|
||||
&& $currentUser->matchEditToken( $req->getVal( 'wpEditToken' ) )
|
||||
) {
|
||||
if ( $req->getVal( 'action' ) === 'delete' ) {
|
||||
if ( $req->getRawVal( 'action' ) === 'delete' ) {
|
||||
$pages = $req->getArray( 'pages' );
|
||||
|
||||
if ( $pages ) {
|
||||
|
@ -86,7 +86,7 @@ class SpecialNuke extends SpecialPage {
|
|||
|
||||
return;
|
||||
}
|
||||
} elseif ( $req->getVal( 'action' ) === 'submit' ) {
|
||||
} elseif ( $req->getRawVal( 'action' ) === 'submit' ) {
|
||||
$this->listForm( $target, $reason, $limit, $namespace );
|
||||
} else {
|
||||
$this->promptForm();
|
||||
|
@ -429,7 +429,7 @@ class SpecialNuke extends SpecialPage {
|
|||
$status = 'job';
|
||||
}
|
||||
|
||||
if ( $status == 'job' ) {
|
||||
if ( $status === 'job' ) {
|
||||
$res[] = $this->msg( 'nuke-deletion-queued' )
|
||||
->plaintextParams( $title->getPrefixedText() )
|
||||
->parse();
|
||||
|
|
Loading…
Reference in a new issue