(bug 12678) Don't show the upload link in the toolbox if the user is not allowed...
authorAlex Z <mrzman@users.mediawiki.org>
Thu, 18 Sep 2008 20:28:52 +0000 (20:28 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Thu, 18 Sep 2008 20:28:52 +0000 (20:28 +0000)
RELEASE-NOTES
includes/SkinTemplate.php

index d47424b..e0b7135 100644 (file)
@@ -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 ===
 
index 9efe515..33307e3 100644 (file)
@@ -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 {