aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-26 15:02:20 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-26 15:02:20 -0300
commit22b2b4c6217577cb35c1913c3c2c560979e64236 (patch)
tree5d0d423f1be2ff437da2428ef0b34ce513930aa7
parent23b630b52dad2ffd700f72b2a76691d558244c25 (diff)
downloadmuamba-22b2b4c6217577cb35c1913c3c2c560979e64236.tar.gz
muamba-22b2b4c6217577cb35c1913c3c2c560979e64236.tar.bz2
Fixing muamba_get_transactions()
-rw-r--r--muamba.business.inc13
1 files changed, 9 insertions, 4 deletions
diff --git a/muamba.business.inc b/muamba.business.inc
index 3fcb76c..d9ed4d8 100644
--- a/muamba.business.inc
+++ b/muamba.business.inc
@@ -100,12 +100,14 @@ function muamba_get_transactions($uid, $type = 'sent', $status = MUAMBA_REQUESTE
if ($type == 'sent') {
$query
->condition('m.uid', $uid, '=')
- ->condition('m.status', $status, '=');
+ ->condition('m.status', $status, '=')
+ ->fields('m', array('mid', 'uid', 'owner', 'thread_id'));
}
else {
$query
->condition('m.owner', $uid, '=')
- ->condition('m.status', $status, '=');
+ ->condition('m.status', $status, '=')
+ ->fields('m', array('mid', 'uid', 'owner', 'thread_id'));
}
return $query->execute();
@@ -117,8 +119,11 @@ function muamba_get_transactions($uid, $type = 'sent', $status = MUAMBA_REQUESTE
function muamba() {
global $user;
- $transactions = muamba_get_transactions($user->uid);
- dpm($transactions);
+ $sent = muamba_get_transactions($user->uid);
+ $received = muamba_get_transactions($user->uid, 'received');
+
+ dpm($sent);
+ dpm($received);
return t('Muamba management page');
}