From: Silvio Rhatto Date: Wed, 9 Nov 2011 01:13:16 +0000 (-0200) Subject: Actiong handler should point to the current transaction X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=9b01ff78b704d3a6f922769fe1dc2f0cff58baa5;p=drupal%2Fmuamba.git Actiong handler should point to the current transaction --- 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));