From 7b41a75f921237fa3eb4f5d8413349e4d98b373c Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Mon, 2 Dec 2013 16:50:16 +0100 Subject: [PATCH] [FIX] Added where clause for archived --- public/include/classes/transaction.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/include/classes/transaction.class.php b/public/include/classes/transaction.class.php index dd566489..7f5581c0 100644 --- a/public/include/classes/transaction.class.php +++ b/public/include/classes/transaction.class.php @@ -40,8 +40,11 @@ class Transaction extends Base { LEFT JOIN " . $this->block->getTableName() . " AS b ON b.id = t.block_id SET t.archived = 1 - WHERE ( t.account_id = ? AND t.id <= ? AND b.confirmations >= ? ) - OR ( t.account_id = ? AND t.id <= ? AND t.type IN ( 'Credit_PPS', 'Donation_PPS', 'Fee_PPS', 'TXFee', 'Debit_MP', 'Debit_AP' ) )"); + WHERE t.archived = 0 + AND ( + ( t.account_id = ? AND t.id <= ? AND b.confirmations >= ? ) + OR ( t.account_id = ? AND t.id <= ? AND t.type IN ( 'Credit_PPS', 'Donation_PPS', 'Fee_PPS', 'TXFee', 'Debit_MP', 'Debit_AP' ) ) + )"); if ($this->checkStmt($stmt) && $stmt->bind_param('iiiii', $account_id, $txid, $this->config['confirmations'], $account_id, $txid) && $stmt->execute()) return true; return $this->sqlError();