diff options
-rw-r--r-- | apps/files_external/lib/amazons3.php | 12 | ||||
-rwxr-xr-x | apps/files_external/lib/config.php | 7 | ||||
-rw-r--r-- | apps/files_external/templates/settings.php | 2 | ||||
-rw-r--r-- | core/css/styles.css | 4 | ||||
-rw-r--r-- | issue_template.md | 8 |
5 files changed, 21 insertions, 12 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index 9a682fb2d48..00baacd488c 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -81,9 +81,9 @@ class AmazonS3 extends \OC\Files\Storage\Common { $scheme = ($params['use_ssl'] === 'false') ? 'http' : 'https'; $this->test = isset($params['test']); $this->timeout = ( ! isset($params['timeout'])) ? 15 : $params['timeout']; - $params['region'] = ( ! isset($params['region'])) ? 'eu-west-1' : $params['region']; - $params['hostname'] = ( !isset($params['hostname'])) ? 's3.amazonaws.com' : $params['hostname']; - if (!isset($params['port'])) { + $params['region'] = ( ! isset($params['region']) || $params['region'] === '' ) ? 'eu-west-1' : $params['region']; + $params['hostname'] = ( !isset($params['hostname']) || $params['hostname'] === '' ) ? 's3.amazonaws.com' : $params['hostname']; + if (!isset($params['port']) || $params['port'] === '') { $params['port'] = ($params['use_ssl'] === 'false') ? 80 : 443; } $base_url = $scheme.'://'.$params['hostname'].':'.$params['port'].'/'; @@ -507,8 +507,10 @@ class AmazonS3 extends \OC\Files\Storage\Common { } public function test() { - $test = $this->s3->get_canonical_user_id(); - if (isset($test['id']) && $test['id'] != '') { + $test = $this->connection->getBucketAcl(array( + 'Bucket' => $this->bucket, + )); + if (isset($test) && !is_null($test->getPath('Owner/ID'))) { return true; } return false; diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index aaa6c5be1a0..12836c7b88c 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -50,9 +50,9 @@ class OC_Mount_Config { 'key' => 'Access Key', 'secret' => '*Secret Key', 'bucket' => 'Bucket', - 'hostname' => 'Hostname (optional)', - 'port' => 'Port (optional)', - 'region' => 'Region (optional)', + 'hostname' => '&Hostname (optional)', + 'port' => '&Port (optional)', + 'region' => '&Region (optional)', 'use_ssl' => '!Enable SSL', 'use_path_style' => '!Enable Path Style')); @@ -244,6 +244,7 @@ class OC_Mount_Config { $storage = new $class($options); return $storage->test(); } catch (Exception $exception) { + \OCP\Util::logException('files_external', $exception); return false; } } diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 0d318a183c7..3ca16c3c7a8 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -60,7 +60,7 @@ class="optional" data-parameter="<?php p($parameter); ?>" value="<?php p($value); ?>" - placeholder="<?php p(substr($placeholder, 5)); ?>" /> + placeholder="<?php p(substr($placeholder, 1)); ?>" /> <?php elseif (strpos($placeholder, '#') !== false): ?> <input type="hidden" data-parameter="<?php p($parameter); ?>" diff --git a/core/css/styles.css b/core/css/styles.css index 6ace42a84cb..fa001d41c2c 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -105,8 +105,8 @@ textarea:hover, textarea:focus, textarea:active { input[type="checkbox"] { margin:0; padding:0; height:auto; width:auto; } input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:#111 !important; } input[type="time"] { - width: 110px; - height: 30px; + width: initial; + height: 31px; -moz-box-sizing: border-box; box-sizing: border-box; } #quota { diff --git a/issue_template.md b/issue_template.md index f9bff71af97..a9ff75a3b86 100644 --- a/issue_template.md +++ b/issue_template.md @@ -18,7 +18,13 @@ Database: PHP version: -ownCloud version: +ownCloud version: (see ownCloud admin page) + +Updated from an older ownCloud or fresh install: + +List of activated app: + +The content of config/config.php: (Without the database password and passwordsalt) ### Client configuration Browser: |