aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-11-08 23:13:16 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-11-08 23:13:16 -0200
commit9b01ff78b704d3a6f922769fe1dc2f0cff58baa5 (patch)
tree5f31854dbed257a9ecbf551dfdce550eaabf38f3
parent67f65f47ee78161f7b2539c0515abbf6b2bf0cea (diff)
downloadmuamba-9b01ff78b704d3a6f922769fe1dc2f0cff58baa5.tar.gz
muamba-9b01ff78b704d3a6f922769fe1dc2f0cff58baa5.tar.bz2
Actiong handler should point to the current transaction
-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));