From d87748811e664dbff456fdc05f41fe25fabf64a7 Mon Sep 17 00:00:00 2001 From: Daniel Camargo Date: Wed, 16 Apr 2014 13:37:44 -0300 Subject: [PATCH] cbtn.io says "You rejected" before you click accept (or reject), but it shouldn't say that #2939 Open --- include/library/Crunchbutton/Order.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/library/Crunchbutton/Order.php b/include/library/Crunchbutton/Order.php index 24caaaa2c..409392fdf 100644 --- a/include/library/Crunchbutton/Order.php +++ b/include/library/Crunchbutton/Order.php @@ -2051,6 +2051,7 @@ class Crunchbutton_Order extends Cana_Table { public function deliveryReply($admin) { $act = false; + foreach ($this->_actions as $action) { if ($action->id_admin && $admin->id_admin) { switch ($action->type) { @@ -2070,7 +2071,10 @@ class Crunchbutton_Order extends Cana_Table { break; case 'delivery-rejected': - $act = 'rejected'; + + if ( $action->id_admin == $admin->id_admin ) { + $act = 'rejected'; + } continue; break; }