Added default text for when uploading is disabled. Since this is the
authorEvan Prodromou <evanprodromou@users.mediawiki.org>
Fri, 12 Dec 2003 22:05:50 +0000 (22:05 +0000)
committerEvan Prodromou <evanprodromou@users.mediawiki.org>
Fri, 12 Dec 2003 22:05:50 +0000 (22:05 +0000)
default for new installations, it's important to have this text handy.

In addition, hid the "Upload file" link if uploads are disabled.

includes/Skin.php
includes/SkinCologneBlue.php
languages/Language.php

index 4853b2a..a26ebd7 100644 (file)
@@ -675,7 +675,8 @@ class Skin {
        function quickBar()
        {
                global $wgOut, $wgTitle, $wgUser, $action, $wgLang;
-               global $wpPreview;
+               global $wpPreview, $wgDisableUploads;
+           
                $fname =  "Skin::quickBar";
                wfProfileIn( $fname );
 
@@ -799,7 +800,7 @@ class Skin {
                        $s .= "\n<br><hr class='sep'>";
                } 
                
-               if ( 0 != $wgUser->getID() ) {
+               if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
                        $s .= $this->specialLink( "upload" ) . $sep;
                }
                $s .= $this->specialLink( "specialpages" )
index ebb2b1c..894054a 100644 (file)
@@ -136,7 +136,7 @@ class SkinCologneBlue extends Skin {
 
        function quickBar()
        {
-               global $wgOut, $wgTitle, $wgUser, $wgLang;
+               global $wgOut, $wgTitle, $wgUser, $wgLang, $wgDisableUploads;
 
                $tns=$wgTitle->getNamespace();
 
@@ -224,7 +224,7 @@ class SkinCologneBlue extends Skin {
                  . $sep . $this->specialLink( "imagelist" ) 
                  . $sep . $this->specialLink( "statistics" ) 
                  . $sep . $this->bugReportsLink();
-               if ( 0 != $wgUser->getID() ) {
+               if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
                        $s .= $sep . $this->specialLink( "upload" );
                }
 
index 6b8aaea..1502387 100644 (file)
@@ -886,7 +886,8 @@ created and by whom, and anything else you may know about it.",
 "uploadwarning" => "Upload warning",
 "savefile"             => "Save file",
 "uploadedimage" => "uploaded \"$1\"",
-
+"uploaddisabled" => "Sorry, uploading is disabled.",
+                                      
 # Image list
 #
 "imagelist"            => "Image list",