From: Alex Z Date: Thu, 18 Sep 2008 20:28:52 +0000 (+0000) Subject: (bug 12678) Don't show the upload link in the toolbox if the user is not allowed... X-Git-Tag: 1.31.0-rc.0~45230 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=27a97850784e063d4bb9d79dd61e470ccabd4f76;p=lhc%2Fweb%2Fwiklou.git (bug 12678) Don't show the upload link in the toolbox if the user is not allowed to upload. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d47424b20d..e0b713549e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -210,6 +210,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN limit instead of hardcoded 50. * (bug 15617) $wgFeedClassesOutputPage::getHeadLinks() respects $wgFeedClasses, instead of hardcoding rss and atom. Patch by Juliano F. Ravasi. * (bug 14638) Special:Blockip now provides a link to the block log if the user has been blocked more than 10 times. Patch by Matt Johnston. +* (bug 12678) Skins don't show Upload link if the user isn't allowed to upload. === API changes in 1.14 === diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 9efe515c51..33307e3133 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -853,7 +853,7 @@ class SkinTemplate extends Skin { $nav_urls = array(); $nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() ); - if( $wgEnableUploads ) { + if( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) { if ($wgUploadNavigationUrl) { $nav_urls['upload'] = array( 'href' => $wgUploadNavigationUrl ); } else {