Index: trunk/extensions/ReplaceText/SpecialReplaceText.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | } |
20 | 20 | |
21 | 21 | function displayConfirmForm($message) { |
22 | | - global $wgRequest; |
| 22 | + global $wgRequest, $wgContLang; |
23 | 23 | $target_str = $wgRequest->getVal('target_str'); |
24 | 24 | $replacement_str = $wgRequest->getVal('replacement_str'); |
25 | 25 | // escape quotes for inclusion in HTML |
— | — | @@ -26,8 +26,12 @@ |
27 | 27 | $replacement_str = str_replace('"', '"', $replacement_str); |
28 | 28 | $continue_label = wfMsg('replacetext_continue'); |
29 | 29 | $cancel_label = wfMsg('replacetext_cancel'); |
| 30 | + // set 'title' as hidden field, in case there's no URL niceness |
| 31 | + $mw_namespace_labels = $wgContLang->getNamespaces(); |
| 32 | + $special_namespace = $mw_namespace_labels[NS_SPECIAL]; |
30 | 33 | $text =<<<END |
31 | 34 | <form method="post" action=""> |
| 35 | + <input type="hidden" name="title" value="$special_namespace:ReplaceText"> |
32 | 36 | <input type="hidden" name="target_str" value="$target_str"> |
33 | 37 | <input type="hidden" name="replacement_str" value="$replacement_str"> |
34 | 38 | <p>$message</p> |
— | — | @@ -43,6 +47,10 @@ |
44 | 48 | function doSpecialReplaceText() { |
45 | 49 | global $wgUser, $wgOut, $wgRequest, $wgContLang; |
46 | 50 | |
| 51 | + // set 'title' as hidden field, in case there's no URL niceness |
| 52 | + $mw_namespace_labels = $wgContLang->getNamespaces(); |
| 53 | + $special_namespace = $mw_namespace_labels[NS_SPECIAL]; |
| 54 | + |
47 | 55 | if ($wgRequest->getCheck('replace')) { |
48 | 56 | $target_str = $wgRequest->getVal('target_str'); |
49 | 57 | $replacement_str = $wgRequest->getVal('replacement_str'); |
— | — | @@ -170,6 +178,7 @@ |
171 | 179 | $text =<<<END |
172 | 180 | <p>$choose_pages_label</p> |
173 | 181 | <form id="choose_pages" method="post"> |
| 182 | + <input type="hidden" name="title" value="$special_namespace:ReplaceText"> |
174 | 183 | <input type="hidden" name="target_str" value="$target_str"> |
175 | 184 | <input type="hidden" name="replacement_str" value="$replacement_str"> |
176 | 185 | |
— | — | @@ -195,6 +204,7 @@ |
196 | 205 | $continue_label = wfMsg('replacetext_continue'); |
197 | 206 | $text =<<<END |
198 | 207 | <form method="get" action=""> |
| 208 | + <input type="hidden" name="title" value="$special_namespace:ReplaceText"> |
199 | 209 | <p>$replacement_label</p> |
200 | 210 | <p>$replacement_note</p> |
201 | 211 | <table> |