From c8f48ad8c2bf329520821a9a598147e3ff75a5d7 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 14 Feb 2021 12:44:39 +0100 Subject: [PATCH] Use guest support of UserFunctionTemplatePlugin See #3989 --- com.woltlab.wcf/templates/articleListItems.tpl | 6 +----- com.woltlab.wcf/templates/authorSidebarBox.tpl | 6 +----- .../templates/boxSidebarCommentList.tpl | 2 +- com.woltlab.wcf/templates/commentList.tpl | 6 +----- com.woltlab.wcf/templates/commentResponseList.tpl | 6 +----- com.woltlab.wcf/templates/messageQuoteList.tpl | 8 +------- com.woltlab.wcf/templates/moderationArticle.tpl | 14 ++------------ com.woltlab.wcf/templates/moderationComment.tpl | 14 ++------------ com.woltlab.wcf/templates/moderationReport.tpl | 13 ++----------- .../templates/recentActivityListItem.tpl | 2 +- com.woltlab.wcf/templates/searchResultList.tpl | 14 ++------------ com.woltlab.wcf/templates/userBirthdayList.tpl | 2 +- com.woltlab.wcf/templates/userListItem.tpl | 2 +- com.woltlab.wcf/templates/userProfileLikeItem.tpl | 2 +- 14 files changed, 18 insertions(+), 79 deletions(-) diff --git a/com.woltlab.wcf/templates/articleListItems.tpl b/com.woltlab.wcf/templates/articleListItems.tpl index cb2b593b0b..28c09c6d65 100644 --- a/com.woltlab.wcf/templates/articleListItems.tpl +++ b/com.woltlab.wcf/templates/articleListItems.tpl @@ -44,11 +44,7 @@
- {if $article->userID} - {user object=$article->getUserProfile()} - {else} - {$article->username} - {/if} + {user object=$article->getUserProfile()}
{@$article->time|time} diff --git a/com.woltlab.wcf/templates/authorSidebarBox.tpl b/com.woltlab.wcf/templates/authorSidebarBox.tpl index b7b18321e0..1a46241050 100644 --- a/com.woltlab.wcf/templates/authorSidebarBox.tpl +++ b/com.woltlab.wcf/templates/authorSidebarBox.tpl @@ -5,11 +5,7 @@

- {if $userProfile->userID} - {user object=$userProfile} - {else} - {$userProfile->username} - {/if} + {user object=$userProfile}

{if MODULE_USER_RANK} {if $userProfile->getUserTitle()} diff --git a/com.woltlab.wcf/templates/boxSidebarCommentList.tpl b/com.woltlab.wcf/templates/boxSidebarCommentList.tpl index e47a933bf1..d098e42984 100644 --- a/com.woltlab.wcf/templates/boxSidebarCommentList.tpl +++ b/com.woltlab.wcf/templates/boxSidebarCommentList.tpl @@ -9,7 +9,7 @@ {@$boxComment->getExcerpt(50)}
- {if $boxComment->userID}{user object=$boxComment->getUserProfile()}{else}{$boxComment->username}{/if} {@$boxComment->time|time} + {user object=$boxComment->getUserProfile()} {@$boxComment->time|time}
{/foreach} diff --git a/com.woltlab.wcf/templates/commentList.tpl b/com.woltlab.wcf/templates/commentList.tpl index 6e577321e5..41117aca15 100644 --- a/com.woltlab.wcf/templates/commentList.tpl +++ b/com.woltlab.wcf/templates/commentList.tpl @@ -13,11 +13,7 @@ data-responses="{@$comment->responses}" data-last-response-time="{if $commentLastResponseTime|empty}{@$comment->getLastResponseTime()}{else}{@$commentLastResponseTime}{/if}" data-is-disabled="{@$comment->isDisabled}" >
- {if $comment->userID} - {user object=$comment->getUserProfile() type='avatar48' title=$comment->getUserProfile()->username} - {else} - {@$comment->getUserProfile()->getAvatar()->getImageTag(48)} - {/if} + {user object=$comment->getUserProfile() type='avatar48'}
diff --git a/com.woltlab.wcf/templates/commentResponseList.tpl b/com.woltlab.wcf/templates/commentResponseList.tpl index a772b15695..a55bc3c486 100644 --- a/com.woltlab.wcf/templates/commentResponseList.tpl +++ b/com.woltlab.wcf/templates/commentResponseList.tpl @@ -6,11 +6,7 @@ {else}
  • getReactionHandler()->getDataAttributes('com.woltlab.wcf.comment.response', $response->responseID)} data-can-edit="{if $response->isEditable()}true{else}false{/if}" data-can-delete="{if $response->isDeletable()}true{else}false{/if}" data-user-id="{@$response->userID}">
    - {if $response->userID} - {user object=$response->getUserProfile() type='avatar48' title=$response->getUserProfile()->username} - {else} - {@$response->getUserProfile()->getAvatar()->getImageTag(32)} - {/if} + {user object=$response->getUserProfile() type='avatar48'}
    diff --git a/com.woltlab.wcf/templates/messageQuoteList.tpl b/com.woltlab.wcf/templates/messageQuoteList.tpl index 4ca4c8c1b1..fcff3a42f5 100644 --- a/com.woltlab.wcf/templates/messageQuoteList.tpl +++ b/com.woltlab.wcf/templates/messageQuoteList.tpl @@ -16,13 +16,7 @@