From b4b599386ca2b34814342e11d9dab011f85503dd Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 11 Jan 2004 23:29:23 +0000 Subject: [PATCH] Add $wgRemoteUploads option to show the upload _link_ even though it's disabled, on the assumption that the link will be bounced to where it'll work. Used on en2.wikipedia.org --- includes/DefaultSettings.php | 1 + includes/Skin.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 4d8a7a9645..7e40447546 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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, diff --git a/includes/Skin.php b/includes/Skin.php index 7af2d63090..f3a24748a3 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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

"; } - if ( 0 != $wgUser->getID() && !$wgDisableUploads ) { + if ( 0 != $wgUser->getID() && ( !$wgDisableUploads || $wgRemoteUploads ) ) { $s .= $this->specialLink( "upload" ) . $sep; } $s .= $this->specialLink( "specialpages" ) -- 2.20.1