diff options
-rw-r--r-- | muamba.business.inc | 12 | ||||
-rw-r--r-- | muamba.db.inc | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/muamba.business.inc b/muamba.business.inc index a295667..9aea8ee 100644 --- a/muamba.business.inc +++ b/muamba.business.inc @@ -447,8 +447,7 @@ function muamba_widget($node, $size = 'small') { */ function muamba_availability_info($nid) { global $user; - $available = muamba_check_availability($nid); - $node = node_load($nid); + $node = node_load($nid); if ($node->uid == $user->uid) { $transactions = muamba_current_transactions($nid); @@ -472,12 +471,11 @@ function muamba_availability_info($nid) { } else { $transaction = muamba_current_transactions($nid, $user->uid); + $available = muamba_check_availability($nid, $user->uid); if (!$available) { if (isset($transaction['uid']) && $transaction['uid'] == $user->uid) { - return t('You requested, status is @status', array( - '@status' => t(muamba_statuses($transaction['status'])), - )); + return t('You requested, but it is not available'); } else { return t('No'); @@ -485,7 +483,9 @@ function muamba_availability_info($nid) { } else { if (isset($transaction['uid']) && $transaction['uid'] == $user->uid) { - return t('Yes, you requested'); + return t('Yes, you requested, status is @status', array( + '@status' => t(muamba_statuses($transaction['status'])), + )); } else { return t('Yes'); diff --git a/muamba.db.inc b/muamba.db.inc index 1c1894e..e24492b 100644 --- a/muamba.db.inc +++ b/muamba.db.inc @@ -199,7 +199,7 @@ function muamba_check_availability($data, $uid = NULL) { if (empty($current)) { return TRUE; } - elseif ($uid !== NULL && $current['uid'] == $user->uid) { + elseif ($uid !== NULL && $current[0]->uid == $user->uid) { return TRUE; } |