aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muamba.business.inc30
1 files changed, 11 insertions, 19 deletions
diff --git a/muamba.business.inc b/muamba.business.inc
index 59fa834..a295667 100644
--- a/muamba.business.inc
+++ b/muamba.business.inc
@@ -455,28 +455,20 @@ function muamba_availability_info($nid) {
$transaction = $transactions[0];
if (!empty($transaction)) {
- // If the first transaction in the array of active transactions
- // is a request, then the other ones will be as well.
- if ($transaction['status'] == MUAMBA_REQUESTED) {
- return t('Yes');
- }
- else {
- // Find the right requester
- foreach ($transactions as $transaction) {
- if ($transaction['status'] != MUAMBA_REQUESTED) {
- $requester = user_load($transaction['uid']);
-
- return t('No, @status to @user', array(
- '@status' => t(muamba_statuses($transaction['status'])),
- '@user' => $requester->name,
- ));
- }
+ // Find the right requester
+ foreach ($transactions as $transaction) {
+ if ($transaction['status'] != MUAMBA_REQUESTED) {
+ $requester = user_load($transaction['uid']);
+
+ return t('No, @status to @user', array(
+ '@status' => t(muamba_statuses($transaction['status'])),
+ '@user' => $requester->name,
+ ));
}
}
}
- else {
- return t('Yes');
- }
+
+ return t('Yes');
}
else {
$transaction = muamba_current_transactions($nid, $user->uid);