diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2004-01-11 23:56:36 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2004-01-11 23:56:36 +0000 |
commit | aa3b6f6606fd66888b9883beb477799edcd2eeae (patch) | |
tree | 3455c47a82946eda8ab251c9cc050bc8650fad85 | |
parent | 3108d98c86f59bcedda2304e010d31cada5ea5fc (diff) |
Hide upload link if uploads are disabled.origin/REL1_1
Notes
http://mediawiki.org/wiki/Special:Code/MediaWiki/2286
-rw-r--r-- | includes/DefaultSettings.php | 1 | ||||
-rw-r--r-- | includes/Skin.php | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e5db003ed4dc..c4b7efc0b24c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -145,6 +145,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 c6e2e42a9b1e..d60ec1cb1579 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -675,7 +675,7 @@ class Skin { function quickBar() { global $wgOut, $wgTitle, $wgUser, $action, $wgLang; - global $wpPreview; + global $wpPreview, $wgDisableUploads, $wgRemoteUploads; $fname = "Skin::quickBar"; wfProfileIn( $fname ); @@ -799,7 +799,7 @@ class Skin { $s .= "\n<br><hr class='sep'>"; } - if ( 0 != $wgUser->getID() ) { + if ( 0 != $wgUser->getID() && ( !$wgDisableUploads || $wgRemoteUploads ) ) { $s .= $this->specialLink( "upload" ) . $sep; } $s .= $this->specialLink( "specialpages" ) |