Remove the legacy user panel
authorAlexander Ebert <ebert@woltlab.com>
Mon, 8 Aug 2022 16:56:25 +0000 (18:56 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 9 Aug 2022 11:12:37 +0000 (13:12 +0200)
files/lib/data/conversation/ConversationAction.class.php
templateDelete.xml
templates/conversationListUserPanel.tpl [deleted file]

index a4a163f9789f58fa913c31116574407be80c8b0a..7489b287c1264d58e1469355f2c4acbde35be104 100644 (file)
@@ -757,85 +757,6 @@ class ConversationAction extends AbstractDatabaseObjectAction implements
         ];
     }
 
-    /**
-     * Validates parameters to return the mixed conversation list.
-     *
-     * @deprecated 5.5
-     */
-    public function validateGetMixedConversationList()
-    {
-        // does nothing
-    }
-
-    /**
-     * Returns a mixed conversation list with up to 10 unread conversations.
-     *
-     * @return  mixed[][]
-     * @deprecated 5.5 This method provided the data for the legacy user panel implementation.
-     */
-    public function getMixedConversationList()
-    {
-        $sqlSelect = '  , (
-            SELECT      participantID
-            FROM        wcf' . WCF_N . '_conversation_to_user
-            WHERE       conversationID = conversation.conversationID
-                    AND participantID <> conversation.userID
-                    AND isInvisible = 0
-            ORDER BY    username, participantID
-            LIMIT 1
-        ) AS otherParticipantID
-        , (
-            SELECT      username
-            FROM        wcf' . WCF_N . '_conversation_to_user
-            WHERE       conversationID = conversation.conversationID
-                    AND participantID <> conversation.userID
-                    AND isInvisible = 0
-            ORDER BY    username, participantID
-            LIMIT       1
-        ) AS otherParticipant';
-
-        $unreadConversationList = new UserConversationList(WCF::getUser()->userID);
-        $unreadConversationList->sqlSelects .= $sqlSelect;
-        $unreadConversationList->getConditionBuilder()->add('conversation_to_user.lastVisitTime < lastPostTime');
-        $unreadConversationList->sqlLimit = 10;
-        $unreadConversationList->sqlOrderBy = 'lastPostTime DESC';
-        $unreadConversationList->readObjects();
-
-        $conversations = [];
-        $count = 0;
-        foreach ($unreadConversationList as $conversation) {
-            $conversations[] = $conversation;
-            $count++;
-        }
-
-        if ($count < 10) {
-            $conversationList = new UserConversationList(WCF::getUser()->userID);
-            $conversationList->sqlSelects .= $sqlSelect;
-            $conversationList->getConditionBuilder()->add('conversation_to_user.lastVisitTime >= lastPostTime');
-            $conversationList->sqlLimit = (10 - $count);
-            $conversationList->sqlOrderBy = 'lastPostTime DESC';
-            $conversationList->readObjects();
-
-            foreach ($conversationList as $conversation) {
-                $conversations[] = $conversation;
-            }
-        }
-
-        WCF::getTPL()->assign([
-            'conversations' => $conversations,
-        ]);
-
-        $totalCount = ConversationHandler::getInstance()->getUnreadConversationCount();
-        if ($count < 10 && $count < $totalCount) {
-            UserStorageHandler::getInstance()->reset([WCF::getUser()->userID], 'unreadConversationCount');
-        }
-
-        return [
-            'template' => WCF::getTPL()->fetch('conversationListUserPanel'),
-            'totalCount' => $totalCount,
-        ];
-    }
-
     /**
      * @since 5.5
      */
index f1379e86e094b554dce6fda123a81d7b7276ff9c..ab67efda2c30fe221bdf9c8471190554616d2730 100644 (file)
@@ -1,11 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/templateDelete.xsd">
        <delete>
-               <template>__userStartConversation</template>
-               <template>conversationListUnread</template>
-               <template>conversationLog</template>
-               <template>conversationMessageAdd</template>
-               <template>conversationMessageEdit</template>
-               <template>searchResultConversationMessage</template>
+               <template>conversationListUserPanel</template>
        </delete>
 </data>
diff --git a/templates/conversationListUserPanel.tpl b/templates/conversationListUserPanel.tpl
deleted file mode 100644 (file)
index c5badc7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-{foreach from=$conversations item=conversation}
-       <li class="conversationItem{if $conversation->lastVisitTime < $conversation->lastPostTime} conversationItemUnread interactiveDropdownItemOutstanding{/if}" data-link="{link controller='Conversation' object=$conversation}action=firstNew{/link}" data-object-id="{@$conversation->conversationID}" data-is-read="{if $conversation->lastVisitTime < $conversation->lastPostTime}false{else}true{/if}">
-               <div class="box48">
-                       <div>
-                               {if $conversation->userID == $__wcf->user->userID}
-                                       {if $conversation->participants > 1}
-                                               <span class="icon icon48 fa-users"></span>
-                                       {else}
-                                               {@$conversation->getOtherParticipantProfile()->getAvatar()->getImageTag(48)}
-                                       {/if}
-                               {else}
-                                       {@$conversation->getUserProfile()->getAvatar()->getImageTag(48)}
-                               {/if}
-                       </div>
-                       <div>
-                               <h3><a href="{link controller='Conversation' object=$conversation}action=firstNew{/link}">{$conversation->subject}</a></h3>
-                               <small class="conversationInfo">
-                                       <span class="conversationParticipant">
-                                               {if $conversation->userID == $__wcf->user->userID}
-                                                       {if $conversation->participants > 1}
-                                                               {assign var='participantSummaryCount' value=$conversation->getParticipantSummary()|count}
-                                                               {implode from=$conversation->getParticipantSummary() item=participant}<a href="{$participant->getLink()}" class="userLink{if $participant->hideConversation == 2} conversationLeft{/if}" data-object-id="{@$participant->userID}">{$participant->username}</a>{/implode}
-                                                               {if $participantSummaryCount < $conversation->participants}{lang}wcf.conversation.participants.other{/lang}{/if}
-                                                       {else}
-                                                               {user object=$conversation->getOtherParticipantProfile()}
-                                                       {/if}
-                                               {else}
-                                                       {user object=$conversation->getUserProfile()}
-                                               {/if}
-                                       </span>
-                                       
-                                       <span class="conversationLastPostTime">{@$conversation->lastPostTime|time}</span>
-                               </small>
-                       </div>
-               </div>
-       </li>
-{/foreach}