From: Kaldari Date: Thu, 30 Aug 2012 23:59:52 +0000 (+0000) Subject: Revert "Setting up a way to have uploading by URL, but not on Special:Upload" X-Git-Tag: 1.31.0-rc.0~22517^2 X-Git-Url: http://git.cyclocoop.org/%27.generer_url_ecrire%28%27admin_couteau_suisse%27%2C%27cmd=descrip&outil=boites_privees?a=commitdiff_plain;h=ae67fae0bfb9ddd47cb6e8ae6007d9e1c7e25fa7;p=lhc%2Fweb%2Fwiklou.git Revert "Setting up a way to have uploading by URL, but not on Special:Upload" This reverts commit 8c6c29b3fc5db93c46bdd73b48f1ff5b4edad25c I erroneously assumed there was a practical reason why wgAllowCopyUploads was turned off on Commons, i.e. it was too easy to abuse, causing too many copyvios, etc. I didn't realize that the reason it was turned off was purely technical (since the apaches on the cluster have no external internet access). So there's no reason we need a separate config. Change-Id: I293a59d756335909898fd647edd6eddb68f06e17 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 410dc544ad..76cfba6fa4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -524,13 +524,6 @@ $wgAllowAsyncCopyUploads = false; */ $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; - /** * Max size for uploads, in bytes. If not set to an array, applies to all * uploads. If set to an array, per upload type maximums can be set, using the diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index b8f150de6e..3072408d3c 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -798,8 +798,6 @@ class UploadForm extends HTMLForm { * @return Array: descriptor array */ protected function getSourceSection() { - global $wgCopyUploadsFromSpecialUpload; - if ( $this->mSessionKey ) { return array( 'SessionKey' => array( @@ -813,9 +811,7 @@ class UploadForm extends HTMLForm { ); } - $canUploadByUrl = UploadFromUrl::isEnabled() - && UploadFromUrl::isAllowed( $this->getUser() ) - && $wgCopyUploadsFromSpecialUpload; + $canUploadByUrl = UploadFromUrl::isEnabled() && UploadFromUrl::isAllowed( $this->getUser() ); $radio = $canUploadByUrl; $selectedSourceType = strtolower( $this->getRequest()->getText( 'wpSourceType', 'File' ) );