From 200a28255e058843465c63080d917170de293ee6 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 13 Feb 2017 17:49:05 -0600 Subject: Always enable avatars * we introduced this setting in the begining because our avatar support caused some performance issues, but we fixed them and should only provide one way how Nextcloud looks Signed-off-by: Morris Jobke --- lib/private/Template/JSConfigHelper.php | 2 +- lib/private/TemplateLayout.php | 1 - lib/private/legacy/template.php | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/private') diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index f17c6a16194..1c241989fd2 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -204,7 +204,7 @@ class JSConfigHelper { 'session_keepalive' => $this->config->getSystemValue('session_keepalive', true), 'version' => implode('.', \OCP\Util::getVersion()), 'versionstring' => \OC_Util::getVersionString(), - 'enable_avatars' => $this->config->getSystemValue('enable_avatars', true) === true, + 'enable_avatars' => true, // here for legacy reasons - to not crash existing code that relies on this value 'lost_password_link'=> $this->config->getSystemValue('lost_password_link', null), 'modRewriteWorking' => (\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true'), ]), diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 19fc9462185..f1621363237 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -100,7 +100,6 @@ class 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) === true); if (\OC_User::getUser() === false) { $this->assign('userAvatarSet', false); diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index a07bf214f34..09e3d130f49 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -121,10 +121,8 @@ class OC_Template extends \OC\Template\Base { OC_Util::addStyle("styles",null,true); // avatars - if (\OC::$server->getSystemConfig()->getValue('enable_avatars', true) === true) { - \OC_Util::addScript('jquery.avatar', null, true); - \OC_Util::addScript('placeholder', null, true); - } + \OC_Util::addScript('jquery.avatar', null, true); + \OC_Util::addScript('placeholder', null, true); OC_Util::addVendorScript('select2/select2'); OC_Util::addVendorStyle('select2/select2', null, true); -- cgit v1.2.3