$GO_SECURITY->delete_acl($acl_write); $feedback = '<p class="Error">' . $strSaveError . '</p>'; } else { if ($_POST['contact_id'] > 0) { $addressbook = $ab->get_contact($_POST['contact_id']); $GO_SECURITY->copy_acl($addressbook['acl_read'], $acl_read); $GO_SECURITY->copy_acl($addressbook['acl_write'], $acl_write); } elseif ($_POST['project_id'] > 0) { $projects = new projects(); $project = $projects->get_project($_POST['project_id']); $GO_SECURITY->copy_acl($project['acl_read'], $acl_read); $GO_SECURITY->copy_acl($project['acl_write'], $acl_write); } elseif ($_POST['file_path'] != '') { require_once $GO_CONFIG->class_path . 'filesystem.class.inc'; $fs = new filesystem(); if ($share = $fs->find_share($_POST['file_path'])) { $GO_SECURITY->copy_acl($share['acl_read'], $acl_read); $GO_SECURITY->copy_acl($share['acl_write'], $acl_write); } $GO_SECURITY->add_user_to_acl($GO_SECURITY->user_id, $acl_write); } else { $GO_SECURITY->add_user_to_acl($GO_SECURITY->user_id, $acl_write); } if ($_POST['responsible_user_id'] > 0 && (!$GO_SECURITY->user_in_acl($_POST['responsible_user_id'], $acl_read) && !$GO_SECURITY->user_in_acl($_POST['responsible_user_id'], $acl_write))) { $GO_SECURITY->add_user_to_acl($_POST['responsible_user_id'], $acl_write); } if ($_POST['close'] == 'true') { header('Location: ' . $return_to); exit; } }