Fixed missing variables in daily notifications
authorMarcel Werk <burntime@woltlab.com>
Fri, 6 Apr 2018 09:19:26 +0000 (11:19 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 6 Apr 2018 09:19:26 +0000 (11:19 +0200)
com.woltlab.wcf/templates/email_dailyNotification.tpl

index 814991d547b15d98a4affc85d15c25eb31f7aa91..5e70079ff74f54af141bd307b0bbefd0ea0fa016 100644 (file)
@@ -12,7 +12,7 @@
 {assign var='event' value=$notification[event]}
 {assign var='notificationContent' value=$notification[notificationContent]}
 {assign var='notificationType' value=$notification[notificationType]}
-{if $notificationContent|is_array}{include file=$notificationContent[template] application=$notificationContent[application] variables=$notificationContent[variables]}{*
+{if $notificationContent|is_array}{if !$notificationContent[variables]|empty}{foreach from=$notificationContent[variables] key='__key' item='__item'}{assign var=$__key value=$__item}{/foreach}{/if}{include file=$notificationContent[template] application=$notificationContent[application] variables=$notificationContent[variables]}{*
 *}{else}{@$notificationContent}{/if}
 {/implode}
 
        {assign var='notificationType' value=$notification[notificationType]}
        <div class="largeMarginTop">
                {if $notificationContent|is_array}
+                       {if !$notificationContent[variables]|empty}
+                               {foreach from=$notificationContent[variables] key='__key' item='__item'}
+                                       {assign var=$__key value=$__item}
+                               {/foreach}
+                       {/if}
+                       
                        {include file=$notificationContent[template] application=$notificationContent[application] variables=$notificationContent[variables]}
                {else}
                        {@$notificationContent}