mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-23 22:54:02 +00:00
Followup to r63922, per CR comments
This commit is contained in:
parent
c30239bf87
commit
a6f122b28b
|
@ -63,18 +63,15 @@ class InputBoxHooks {
|
|||
}
|
||||
|
||||
$params = $request->getValues();
|
||||
$title = $params['prefix'] . @$params['title'];
|
||||
unset( $params['prefix'] );
|
||||
unset( $params['title'] );
|
||||
$url = "?title=$title";
|
||||
foreach( $params as $key => $value ){
|
||||
if( $key ){
|
||||
$url .= "&{$key}={$value}";
|
||||
}
|
||||
$title = $params['prefix'];
|
||||
if ( isset( $params['title'] ) ){
|
||||
$title .= $params['title'];
|
||||
}
|
||||
unset( $params['prefix'] );
|
||||
$params['title'] = $title;
|
||||
|
||||
global $wgScript;
|
||||
$output->redirect( $wgScript . $url, '301' );
|
||||
$output->redirect( wfAppendQuery( $wgScript, $params ), '301' );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue