[Pkg-owncloud-commits] [owncloud] 57/79: Retain compatibility with updated storage configurations
David Prévot
taffit at moszumanska.debian.org
Tue Sep 1 20:55:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit bf1096602bb18119f03d4f7af0253c3168a12a49
Author: Robin McCorkell <rmccorkell at owncloud.com>
Date: Thu Aug 20 12:28:59 2015 +0100
Retain compatibility with updated storage configurations
String booleans are still accepted
---
apps/files_external/lib/amazons3.php | 4 ++--
apps/files_external/templates/settings.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index cff796c..554a0df 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 1cdaa3c..d1499c3 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"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list