A setting to have uploading by URL, but not on Special:Upload.
Reverted this out when I thought we were going to be able to
support more widespread URL uploading, but currently, it is only
reliable for some domains, so although we can theoretically support
the new Flickr interface in UploadWizard, it probably isn't reliable
enough to add general URL uploading from Special:Upload.
Change-Id: I66b287bf173a4ea0b23f43180505d4c7de5acb26
*/
$wgCopyUploadsDomains = array();
+/**
+ * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
+ * true. If $wgAllowCopyUploads is true, but this is false, you will only be
+ * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
+ */
+$wgCopyUploadsFromSpecialUpload = false;
+
/**
* Proxy to use for copy upload requests.
* @since 1.20
* @return Array: descriptor array
*/
protected function getSourceSection() {
+ global $wgCopyUploadsFromSpecialUpload;
+
if ( $this->mSessionKey ) {
return array(
'SessionKey' => array(
);
}
- $canUploadByUrl = UploadFromUrl::isEnabled() && UploadFromUrl::isAllowed( $this->getUser() );
+ $canUploadByUrl = UploadFromUrl::isEnabled()
+ && UploadFromUrl::isAllowed( $this->getUser() )
+ && $wgCopyUploadsFromSpecialUpload;
$radio = $canUploadByUrl;
$selectedSourceType = strtolower( $this->getRequest()->getText( 'wpSourceType', 'File' ) );