mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-23 22:33:48 +00:00
Merge "Check for invalid new titles"
This commit is contained in:
commit
cb08a9a768
|
@ -426,7 +426,7 @@ class SpecialReplaceText extends SpecialPage {
|
|||
|
||||
foreach ( $res as $row ) {
|
||||
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
|
||||
if ( $title == null ) {
|
||||
if ( !$title ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -436,6 +436,11 @@ class SpecialReplaceText extends SpecialPage {
|
|||
$this->replacement,
|
||||
$this->use_regex
|
||||
);
|
||||
if ( !$new_title ) {
|
||||
// New title is not valid because it contains invalid characters.
|
||||
$unmoveable_titles[] = $title;
|
||||
continue;
|
||||
}
|
||||
|
||||
$mvPage = $this->movePageFactory->newMovePage( $title, $new_title );
|
||||
$moveStatus = $mvPage->isValidMove();
|
||||
|
|
Loading…
Reference in a new issue