aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muamba.handlers.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/muamba.handlers.inc b/muamba.handlers.inc
index 06c80b1..87286f3 100644
--- a/muamba.handlers.inc
+++ b/muamba.handlers.inc
@@ -76,7 +76,14 @@ class views_handler_field_muamba_actions extends views_handler_field {
global $user;
if (isset($values->mid)) {
- $transaction = muamba_get_transaction($values->mid);
+ // We should point to the current transaction.
+ $old = muamba_get_transaction($values->mid);
+ $node = $old['nid'];
+ $transaction = muamba_current_transactions($node, $user->uid);
+
+ if (empty($transaction)) {
+ return;
+ }
if ($transaction['owner'] == $user->uid) {
return theme('muamba_widget_owner', array('transaction' => $transaction));