diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index cf3bfa0d30c..0fe482d58b6 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -138,6 +138,12 @@ $wgSharedUploadDirectory = "/var/www/wiki3/images"; $wgSharedUploadDBname = false; /** Cache shared metadata in memcached. Don't do this if the commons wiki is in a different memcached domain */ $wgCacheSharedUploads = true; +/** + * Point the upload navigation link to an external URL + * Useful if you want to use a shared repository by default + * without disabling local uploads +*/ +# $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload'; /** * Give a path here to use thumb.php for thumbnail generation on client request, instead of @@ -150,7 +156,6 @@ $wgCacheSharedUploads = true; $wgThumbnailScriptPath = false; $wgSharedThumbnailScriptPath = false; - /** * Set the following to false especially if you have a set of files that need to * be accessible by all wikis, and you do not want to use the hash (path/a/aa/) @@ -1305,7 +1310,6 @@ $wgCountCategorizedImagesAsUsed = false; */ $wgExternalStores = false; - } else { die(); } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index c9f0233b10e..7fd5adcaa27 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -724,7 +724,7 @@ class SkinTemplate extends Skin { wfProfileIn( $fname ); global $wgUser, $wgRequest; - global $wgSiteSupportPage, $wgEnableUploads; + global $wgSiteSupportPage, $wgEnableUploads, $wgUploadNavigationUrl; $action = $wgRequest->getText( 'action' ); $oldid = $wgRequest->getVal( 'oldid' ); @@ -740,8 +740,12 @@ class SkinTemplate extends Skin { // $nav_urls['sitesupport'] = array('href' => $this->makeI18nUrl('sitesupportpage')); $nav_urls['sitesupport'] = array('href' => $wgSiteSupportPage); $nav_urls['help'] = array('href' => $this->makeI18nUrl('helppage')); - if( $this->loggedin && $wgEnableUploads ) { - $nav_urls['upload'] = array('href' => $this->makeSpecialUrl('Upload')); + if( $wgEnableUploads ) { + if (isset($wgUploadNavigationUrl)) { + $nav_urls['upload'] = array('href' => $wgUploadNavigationUrl ); + } else { + $nav_urls['upload'] = array('href' => $this->makeSpecialUrl('Upload')); + } } else { $nav_urls['upload'] = false; }