]> gitweb.fluxo.info Git - drupal/muamba.git/commitdiff
TODO for new widget (see #34)
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Nov 2011 16:44:42 +0000 (14:44 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Nov 2011 16:44:42 +0000 (14:44 -0200)
muamba.db.inc
muamba.module

index 6aa4782e7c83c464f168738aedbb9eb3c059e86c..cc8760348d98bfeb9be2c0ede90e3f7cc0b27cf6 100644 (file)
@@ -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. 
index 7d83ef445b3d1a1de1d4fa5482ba6d945867d530..1e010dcb496d168d3b12ed1f6882ad2e504928f6 100644 (file)
@@ -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;
   }