aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-11-09 12:37:31 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-11-09 12:37:31 -0200
commit3bae0572ed01c0dfc80a4d52e3eb05b766a73649 (patch)
tree10d6a2f902748d764d561f85ff783b057a0add79
parentfe5b071cf63d8adaacf6cfcde845588208482dba (diff)
downloadmuamba-3bae0572ed01c0dfc80a4d52e3eb05b766a73649.tar.gz
muamba-3bae0572ed01c0dfc80a4d52e3eb05b766a73649.tar.bz2
Additional check at muamba_reject_all()
-rw-r--r--muamba.business.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/muamba.business.inc b/muamba.business.inc
index f0a3e25..d041702 100644
--- a/muamba.business.inc
+++ b/muamba.business.inc
@@ -215,10 +215,11 @@ function muamba_accept($mid) {
* Reject all item requests.
*/
function muamba_reject_all($node) {
+ global $user;
$transactions = muamba_current_transactions($node);
foreach ($transactions as $transaction) {
- if ($transaction['status'] == MUAMBA_REQUESTED) {
+ if ($transaction['status'] == MUAMBA_REQUESTED && $transaction['owner'] == $user->uid) {
muamba_reject($transaction['mid']);
}
}