aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-20 12:28:59 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-20 12:28:59 +0100
commitbf1096602bb18119f03d4f7af0253c3168a12a49 (patch)
tree6bf381f0d7b2e3987b70ad694d9d8e6cccd3d16b
parentd6bc77599eb1b2a78584e7ce1b0af7670ba96c40 (diff)
downloadnextcloud-server-bf1096602bb18119f03d4f7af0253c3168a12a49.tar.gz
nextcloud-server-bf1096602bb18119f03d4f7af0253c3168a12a49.zip
Retain compatibility with updated storage configurations
String booleans are still accepted
-rw-r--r--apps/files_external/lib/amazons3.php4
-rw-r--r--apps/files_external/templates/settings.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index cff796c6230..554a0df9b91 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -121,7 +121,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region'];
$params['hostname'] = empty($params['hostname']) ? 's3.amazonaws.com' : $params['hostname'];
if (!isset($params['port']) || $params['port'] === '') {
- $params['port'] = ($params['use_ssl'] === false) ? 80 : 443;
+ $params['port'] = ($params['use_ssl'] === false || $params['use_ssl'] === 'false') ? 80 : 443;
}
$this->params = $params;
}
@@ -586,7 +586,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
return $this->connection;
}
- $scheme = ($this->params['use_ssl'] === false) ? 'http' : 'https';
+ $scheme = ($this->params['use_ssl'] === false || $this->params['use_ssl'] === 'false') ? 'http' : 'https';
$base_url = $scheme . '://' . $this->params['hostname'] . ':' . $this->params['port'] . '/';
$this->connection = S3Client::factory(array(
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 1cdaa3c4ae8..d1499c3d2d6 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -60,7 +60,7 @@
<?php elseif (strpos($placeholder, '!') === 0): ?>
<label><input type="checkbox"
data-parameter="<?php p($parameter); ?>"
- <?php if ($value === true): ?> checked="checked"<?php endif; ?>
+ <?php if ($value === true || $value === 'true'): ?> checked="checked"<?php endif; ?>
/><?php p(substr($placeholder, 1)); ?></label>
<?php elseif (strpos($placeholder, '#') === 0): ?>
<input type="hidden"