r46045 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46044‎ | r46045 | r46046 >
Date:23:40, 22 January 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added checkbox for setting whether page moves should result in a redirect
Modified paths:
  • /trunk/extensions/ReplaceText/SpecialReplaceText.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReplaceText/SpecialReplaceText.php
@@ -66,6 +66,12 @@
6767 $replacement_params['target_str'] = $target_str;
6868 $replacement_params['replacement_str'] = $replacement_str;
6969 $replacement_params['edit_summary'] = wfMsgForContent('replacetext_editsummary', $target_str, $replacement_str);
 70+ $replacement_params['create_redirect'] = false;
 71+ foreach ($wgRequest->getValues() as $key => $value) {
 72+ if ($key == 'create-redirect' && $value == '1') {
 73+ $replacement_params['create_redirect'] = true;
 74+ }
 75+ }
7076 $jobs = array();
7177 foreach ($wgRequest->getValues() as $key => $value) {
7278 if ($value == '1') {
@@ -238,11 +244,13 @@
239245 $text .= " " . $skin->makeLinkObj( $title, $title->prefix($title->getText()) ) . " - <small>$context_str</small><br />\n";
240246 }
241247 if (count($titles_for_move) > 0) {
242 - $text .= "<p>$choose_pages_for_move_label</p>\n";
 248+ $text .= "<br />\n<p>$choose_pages_for_move_label</p>\n";
243249 foreach ($titles_for_move as $title) {
244250 $text .= Xml::check('move-' . $title->getArticleID(), true);
245251 $text .= " " . $skin->makeLinkObj( $title, $title->prefix($title->getText()) ) . "<br />\n";
246252 }
 253+ $text .= '<p>' . wfMsg('replacetext_savemovedpages') . wfMsg('colon-separator');
 254+ $text .= Xml::check('create-redirect', true) . "</p>\n";
247255 }
248256 $text .=<<<END
249257 <p><input type="Submit" name="replace" value="$replace_label"></p>

Status & tagging log