summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-14 09:22:02 -0600
committerGitHub <noreply@github.com>2017-02-14 09:22:02 -0600
commitc5dffc465cbaef7c58d0ef4d9c322c0a597e8aed (patch)
treec05963e8c0adb01d5bdb41f6a763908fa904a575 /settings
parent257e28f46dd732ea2a9b379c4b1655bb19cd0c7e (diff)
parent200a28255e058843465c63080d917170de293ee6 (diff)
downloadnextcloud-server-c5dffc465cbaef7c58d0ef4d9c322c0a597e8aed.tar.gz
nextcloud-server-c5dffc465cbaef7c58d0ef4d9c322c0a597e8aed.zip
Merge pull request #3472 from nextcloud/enable-avatars-always
Always enable avatars
Diffstat (limited to 'settings')
-rw-r--r--settings/Controller/UsersController.php10
-rw-r--r--settings/js/personal.js16
-rw-r--r--settings/personal.php7
-rw-r--r--settings/templates/personal.php2
-rw-r--r--settings/templates/users/part.userlist.php4
-rw-r--r--settings/users.php1
6 files changed, 13 insertions, 27 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index 43a38432499..719b6eb68f6 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -188,12 +188,10 @@ class UsersController extends Controller {
}
$avatarAvailable = false;
- if ($this->config->getSystemValue('enable_avatars', true) === true) {
- try {
- $avatarAvailable = $this->avatarManager->getAvatar($user->getUID())->exists();
- } catch (\Exception $e) {
- //No avatar yet
- }
+ try {
+ $avatarAvailable = $this->avatarManager->getAvatar($user->getUID())->exists();
+ } catch (\Exception $e) {
+ //No avatar yet
}
return [
diff --git a/settings/js/personal.js b/settings/js/personal.js
index f9a4517633a..89491b96657 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -334,15 +334,13 @@ $(document).ready(function () {
});
// Load the big avatar
- if (oc_config.enable_avatars) {
- $('#avatarform .avatardiv').avatar(OC.currentUser, 145, true, null, function() {
- if($('#displayavatar img').length === 0) {
- $('#removeavatar').removeClass('inlineblock').addClass('hidden');
- } else {
- $('#removeavatar').removeClass('hidden').addClass('inlineblock');
- }
- });
- }
+ $('#avatarform .avatardiv').avatar(OC.currentUser, 145, true, null, function() {
+ if($('#displayavatar img').length === 0) {
+ $('#removeavatar').removeClass('inlineblock').addClass('hidden');
+ } else {
+ $('#removeavatar').removeClass('hidden').addClass('inlineblock');
+ }
+ });
// Show token views
diff --git a/settings/personal.php b/settings/personal.php
index a79e9764a6b..a1fcd10e0ad 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -57,10 +57,8 @@ OC_Util::addStyle( 'settings', 'settings' );
\OC_Util::addVendorScript('strengthify/jquery.strengthify');
\OC_Util::addVendorStyle('strengthify/strengthify');
\OC_Util::addScript('files', 'jquery.fileupload');
-if ($config->getSystemValue('enable_avatars', true) === true) {
- \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop');
- \OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop');
-}
+\OC_Util::addVendorScript('jcrop/js/jquery.Jcrop');
+\OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop');
\OC::$server->getEventDispatcher()->dispatch('OC\Settings\Personal::loadAdditionalScripts');
@@ -182,7 +180,6 @@ $tmpl->assign('websiteScope', $userData[\OC\Accounts\AccountManager::PROPERTY_WE
$tmpl->assign('twitterScope', $userData[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['scope']);
$tmpl->assign('addressScope', $userData[\OC\Accounts\AccountManager::PROPERTY_ADDRESS]['scope']);
-$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/templates/personal.php b/settings/templates/personal.php
index 65ce3751b98..ecbf1ff5c5f 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -35,7 +35,6 @@
</div>
<div id="personal-settings">
-<?php if ($_['enableAvatars']): ?>
<div id="personal-settings-avatar-container">
<form id="avatarform" class="section" method="post" action="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.postAvatar')); ?>">
<h2>
@@ -66,7 +65,6 @@
<input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>">
</form>
</div>
-<?php endif; ?>
<div id="personal-settings-container">
<div class="personal-settings-setting-box">
diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php
index bab68e5a765..4cf395ff62d 100644
--- a/settings/templates/users/part.userlist.php
+++ b/settings/templates/users/part.userlist.php
@@ -1,9 +1,7 @@
<table id="userlist" class="hascontrols grid" data-groups="<?php p($_['allGroups']);?>">
<thead>
<tr>
- <?php if ($_['enableAvatars']): ?>
<th id="headerAvatar" scope="col"></th>
- <?php endif; ?>
<th id="headerName" scope="col"><?php p($l->t('Username'))?></th>
<th id="headerDisplayName" scope="col"><?php p($l->t( 'Full name' )); ?></th>
<th id="headerPassword" scope="col"><?php p($l->t( 'Password' )); ?></th>
@@ -22,9 +20,7 @@
<tbody>
<!-- the following <tr> is used as a template for the JS part -->
<tr style="display:none">
- <?php if ($_['enableAvatars']): ?>
<td class="avatar"><div class="avatardiv"></div></td>
- <?php endif; ?>
<th class="name" scope="row"></th>
<td class="displayName"><span></span> <img class="action"
src="<?php p(image_path('core', 'actions/rename.svg'))?>"
diff --git a/settings/users.php b/settings/users.php
index 5f31d35ff97..1b0f4f7b8e8 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -118,7 +118,6 @@ $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) === 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'));