From: Evan Prodromou Date: Fri, 12 Dec 2003 22:05:50 +0000 (+0000) Subject: Added default text for when uploading is disabled. Since this is the X-Git-Tag: 1.3.0beta1~1254 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=e4d0686752215d6db9134a52d02f5665ab469ebb;p=lhc%2Fweb%2Fwiklou.git Added default text for when uploading is disabled. Since this is the default for new installations, it's important to have this text handy. In addition, hid the "Upload file" link if uploads are disabled. --- diff --git a/includes/Skin.php b/includes/Skin.php index 4853b2a4f6..a26ebd7422 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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

"; } - if ( 0 != $wgUser->getID() ) { + if ( 0 != $wgUser->getID() && !$wgDisableUploads ) { $s .= $this->specialLink( "upload" ) . $sep; } $s .= $this->specialLink( "specialpages" ) diff --git a/includes/SkinCologneBlue.php b/includes/SkinCologneBlue.php index ebb2b1ce88..894054afb5 100644 --- a/includes/SkinCologneBlue.php +++ b/includes/SkinCologneBlue.php @@ -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" ); } diff --git a/languages/Language.php b/languages/Language.php index 6b8aaeaea2..1502387765 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -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",