Disables upload by url option for users without the necessary permissions
authorRohan <rohan1395@yahoo.com>
Wed, 25 Jun 2014 16:39:04 +0000 (22:09 +0530)
committerBrian Wolff <bawolff+wn@gmail.com>
Sat, 5 Jul 2014 18:20:27 +0000 (18:20 +0000)
Does an explicit check for a true value in SpecialUpload::getSourceSection

Bug: 39507
Change-Id: I00297494230d07081dd85a810321446badc3ecb0

includes/specials/SpecialUpload.php

index 01c0aaf..976294b 100644 (file)
@@ -827,7 +827,7 @@ class UploadForm extends HTMLForm {
                }
 
                $canUploadByUrl = UploadFromUrl::isEnabled()
-                       && UploadFromUrl::isAllowed( $this->getUser() )
+                       && ( UploadFromUrl::isAllowed( $this->getUser() ) === true )
                        && $wgCopyUploadsFromSpecialUpload;
                $radio = $canUploadByUrl;
                $selectedSourceType = strtolower( $this->getRequest()->getText( 'wpSourceType', 'File' ) );