Thaiphan has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73737


Change subject: Fix issue with images not being uploaded
......................................................................

Fix issue with images not being uploaded

Change-Id: If7a8bc9582bac286674a2cf839538973d748415a
---
M s3/AmazonS3FileBackend.php
1 file changed, 2 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AWS 
refs/changes/37/73737/1

diff --git a/s3/AmazonS3FileBackend.php b/s3/AmazonS3FileBackend.php
index 851c8cc..c321044 100644
--- a/s3/AmazonS3FileBackend.php
+++ b/s3/AmazonS3FileBackend.php
@@ -91,12 +91,6 @@
                        'scheme' => $this->useHTTPS ? 'https' : 'http',
                        'ssl.certificate_authority' => $this->useHTTPS ?: null
                ) );
-
-               if ( isset( $config['containerPaths'] ) ) {
-                       $this->containerPaths = 
(array)$config['containerPaths'];
-               } else {
-                       throw new MWException( __METHOD__ . " : containerPaths 
array must be set for S3." );
-               }
        }
 
        function directoriesAreVirtual() {
@@ -109,14 +103,7 @@
        }
 
        function resolveContainerName( $container ) {
-               if (
-                       isset( $this->containerPaths[$container] ) &&
-                       $this->client->isValidBucketName( 
$this->containerPaths[$container] )
-               ) {
-                       return $this->containerPaths[$container];
-               } else {
-                       return null;
-               }
+               return $container;
        }
 
        function resolveContainerPath( $container, $relStoragePath ) {
@@ -485,7 +472,7 @@
                }
 
                foreach( $acl['Grants'] as $grant ) {
-                       if( $grant['Grantee']['URI'] == $pubUrl ) {
+                       if( isset( $grant['Grantee']['URI'] ) && 
$grant['Grantee']['URI'] == $pubUrl ) {
                                return false;
                        }
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/73737
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7a8bc9582bac286674a2cf839538973d748415a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AWS
Gerrit-Branch: master
Gerrit-Owner: Thaiphan <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to