From aa4c108fcf13c2f0c6c3548c66c514d75021527a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 28 Feb 2014 13:08:50 +0000 Subject: [PATCH] Set the ACL new entry row with common ACL of lrs --- mail/inc/class.mail_acl.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_acl.inc.php b/mail/inc/class.mail_acl.inc.php index 54fb9404f1..e2ec6af8f4 100644 --- a/mail/inc/class.mail_acl.inc.php +++ b/mail/inc/class.mail_acl.inc.php @@ -114,7 +114,12 @@ class mail_acl } //error_log(__METHOD__."() acl=".array2string($acl).' --> grid='.array2string($content['grid'])); } - array_push($content['grid'], array('acc_id'=>'')); + //Set the acl entry in the last row with lrs as default ACL + array_push($content['grid'], array( + 'acc_id'=>'', + 'acl_l' => true, + 'acl_r' => true, + 'acl_s' => true)); } else { @@ -200,7 +205,7 @@ class mail_acl unset($value['acl']); $options = array(); - foreach ($value as $key => $val) + foreach (array_keys($value) as $key) { if ($value[$key] == true) { @@ -262,7 +267,7 @@ class mail_acl function remove_acl($content, &$msg) { $row_num = array_keys($content['grid']['delete'],"pressed"); - $row_num = $row_num[0]; + if ($row_num) $row_num = $row_num[0]; $recursive = $content['grid'][$row_num]['acl_recursive']; $identifier = $content['grid'][$row_num]['acc_id'][0];