Add $wgRemoteUploads option to show the upload _link_ even though it's
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 11 Jan 2004 23:29:23 +0000 (23:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 11 Jan 2004 23:29:23 +0000 (23:29 +0000)
disabled, on the assumption that the link will be bounced to where
it'll work. Used on en2.wikipedia.org

includes/DefaultSettings.php
includes/Skin.php

index 4d8a7a9..7e40447 100644 (file)
@@ -153,6 +153,7 @@ $wgDisableCounters = false;
 $wgDisableTextSearch = false;
 $wgDisableSearchUpdate = false; # If you've disabled search semi-permanently, this also disables updates to the table. If you ever re-enable, be sure to rebuild the search table.
 $wgDisableUploads = true; # Uploads have to be specially set up to be secure
+$wgRemoteUploads = false; # Set to true to enable the upload _link_ while local uploads are disabled. Assumes that the special page link will be bounced to another server where uploads do work.
 $wgDisableAnonTalk = false;
 
 # We can serve pages compressed in order to save bandwidth,
index 7af2d63..f3a2474 100644 (file)
@@ -683,7 +683,7 @@ class Skin {
        function quickBar()
        {
                global $wgOut, $wgTitle, $wgUser, $action, $wgLang;
-               global $wpPreview, $wgDisableUploads;
+               global $wpPreview, $wgDisableUploads, $wgRemoteUploads;
            
                $fname =  "Skin::quickBar";
                wfProfileIn( $fname );
@@ -808,7 +808,7 @@ class Skin {
                        $s .= "\n<br><hr class='sep'>";
                } 
                
-               if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
+               if ( 0 != $wgUser->getID() && ( !$wgDisableUploads || $wgRemoteUploads ) ) {
                        $s .= $this->specialLink( "upload" ) . $sep;
                }
                $s .= $this->specialLink( "specialpages" )