*/
$wgMaximumMovedPages = 100;
+/**
+ * Fix double redirects after a page move.
+ * Tends to conflict with page move vandalism, use only on a private wiki.
+ */
+$wgFixDoubleRedirects = false;
+
/**
* Array of namespaces to generate a sitemap for when the
* maintenance/generateSitemap.php script is run, or false if one is to be ge-
}
function showForm( $err ) {
- global $wgOut, $wgUser;
+ global $wgOut, $wgUser, $wgFixDoubleRedirects;
$skin = $wgUser->getSkin();
$considerTalk = ( !$this->oldTitle->isTalkPage() && $oldTalk->exists() );
$dbr = wfGetDB( DB_SLAVE );
- $hasRedirects = $dbr->selectField( 'redirect', '1',
- array(
- 'rd_namespace' => $this->oldTitle->getNamespace(),
- 'rd_title' => $this->oldTitle->getDBkey(),
- ) , __METHOD__ );
-
+ if ( $wgFixDoubleRedirects ) {
+ $hasRedirects = $dbr->selectField( 'redirect', '1',
+ array(
+ 'rd_namespace' => $this->oldTitle->getNamespace(),
+ 'rd_title' => $this->oldTitle->getDBkey(),
+ ) , __METHOD__ );
+ } else {
+ $hasRedirects = false;
+ }
+
if ( $considerTalk ) {
$wgOut->addWikiMsg( 'movepagetalktext' );
}
function doSubmit() {
global $wgOut, $wgUser, $wgRequest, $wgMaximumMovedPages, $wgLang;
+ global $wgFixDoubleRedirects;
if ( $wgUser->pingLimiter( 'move' ) ) {
$wgOut->rateLimited();
return;
}
- if ( $this->fixRedirects ) {
+ if ( $wgFixDoubleRedirects && $this->fixRedirects ) {
DoubleRedirectJob::fixRedirects( 'move', $ot, $nt );
}