Small optimizations
authorMarcel Werk <burntime@woltlab.com>
Wed, 12 Jun 2013 14:39:57 +0000 (16:39 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 12 Jun 2013 14:39:57 +0000 (16:39 +0200)
com.woltlab.wcf/templates/moderationList.tpl
wcfsetup/install/files/acp/templates/userList.tpl
wcfsetup/install/files/lib/acp/page/UserListPage.class.php

index 02e75326315cff30bb7e04f2fd9d59ec00ab4571..ba90a8738b95d98202eafa308e438f50f5c74109 100644 (file)
                        <tbody>
                                {foreach from=$objects item=entry}
                                        <tr>
-                                               <td class="columnID"><p class="framed">{@$entry->getUserProfile()->getAvatar()->getImageTag(32)}</p></td>
+                                               <td class="columnIcon"><p class="framed">{@$entry->getUserProfile()->getAvatar()->getImageTag(32)}</p></td>
                                                <td class="columnID">{#$entry->queueID}</td>
                                                <td class="columnText columnSubject">
                                                        <h3>
index f64a255ea10775f0b671d1af187f71a671d44261..8cbd16500879c339461ce33a949a0c6355107615 100644 (file)
@@ -67,7 +67,7 @@
                                <tr>
                                        <th class="columnMark"><label><input type="checkbox" class="jsClipboardMarkAll" /></label></th>
                                        <th class="columnID columnUserID{if $sortField == 'userID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField=userID&sortOrder={if $sortField == 'userID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
-                                       <th class="columnTitle columnUsername{if $sortField == 'username'} active {@$sortOrder}{/if}"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField=username&sortOrder={if $sortField == 'username' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.user.username{/lang}</a></th>
+                                       <th class="columnTitle columnUsername{if $sortField == 'username'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField=username&sortOrder={if $sortField == 'username' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.user.username{/lang}</a></th>
                                        
                                        {foreach from=$columnHeads key=column item=columnLanguageVariable}
                                                <th class="column{$column|ucfirst}{if $sortField == $column} active {@$sortOrder}{/if}"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField={$column}&sortOrder={if $sortField == $column && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}{$columnLanguageVariable}{/lang}</a></th>
                                                        {event name='rowButtons'}
                                                </td>
                                                <td class="columnID columnUserID">{@$user->userID}</td>
+                                               <td class="columnIcon"><p class="framed">{@$user->getAvatar()->getImageTag(24)}</p></td>
                                                <td class="columnTitle columnUsername">{if $user->editable}<a title="{lang}wcf.acp.user.edit{/lang}" href="{link controller='UserEdit' id=$user->userID}{/link}">{$user->username}</a>{else}{$user->username}{/if}</td>
                                                
                                                {foreach from=$columnHeads key=column item=columnLanguageVariable}
index a2416a43d6719ad97ff7d1cabeab967a678e71d9..4f766ec632b9b33b221b4512775825fef800a5ec 100755 (executable)
@@ -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