From a09bd1470ec11fd7b49a135a9e9a49318b1e8ea8 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 25 Jun 2013 11:39:44 +0200 Subject: [PATCH] Adding account name to all transactions Fixes #251 --- public/include/classes/transaction.class.php | 6 ++++-- public/templates/mmcFE/admin/transactions/default.tpl | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/include/classes/transaction.class.php b/public/include/classes/transaction.class.php index a9c665c6..a432b65b 100644 --- a/public/include/classes/transaction.class.php +++ b/public/include/classes/transaction.class.php @@ -95,7 +95,7 @@ class Transaction { b.height AS height, b.confirmations AS confirmations FROM transactions AS t - LEFT JOIN blocks AS b ON t.block_id = b.id + LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id WHERE t.account_id = ? ORDER BY id DESC"); if ($this->checkStmt($stmt)) { @@ -118,6 +118,7 @@ class Transaction { $stmt = $this->mysqli->prepare(" SELECT t.id AS id, + a.username as username, t.type AS type, t.amount AS amount, t.coin_address AS coin_address, @@ -125,7 +126,8 @@ class Transaction { b.height AS height, b.confirmations AS confirmations FROM transactions AS t - LEFT JOIN blocks AS b ON t.block_id = b.id + LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id + LEFT JOIN " . $this->user->getTableName() . " AS a ON t.account_id = a.id ORDER BY id DESC"); if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) return $result->fetch_all(MYSQLI_ASSOC); diff --git a/public/templates/mmcFE/admin/transactions/default.tpl b/public/templates/mmcFE/admin/transactions/default.tpl index c76e9fae..c6497246 100644 --- a/public/templates/mmcFE/admin/transactions/default.tpl +++ b/public/templates/mmcFE/admin/transactions/default.tpl @@ -6,6 +6,7 @@ TX # + Account Date TX Type Payment Address @@ -28,6 +29,7 @@ )} {$TRANSACTIONS[transaction].id} + {$TRANSACTIONS[transaction].username} {$TRANSACTIONS[transaction].timestamp} {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} @@ -52,6 +54,7 @@ TX # + Account Date TX Type Payment Address @@ -68,6 +71,7 @@ )} {$TRANSACTIONS[transaction].id} + {$TRANSACTIONS[transaction].username} {$TRANSACTIONS[transaction].timestamp} {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} @@ -97,6 +101,7 @@ TX # + Account Date TX Type Payment Address @@ -114,6 +119,7 @@ )} {$TRANSACTIONS[transaction].id} + {$TRANSACTIONS[transaction].username} {$TRANSACTIONS[transaction].timestamp} {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address}