From 9b01ff78b704d3a6f922769fe1dc2f0cff58baa5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 8 Nov 2011 23:13:16 -0200 Subject: Actiong handler should point to the current transaction --- muamba.handlers.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.3