From ac3bea9f1a56dd245e41545b41e72bb94139bf4f Mon Sep 17 00:00:00 2001 From: Andy Mornes Date: Thu, 13 Feb 2014 13:26:48 -0600 Subject: [PATCH] [FIX] Correcting user ID for new block emails Also adding the currency to the notifications as well. --- cronjobs/findblock.php | 3 ++- public/templates/mail/notifications/new_block.tpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index 71cca5705..1ac695350 100755 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -153,7 +153,7 @@ $aAccounts = $notification->getNotificationAccountIdByType('new_block'); if (is_array($aAccounts)) { - $finder = $user->getUserName($aBlock['account_id']); + $finder = $user->getUserName($iAccountId); foreach ($aAccounts as $aData) { $aMailData['height'] = $aBlock['height']; $aMailData['subject'] = 'New Block'; @@ -162,6 +162,7 @@ $aMailData['amount'] = $aBlock['amount']; $aMailData['difficulty'] = $aBlock['difficulty']; $aMailData['finder'] = $finder; + $aMailData['currency'] = $config['currency']; if (!$notification->sendNotification($aData['account_id'], 'new_block', $aMailData)) $log->logError('Failed to notify user of new found block: ' . $user->getUserName($aData['account_id'])); } diff --git a/public/templates/mail/notifications/new_block.tpl b/public/templates/mail/notifications/new_block.tpl index 46b81fbf4..20549f18c 100644 --- a/public/templates/mail/notifications/new_block.tpl +++ b/public/templates/mail/notifications/new_block.tpl @@ -1,5 +1,5 @@ -

{nocache}Block Number {$DATA.height} has been discovered by {$DATA.finder} with a total value of {$DATA.amount}! The current difficulty is {$DATA.difficulty}.{/nocache}

+

{nocache}Block Number {$DATA.height} has been discovered by {$DATA.finder} with a total value of {$DATA.amount} {$DATA.currency}! The current difficulty is {$DATA.difficulty}.{/nocache}