r41716 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41715‎ | r41716 | r41717 >
Date:02:31, 6 October 2008
Author:tstarling
Status:old
Tags:
Comment:
Disable double redirect fixer by default, pending resolution of bug 15622, causes more harm than good.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -81,7 +81,7 @@
8282 }
8383
8484 function showForm( $err ) {
85 - global $wgOut, $wgUser;
 85+ global $wgOut, $wgUser, $wgFixDoubleRedirects;
8686
8787 $skin = $wgUser->getSkin();
8888
@@ -136,12 +136,16 @@
137137 $considerTalk = ( !$this->oldTitle->isTalkPage() && $oldTalk->exists() );
138138
139139 $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+
146150 if ( $considerTalk ) {
147151 $wgOut->addWikiMsg( 'movepagetalktext' );
148152 }
@@ -277,6 +281,7 @@
278282
279283 function doSubmit() {
280284 global $wgOut, $wgUser, $wgRequest, $wgMaximumMovedPages, $wgLang;
 285+ global $wgFixDoubleRedirects;
281286
282287 if ( $wgUser->pingLimiter( 'move' ) ) {
283288 $wgOut->rateLimited();
@@ -320,7 +325,7 @@
321326 return;
322327 }
323328
324 - if ( $this->fixRedirects ) {
 329+ if ( $wgFixDoubleRedirects && $this->fixRedirects ) {
325330 DoubleRedirectJob::fixRedirects( 'move', $ot, $nt );
326331 }
327332
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3432,6 +3432,12 @@
34333433 $wgMaximumMovedPages = 100;
34343434
34353435 /**
 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+/**
34363442 * Array of namespaces to generate a sitemap for when the
34373443 * maintenance/generateSitemap.php script is run, or false if one is to be ge-
34383444 * nerated for all namespaces.

Status & tagging log