Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | } |
83 | 83 | |
84 | 84 | function showForm( $err ) { |
85 | | - global $wgOut, $wgUser; |
| 85 | + global $wgOut, $wgUser, $wgFixDoubleRedirects; |
86 | 86 | |
87 | 87 | $skin = $wgUser->getSkin(); |
88 | 88 | |
— | — | @@ -136,12 +136,16 @@ |
137 | 137 | $considerTalk = ( !$this->oldTitle->isTalkPage() && $oldTalk->exists() ); |
138 | 138 | |
139 | 139 | $dbr = wfGetDB( DB_SLAVE ); |
140 | | - $hasRedirects = $dbr->selectField( 'redirect', '1', |
141 | | - array( |
142 | | - 'rd_namespace' => $this->oldTitle->getNamespace(), |
143 | | - 'rd_title' => $this->oldTitle->getDBkey(), |
144 | | - ) , __METHOD__ ); |
145 | | - |
| 140 | + if ( $wgFixDoubleRedirects ) { |
| 141 | + $hasRedirects = $dbr->selectField( 'redirect', '1', |
| 142 | + array( |
| 143 | + 'rd_namespace' => $this->oldTitle->getNamespace(), |
| 144 | + 'rd_title' => $this->oldTitle->getDBkey(), |
| 145 | + ) , __METHOD__ ); |
| 146 | + } else { |
| 147 | + $hasRedirects = false; |
| 148 | + } |
| 149 | + |
146 | 150 | if ( $considerTalk ) { |
147 | 151 | $wgOut->addWikiMsg( 'movepagetalktext' ); |
148 | 152 | } |
— | — | @@ -277,6 +281,7 @@ |
278 | 282 | |
279 | 283 | function doSubmit() { |
280 | 284 | global $wgOut, $wgUser, $wgRequest, $wgMaximumMovedPages, $wgLang; |
| 285 | + global $wgFixDoubleRedirects; |
281 | 286 | |
282 | 287 | if ( $wgUser->pingLimiter( 'move' ) ) { |
283 | 288 | $wgOut->rateLimited(); |
— | — | @@ -320,7 +325,7 @@ |
321 | 326 | return; |
322 | 327 | } |
323 | 328 | |
324 | | - if ( $this->fixRedirects ) { |
| 329 | + if ( $wgFixDoubleRedirects && $this->fixRedirects ) { |
325 | 330 | DoubleRedirectJob::fixRedirects( 'move', $ot, $nt ); |
326 | 331 | } |
327 | 332 | |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3432,6 +3432,12 @@ |
3433 | 3433 | $wgMaximumMovedPages = 100; |
3434 | 3434 | |
3435 | 3435 | /** |
| 3436 | + * Fix double redirects after a page move. |
| 3437 | + * Tends to conflict with page move vandalism, use only on a private wiki. |
| 3438 | + */ |
| 3439 | +$wgFixDoubleRedirects = false; |
| 3440 | + |
| 3441 | +/** |
3436 | 3442 | * Array of namespaces to generate a sitemap for when the |
3437 | 3443 | * maintenance/generateSitemap.php script is run, or false if one is to be ge- |
3438 | 3444 | * nerated for all namespaces. |