mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
SpecialFindComment: Allow spaces instead of underscores in the input
Our IDs and names are correctly written with underscores, but allow spaces too for consistency with the behavior of internal wiki links when linking to a subpage of Special:FindComment. Change-Id: Ib9f67ac02d963395db9d56951946b9747a410a88
This commit is contained in:
parent
28fdcfc132
commit
80746017bb
|
@ -78,7 +78,9 @@ class SpecialFindComment extends FormSpecialPage {
|
|||
* @inheritDoc
|
||||
*/
|
||||
public function onSubmit( array $data ) {
|
||||
$this->idOrName = $data['idorname'];
|
||||
// They are correctly written with underscores, but allow spaces too for consistency with
|
||||
// the behavior of internal wiki links.
|
||||
$this->idOrName = str_replace( ' ', '_', $data['idorname'] );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue