summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-01 16:16:53 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-01 16:16:53 +0100
commit2b9fcac462006fe4d36532e4e9b2b12aed6ec6a6 (patch)
tree683f7a90ebcc231488718d21364493d71d9e794e
parent0fd92a28518820ae9e1f0b0a13a8b839a7390238 (diff)
parent85692194d51eb0277903ecf364d7cb5cf9ed8bc8 (diff)
downloadnextcloud-server-2b9fcac462006fe4d36532e4e9b2b12aed6ec6a6.tar.gz
nextcloud-server-2b9fcac462006fe4d36532e4e9b2b12aed6ec6a6.zip
Merge pull request #22047 from owncloud/stable8.2-backport-21953
[stable8.2] Make enable_avatars setting more robust
-rw-r--r--core/js/config.php2
-rw-r--r--lib/private/templatelayout.php2
-rw-r--r--settings/personal.php2
-rw-r--r--settings/users.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/core/js/config.php b/core/js/config.php
index 7fa181c7020..25b5d956d9e 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -140,7 +140,7 @@ $array = array(
'session_keepalive' => \OCP\Config::getSystemValue('session_keepalive', true),
'version' => implode('.', OC_Util::getVersion()),
'versionstring' => OC_Util::getVersionString(),
- 'enable_avatars' => \OC::$server->getConfig()->getSystemValue('enable_avatars', true),
+ 'enable_avatars' => \OC::$server->getConfig()->getSystemValue('enable_avatars', true) === true,
'lost_password_link'=> \OC::$server->getConfig()->getSystemValue('lost_password_link', null),
)
),
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 7d16823d2a8..17cb6051115 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -124,7 +124,7 @@ class OC_TemplateLayout extends OC_Template {
$this->assign('user_displayname', $userDisplayName);
$this->assign('user_uid', OC_User::getUser());
$this->assign('appsmanagement_active', $appsMgmtActive);
- $this->assign('enableAvatars', $this->config->getSystemValue('enable_avatars', true));
+ $this->assign('enableAvatars', $this->config->getSystemValue('enable_avatars', true) === true);
$this->assign('userAvatarSet', \OC_Helper::userAvatarSet(OC_User::getUser()));
} else if ($renderAs == 'error') {
parent::__construct('core', 'layout.guest', '', false);
diff --git a/settings/personal.php b/settings/personal.php
index bc12166d0fc..088df0818fb 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -147,7 +147,7 @@ $tmpl->assign('activelanguage', $userLang);
$tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User::getUser()));
$tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser()));
$tmpl->assign('displayName', OC_User::getDisplayName());
-$tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true));
+$tmpl->assign('enableAvatars', $config->getSystemValue('enable_avatars', true) === true);
$tmpl->assign('avatarChangeSupported', OC_User::canUserChangeAvatar(OC_User::getUser()));
$tmpl->assign('certs', $certificateManager->listCertificates());
$tmpl->assign('showCertificates', $enableCertImport);
diff --git a/settings/users.php b/settings/users.php
index f16cbca2ae9..de21c390976 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -100,7 +100,7 @@ $tmpl->assign('quota_preset', $quotaPreset);
$tmpl->assign('default_quota', $defaultQuota);
$tmpl->assign('defaultQuotaIsUserDefined', $defaultQuotaIsUserDefined);
$tmpl->assign('recoveryAdminEnabled', $recoveryAdminEnabled);
-$tmpl->assign('enableAvatars', \OC::$server->getConfig()->getSystemValue('enable_avatars', true));
+$tmpl->assign('enableAvatars', \OC::$server->getConfig()->getSystemValue('enable_avatars', true) === true);
$tmpl->assign('show_storage_location', $config->getAppValue('core', 'umgmt_show_storage_location', 'false'));
$tmpl->assign('show_last_login', $config->getAppValue('core', 'umgmt_show_last_login', 'false'));