Fix smiley tab if default category is empty (2)
authorMatthias Schmidt <gravatronics@live.com>
Sun, 1 Mar 2015 18:20:08 +0000 (19:20 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 1 Mar 2015 18:20:08 +0000 (19:20 +0100)
com.woltlab.wcf/templates/messageFormSmilies.tpl

index 1490dee605e04995f2637a3a12444638985c7933..56f254a3ad88ada24b58c862127699fbcf484e55 100644 (file)
 <div class="container containerPadding{if $__tabCount} messageTabMenu{/if}" data-preselect="true" data-collapsible="false" id="smilies-{if $wysiwygSelector|isset}{$wysiwygSelector}{else}text{/if}">
        {capture assign=__defaultSmilies}
                {assign var='__firstSmileyCategory' value=$smileyCategories|reset}
-               {include file='__messageFormSmilies' smilies=$__wcf->getSmileyCache()->getCategorySmilies($__firstSmileyCategory->categoryID)}
+               {if $__firstSmileyCategory->categoryID}
+                       {include file='__messageFormSmilies' smilies=$__wcf->getSmileyCache()->getCategorySmilies($__firstSmileyCategory->categoryID)}
+               {else}
+                       {include file='__messageFormSmilies' smilies=$__wcf->getSmileyCache()->getCategorySmilies()}
+               {/if}
        {/capture}
        
        {if $__tabCount > 1}