From: Brion Vibber Date: Sat, 28 Aug 2004 00:38:59 +0000 (+0000) Subject: Don't display Upload link in Monobook sidebar if uploading is disabled. X-Git-Tag: 1.5.0alpha1~2221 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=ff65b79f61e63abd7458c584f044f7ca83b39cdb;p=lhc%2Fweb%2Fwiklou.git Don't display Upload link in Monobook sidebar if uploading is disabled. --- diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index 4fe28c4210..7d6e2b977b 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -465,7 +465,7 @@ if( defined( "MEDIAWIKI" ) ) { # build array of common navigation links function buildNavUrls () { global $wgTitle, $wgUser, $wgRequest; - global $wgSiteSupportPage; + global $wgSiteSupportPage, $wgDisableUploads; $action = $wgRequest->getText( 'action' ); $oldid = $wgRequest->getVal( 'oldid' ); @@ -483,7 +483,9 @@ if( defined( "MEDIAWIKI" ) ) { // $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage'))); $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage)); $nav_urls['help'] = array('href' => htmlspecialchars( $this->makeI18nUrl('helppage'))); - $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload'))); + if( $this->loggedin && !$wgDisableUploads ) { + $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload'))); + } $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages'))); if( $wgTitle->getNamespace() == NS_USER || $wgTitle->getNamespace() == NS_USER_TALK ) { diff --git a/templates/xhtml_slim.pt b/templates/xhtml_slim.pt index 23ea30469e..33b6b8f966 100644 --- a/templates/xhtml_slim.pt +++ b/templates/xhtml_slim.pt @@ -112,7 +112,7 @@ i18n:translate="string:contributions">Contributions
  • Email this user
  • -
  • Upload a file
  • Special Pages