forward-ported $wgDisableHardRedirects
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 06:22:43 +0000 (06:22 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 29 May 2005 06:22:43 +0000 (06:22 +0000)
includes/Article.php
includes/DefaultSettings.php

index c619a3c..fe57a8d 100644 (file)
@@ -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' );
index 40d125c..61c8650 100644 (file)
@@ -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
  */