diff options
author | kondou <kondou@ts.unde.re> | 2013-09-09 16:57:46 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-09 16:57:46 +0200 |
commit | 1832eb88726dce70d4f8a0a45bd574b0b688ab26 (patch) | |
tree | ce7c5b7a0e8a3e61f8bb93312cb7fedb6a4a58a7 /settings | |
parent | d18a070a0393ac3846053bcef1833dd01856e117 (diff) | |
download | nextcloud-server-1832eb88726dce70d4f8a0a45bd574b0b688ab26.tar.gz nextcloud-server-1832eb88726dce70d4f8a0a45bd574b0b688ab26.zip |
Pass view in \OC_Avatar to constructor and use $_ for enable_avatars
Diffstat (limited to 'settings')
-rw-r--r-- | settings/personal.php | 1 | ||||
-rw-r--r-- | settings/templates/personal.php | 2 | ||||
-rw-r--r-- | settings/templates/users.php | 4 | ||||
-rw-r--r-- | settings/users.php | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/settings/personal.php b/settings/personal.php index 88e8802663d..670e18e20ef 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -89,6 +89,7 @@ $tmpl->assign('passwordChangeSupported', OC_User::canUserChangePassword(OC_User: $tmpl->assign('displayNameChangeSupported', OC_User::canUserChangeDisplayName(OC_User::getUser())); $tmpl->assign('displayName', OC_User::getDisplayName()); $tmpl->assign('enableDecryptAll' , $enableDecryptAll); +$tmpl->assign('enableAvatars', \OC_Config::getValue('enable_avatars', true)); $forms=OC_App::getForms('personal'); $tmpl->assign('forms', array()); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 9215115503a..d2ca8154f16 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -80,7 +80,7 @@ if($_['passwordChangeSupported']) { } ?> -<?php if (\OC_Config::getValue('enable_avatars', true) === true): ?> +<?php if ($_['enableAvatars']): ?> <form id="avatar" method="post" action="<?php p(\OC_Helper::linkToRoute('core_avatar_post')); ?>"> <fieldset class="personalblock"> <legend><strong><?php p($l->t('Profile picture')); ?></strong></legend> diff --git a/settings/templates/users.php b/settings/templates/users.php index 445e5ce2fd5..747d052a7bd 100644 --- a/settings/templates/users.php +++ b/settings/templates/users.php @@ -81,7 +81,7 @@ $_['subadmingroups'] = array_flip($items); <table class="hascontrols" data-groups="<?php p(json_encode($allGroups));?>"> <thead> <tr> - <?php if (\OC_Config::getValue('enable_avatars', true) === true): ?> + <?php if ($_['enableAvatars']): ?> <th id='headerAvatar'></th> <?php endif; ?> <th id='headerName'><?php p($l->t('Username'))?></th> @@ -99,7 +99,7 @@ $_['subadmingroups'] = array_flip($items); <?php foreach($_["users"] as $user): ?> <tr data-uid="<?php p($user["name"]) ?>" data-displayName="<?php p($user["displayName"]) ?>"> - <?php if (\OC_Config::getValue('enable_avatars', true) === true): ?> + <?php if ($_['enableAvatars']): ?> <td class="avatar"><div class="avatardiv"></div></td> <?php endif; ?> <td class="name"><?php p($user["name"]); ?></td> diff --git a/settings/users.php b/settings/users.php index 213d1eecfda..2f1c63a0b59 100644 --- a/settings/users.php +++ b/settings/users.php @@ -81,4 +81,5 @@ $tmpl->assign( 'quota_preset', $quotaPreset); $tmpl->assign( 'default_quota', $defaultQuota); $tmpl->assign( 'defaultQuotaIsUserDefined', $defaultQuotaIsUserDefined); $tmpl->assign( 'recoveryAdminEnabled', $recoveryAdminEnabled); +$tmpl->assign('enableAvatars', \OC_Config::getValue('enable_avatars', true)); $tmpl->printPage(); |