Addressing #853 with a fix and proposed change

This commit is contained in:
Sebastian Grewe 2013-11-20 07:33:24 +01:00
parent 7ac4cb538d
commit ffc39f855d

View File

@ -39,9 +39,9 @@ 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' ) )");
if ($this->checkStmt($stmt) && $stmt->bind_param('iiiii', $account_id, $txid, $this->config['confirmations'], $account_id, $txid) && $stmt->execute())
WHERE archived = 0 AND t.account_id = ? AND t.id <= ?
");
if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $account_id, $txid) && $stmt->execute())
return true;
return $this->sqlError();
}