Index: trunk/extensions/ReplaceText/SpecialReplaceText.php |
— | — | @@ -158,7 +158,9 @@ |
159 | 159 | foreach ( $res as $row ) { |
160 | 160 | $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); |
161 | 161 | // see if this move can happen |
162 | | - $new_title = Title::makeTitleSafe( $row->page_namespace, str_replace( $this->target, $this->replacement, $row->page_title ) ); |
| 162 | + $cur_page_name = str_replace('_', ' ', $row->page_title); |
| 163 | + $new_page_name = str_replace( $this->target, $this->replacement, $cur_page_name ); |
| 164 | + $new_title = Title::makeTitleSafe( $row->page_namespace, $new_page_name ); |
163 | 165 | $err = $title->isValidMoveOperation( $new_title ); |
164 | 166 | if ( $title->userCanMove( true ) && !is_array( $err ) ) { |
165 | 167 | $titles_for_move[] = $title; |