Skip to content

Commit

Permalink
Merge pull request #5117 from nextcloud/enh/noid/improve-config
Browse files Browse the repository at this point in the history
nextcloud: config files: do not compare against false
  • Loading branch information
szaimen authored Aug 12, 2024
2 parents c369b1f + 151b05e commit 6986ecc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Containers/nextcloud/config/apps.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
),
),
);
if (getenv('APPS_ALLOWLIST') !== false) {
if (getenv('APPS_ALLOWLIST')) {
$CONFIG['appsallowlist'] = explode(" ", getenv('APPS_ALLOWLIST'));
}
8 changes: 4 additions & 4 deletions Containers/nextcloud/config/proxy.config.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
if (getenv('HTTP_PROXY') !== false) {
if (getenv('HTTP_PROXY')) {
$CONFIG['proxy'] = getenv('HTTP_PROXY');
}
if (getenv('HTTPS_PROXY') !== false) {
if (getenv('HTTPS_PROXY')) {
$CONFIG['proxy'] = getenv('HTTPS_PROXY');
}
if (getenv('PROXY_USER_PASSWORD') !== false) {
if (getenv('PROXY_USER_PASSWORD')) {
$CONFIG['proxyuserpwd'] = getenv('PROXY_USER_PASSWORD');
}
if (getenv('NO_PROXY') !== false) {
if (getenv('NO_PROXY')) {
$CONFIG['proxyexclude'] = explode(',', getenv('NO_PROXY'));
}
4 changes: 2 additions & 2 deletions Containers/nextcloud/config/redis.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
),
);

if (getenv('REDIS_HOST_PORT') !== false) {
if (getenv('REDIS_HOST_PORT')) {
$CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
} elseif (getenv('REDIS_HOST')[0] != '/') {
$CONFIG['redis']['port'] = 6379;
}

if (getenv('REDIS_DB_INDEX') !== false) {
if (getenv('REDIS_DB_INDEX')) {
$CONFIG['redis']['dbindex'] = (int) getenv('REDIS_DB_INDEX');
}
}

0 comments on commit 6986ecc

Please sign in to comment.