diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-11-06 14:44:42 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-11-06 14:44:42 -0200 |
commit | d60f3e3eb1563ec388b2c4ee15499627d8c0265a (patch) | |
tree | a8144a5f529cdbd7cbdcd9391c56c1494e1d0e8c | |
parent | 98c2bec78ec6bd0ddc96e6025db47410904ef785 (diff) | |
download | muamba-d60f3e3eb1563ec388b2c4ee15499627d8c0265a.tar.gz muamba-d60f3e3eb1563ec388b2c4ee15499627d8c0265a.tar.bz2 |
TODO for new widget (see #34)
-rw-r--r-- | muamba.db.inc | 2 | ||||
-rw-r--r-- | muamba.module | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/muamba.db.inc b/muamba.db.inc index 6aa4782..cc87603 100644 --- a/muamba.db.inc +++ b/muamba.db.inc @@ -116,7 +116,7 @@ function muamba_get_transaction($mid) { * * @param $uid * Optional requester user id. - * + * * @return * Data of the ongoing transactions. If $uid is specified, * then just one transaction is returned. diff --git a/muamba.module b/muamba.module index 7d83ef4..1e010dc 100644 --- a/muamba.module +++ b/muamba.module @@ -119,12 +119,17 @@ function muamba_node_view($node, $view_mode, $langcode) { } if ($view_mode == 'full') { - // @todo: there might be more than one transaction - $transaction = muamba_current_transactions($node, $user->uid); - $node->content['muamba'] = array( - '#markup' => theme('muamba_widget', array('node' => $node, 'transaction' => $transaction)), - '#weight' => 100, - ); + if ($node->uid != $user->uid) { + $transaction = muamba_current_transactions($node, $user->uid); + $node->content['muamba'] = array( + '#markup' => theme('muamba_widget', array('node' => $node, 'transaction' => $transaction)), + '#weight' => 100, + ); + } + else { + // @todo: muamba_widget is not working anymore for item owners, make a custom + // widget just for handling multiple requests, see #34 + } return $node; } |