mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-27 16:39:59 +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'];
|
||||
$title = $params['prefix'];
|
||||
if ( isset( $params['title'] ) ){
|
||||
$title .= $params['title'];
|
||||
}
|
||||
unset( $params['prefix'] );
|
||||
unset( $params['title'] );
|
||||
$url = "?title=$title";
|
||||
foreach( $params as $key => $value ){
|
||||
if( $key ){
|
||||
$url .= "&{$key}={$value}";
|
||||
}
|
||||
}
|
||||
$params['title'] = $title;
|
||||
|
||||
global $wgScript;
|
||||
$output->redirect( $wgScript . $url, '301' );
|
||||
$output->redirect( wfAppendQuery( $wgScript, $params ), '301' );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue