]> source.dussan.org Git - nextcloud-server.git/commitdiff
Bring another enable_avatars to $_ and fix $thus->$this
authorkondou <kondou@ts.unde.re>
Wed, 11 Sep 2013 05:11:33 +0000 (07:11 +0200)
committerkondou <kondou@ts.unde.re>
Wed, 11 Sep 2013 05:11:33 +0000 (07:11 +0200)
core/templates/layout.user.php
lib/avatar.php
lib/templatelayout.php

index cd303104e0c6ab8036e04885547d4fb412c2f4bb..71bec11d219b7bfb342a413f76b729f8a8e3095c 100644 (file)
@@ -49,7 +49,7 @@
                                <span id="expand" tabindex="0" role="link">
                                        <span id="expandDisplayName"><?php  p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span>
                                        <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" />
-                                       <?php if (\OC_Config::getValue('enable_avatars', true) === true): ?>
+                                       <?php if ($_['enableAvatars']): ?>
                                        <div class="avatardiv"></div>
                                        <?php endif; ?>
                                </span>
index c07ef537d502ed6eea6e88e93f06a1594d233a41..f20980c364b0290c1b98f218d2997156732389d2 100644 (file)
@@ -28,7 +28,7 @@ class OC_Avatar {
         * @return boolean|\OC_Image containing the avatar or false if there's no image
        */
        public function get ($size = 64) {
-               if ($thus->view->file_exists('avatar.jpg')) {
+               if ($this->view->file_exists('avatar.jpg')) {
                        $ext = 'jpg';
                } elseif ($this->view->file_exists('avatar.png')) {
                        $ext = 'png';
index 0b868a39e490f0cfc7dd42de37b819d07d3314c8..625f3424a0473ce9dbde867bdb276683df6b9fb9 100644 (file)
@@ -46,6 +46,7 @@ class OC_TemplateLayout extends OC_Template {
                        $user_displayname = OC_User::getDisplayName();
                        $this->assign( 'user_displayname', $user_displayname );
                        $this->assign( 'user_uid', OC_User::getUser() );
+                       $this->assign('enableAvatars', \OC_Config::getValue('enable_avatars', true));
                } else if ($renderas == 'guest' || $renderas == 'error') {
                        parent::__construct('core', 'layout.guest');
                } else {