From 39b86844b6904f8b1357454acda6dece27aeda61 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 29 May 2005 06:22:43 +0000 Subject: [PATCH] forward-ported $wgDisableHardRedirects --- includes/Article.php | 4 ++-- includes/DefaultSettings.php | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index c619a3c043..fe57a8dee5 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -246,7 +246,7 @@ class Article { * Load the revision (including cur_text) into this object */ function loadContent( $noredir = false ) { - global $wgOut, $wgRequest; + global $wgOut, $wgRequest, $wgDisableHardRedirects; if ( $this->mContentLoaded ) return; @@ -386,7 +386,7 @@ class Article { # Gotta hand redirects to special pages differently: # Fill the HTTP response "Location" header and ignore # the rest of the page we're on. - if( $globalTitle ) { + if( $globalTitle && !$wgDisableHardRedirects ) { global $wgOut; if ( $rt->getInterwiki() != '' && $rt->isLocal() ) { $source = $this->mTitle->getFullURL( 'redirect=no' ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 40d125cdff..61c8650b61 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1424,13 +1424,16 @@ $wgSortSpecialPages = true; * from the .../skins/ directory */ $wgSkipSkin = ''; -$wgSkipSkins = array(); # More of the same - /** * Array of disabled article actions, e.g. view, edit, dublincore, delete, etc. */ $wgDisabledActions = array(); +/** + * Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link + */ +$wgDisableHardRedirects = false; + /** * Use http.dnsbl.sorbs.net to check for open proxies */ -- 2.20.1