Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3456,4 +3456,4 @@ |
3457 | 3457 | * Cache-busting number for dismissable sitenotice |
3458 | 3458 | * Don't bump this, instead bump the number on [[MediaWiki:Sitenotice id]] |
3459 | 3459 | */ |
3460 | | -$wgMajorSiteNoticeID = 1; |
\ No newline at end of file |
| 3460 | +$wgMajorSiteNoticeID = 1; |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | class MovePageForm { |
58 | 58 | var $oldTitle, $newTitle; # Objects |
59 | 59 | var $reason; # Text input |
60 | | - var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects; # Checks |
| 60 | + var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects, $leaveRedirect; # Checks |
61 | 61 | |
62 | 62 | private $watch = false; |
63 | 63 | |
— | — | @@ -69,9 +69,11 @@ |
70 | 70 | if ( $wgRequest->wasPosted() ) { |
71 | 71 | $this->moveTalk = $wgRequest->getBool( 'wpMovetalk', false ); |
72 | 72 | $this->fixRedirects = $wgRequest->getBool( 'wpFixRedirects', false ); |
| 73 | + $this->leaveRedirect = $wgRequest->getBool( 'wpLeaveRedirect', false ); |
73 | 74 | } else { |
74 | 75 | $this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true ); |
75 | 76 | $this->fixRedirects = $wgRequest->getBool( 'wpFixRedirects', true ); |
| 77 | + $this->leaveRedirect = $wgRequest->getBool( 'wpLeaveRedirect', true ); |
76 | 78 | } |
77 | 79 | $this->moveSubpages = $wgRequest->getBool( 'wpMovesubpages', false ); |
78 | 80 | $this->deleteAndMove = $wgRequest->getBool( 'wpDeleteAndMove' ) && $wgRequest->getBool( 'wpConfirm' ); |
— | — | @@ -201,6 +203,18 @@ |
202 | 204 | ); |
203 | 205 | } |
204 | 206 | |
| 207 | + if ( $wgUser->isAllowed( 'suppressredirect' ) ) { |
| 208 | + $wgOut->addHTML( " |
| 209 | + <tr> |
| 210 | + <td></td> |
| 211 | + <td class='mw-input' >" . |
| 212 | + Xml::checkLabel( wfMsg( 'move-leave-redirect' ), 'wpLeaveRedirect', |
| 213 | + 'wpLeaveRedirect', $this->leaveRedirect ) . |
| 214 | + "</td> |
| 215 | + </tr>" |
| 216 | + ); |
| 217 | + } |
| 218 | + |
205 | 219 | if ( $hasRedirects ) { |
206 | 220 | $wgOut->addHTML( " |
207 | 221 | <tr> |
— | — | @@ -294,7 +308,13 @@ |
295 | 309 | return; |
296 | 310 | } |
297 | 311 | |
298 | | - $error = $ot->moveTo( $nt, true, $this->reason ); |
| 312 | + if ( $wgUser->isAllowed( 'suppressredirect' ) ) { |
| 313 | + $createRedirect = $this->leaveRedirect; |
| 314 | + } else { |
| 315 | + $createRedirect = true; |
| 316 | + } |
| 317 | + |
| 318 | + $error = $ot->moveTo( $nt, true, $this->reason, $createRedirect ); |
299 | 319 | if ( $error !== true ) { |
300 | 320 | call_user_func_array( array($this, 'showForm'), $error ); |
301 | 321 | return; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2660,6 +2660,7 @@ |
2661 | 2661 | 'imagetypemismatch' => 'The new file extension does not match its type', |
2662 | 2662 | 'imageinvalidfilename' => 'The target file name is invalid', |
2663 | 2663 | 'fix-double-redirects' => 'Update any redirects that point to the original title', |
| 2664 | +'move-leave-redirect' => 'Leave a redirect behind', |
2664 | 2665 | |
2665 | 2666 | # Export |
2666 | 2667 | 'export' => 'Export pages', |