From f538a45945ac832ddbdf68b2133aeaf4a7e7c360 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 12 Jun 2013 16:39:57 +0200 Subject: [PATCH] Small optimizations --- com.woltlab.wcf/templates/moderationList.tpl | 2 +- wcfsetup/install/files/acp/templates/userList.tpl | 3 ++- wcfsetup/install/files/lib/acp/page/UserListPage.class.php | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/com.woltlab.wcf/templates/moderationList.tpl b/com.woltlab.wcf/templates/moderationList.tpl index 02e7532631..ba90a8738b 100644 --- a/com.woltlab.wcf/templates/moderationList.tpl +++ b/com.woltlab.wcf/templates/moderationList.tpl @@ -100,7 +100,7 @@ {foreach from=$objects item=entry} -

{@$entry->getUserProfile()->getAvatar()->getImageTag(32)}

+

{@$entry->getUserProfile()->getAvatar()->getImageTag(32)}

{#$entry->queueID}

diff --git a/wcfsetup/install/files/acp/templates/userList.tpl b/wcfsetup/install/files/acp/templates/userList.tpl index f64a255ea1..8cbd165008 100644 --- a/wcfsetup/install/files/acp/templates/userList.tpl +++ b/wcfsetup/install/files/acp/templates/userList.tpl @@ -67,7 +67,7 @@ {lang}wcf.global.objectID{/lang} - {lang}wcf.user.username{/lang} + {lang}wcf.user.username{/lang} {foreach from=$columnHeads key=column item=columnLanguageVariable} {lang}{$columnLanguageVariable}{/lang} @@ -108,6 +108,7 @@ {event name='rowButtons'} {@$user->userID} +

{@$user->getAvatar()->getImageTag(24)}

{if $user->editable}{$user->username}{else}{$user->username}{/if} {foreach from=$columnHeads key=column item=columnLanguageVariable} diff --git a/wcfsetup/install/files/lib/acp/page/UserListPage.class.php b/wcfsetup/install/files/lib/acp/page/UserListPage.class.php index a2416a43d6..4f766ec632 100755 --- a/wcfsetup/install/files/lib/acp/page/UserListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/UserListPage.class.php @@ -3,6 +3,7 @@ namespace wcf\acp\page; use wcf\data\user\group\UserGroup; use wcf\data\user\option\ViewableUserOption; use wcf\data\user\User; +use wcf\data\user\UserProfile; use wcf\page\SortablePage; use wcf\system\cache\builder\UserOptionCacheBuilder; use wcf\system\clipboard\ClipboardHandler; @@ -231,10 +232,12 @@ class UserListPage extends SortablePage { $userToGroups[$row['userID']][] = $row['groupID']; } - $sql = "SELECT option_value.*, user_table.* + $sql = "SELECT user_avatar.*, option_value.*, user_table.* FROM wcf".WCF_N."_user user_table LEFT JOIN wcf".WCF_N."_user_option_value option_value ON (option_value.userID = user_table.userID) + LEFT JOIN wcf".WCF_N."_user_avatar user_avatar + ON (user_avatar.avatarID = user_table.avatarID) ".$conditions." ORDER BY ".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'option_value.userOption'.$this->options[$this->sortField]['optionID'] : 'user_table.'.$this->sortField)." ".$this->sortOrder; $statement = WCF::getDB()->prepareStatement($sql); @@ -248,7 +251,7 @@ class UserListPage extends SortablePage { $row['bannable'] = ($accessible && WCF::getSession()->getPermission('admin.user.canBanUser') && $row['userID'] != WCF::getUser()->userID) ? 1 : 0; $row['isMarked'] = intval(in_array($row['userID'], $this->markedUsers)); - $this->users[] = new User(null, $row); + $this->users[] = new UserProfile(new User(null, $row)); } // get special columns -- 2.20.1