From 7d801a561c8daf5cb706250c3c4cdc8a0ce6cb26 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sun, 21 Jul 2013 08:20:53 +0200 Subject: [PATCH] Fixing Orphan showing as unconfirmed * Fixes orphaned transactions showing as unconfirmed too * Fixes transaction tables to show orphaned credits in green, not red Fixes #490 --- public/include/classes/transaction.class.php | 4 ++-- public/templates/mmcFE/account/transactions/default.tpl | 2 +- public/templates/mmcFE/admin/transactions/default.tpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/include/classes/transaction.class.php b/public/include/classes/transaction.class.php index 30867cc6..229c8581 100644 --- a/public/include/classes/transaction.class.php +++ b/public/include/classes/transaction.class.php @@ -235,7 +235,7 @@ class Transaction { FROM $this->table AS t LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id WHERE - t.type IN ('Credit','Bonus') AND b.confirmations < ? + t.type IN ('Credit','Bonus') AND b.confirmations < ? AND b.confirmations > 0 AND t.account_id = ? ) AS t4, ( @@ -244,7 +244,7 @@ class Transaction { LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id WHERE ( - t.type IN ('Donation','Fee') AND b.confirmations < ? + t.type IN ('Donation','Fee') AND b.confirmations < ? AND b.confirmations > 0 ) AND t.account_id = ? ) AS t5, diff --git a/public/templates/mmcFE/account/transactions/default.tpl b/public/templates/mmcFE/account/transactions/default.tpl index 4bbe7b4b..52602088 100644 --- a/public/templates/mmcFE/account/transactions/default.tpl +++ b/public/templates/mmcFE/account/transactions/default.tpl @@ -116,7 +116,7 @@ {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} {if $TRANSACTIONS[transaction].height == 0}n/a{else}{$TRANSACTIONS[transaction].height}{/if} - {$TRANSACTIONS[transaction].amount|number_format:"8"} + {$TRANSACTIONS[transaction].amount|number_format:"8"} {if $TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Bonus'} {assign var="orphan_credits" value="`$orphan_credits|default:"0"+$TRANSACTIONS[transaction].amount`"} diff --git a/public/templates/mmcFE/admin/transactions/default.tpl b/public/templates/mmcFE/admin/transactions/default.tpl index aba15f12..ecf0dc70 100644 --- a/public/templates/mmcFE/admin/transactions/default.tpl +++ b/public/templates/mmcFE/admin/transactions/default.tpl @@ -117,7 +117,7 @@ {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} {if $TRANSACTIONS[transaction].height == 0}n/a{else}{$TRANSACTIONS[transaction].height}{/if} - {$TRANSACTIONS[transaction].amount|number_format:"8"} + {$TRANSACTIONS[transaction].amount|number_format:"8"} {/if} {/section}