From: Cyperghost Date: Mon, 22 Jan 2024 11:48:17 +0000 (+0100) Subject: Check if `user.conversation.maxConversations` 0 and set it to `1` X-Git-Tag: 6.0.7_dev_1~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3580ca61f153cba7177540d34ccac51e7dbc719;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Check if `user.conversation.maxConversations` 0 and set it to `1` --- diff --git a/templates/conversationList.tpl b/templates/conversationList.tpl index 8a3d928..63493a0 100644 --- a/templates/conversationList.tpl +++ b/templates/conversationList.tpl @@ -116,6 +116,9 @@
{assign var='conversationCount' value=$__wcf->getConversationHandler()->getConversationCount()} {assign var='maxConversationCount' value=$__wcf->session->getPermission('user.conversation.maxConversations')} + {if $maxConversationCount == 0} + {assign var='maxConversationCount' value=1} + {/if} {assign var='conversationCountValue' value=$conversationCount/$maxConversationCount*100} {#$conversationCountValue} %