$activities[] = "Added attachment {$_POST['attachment_description']}"; } } if(isset($_POST['right_user_id']) && $_POST['right_user_id'] > 0){ if(!$project->hasRights(PROJECT_RIGHT_FULL)){ fatal_error('Insufficent access rights to add users!'); } if($project->addUserRight($_POST['right_user_id'], $_POST['right_level']) === FALSE){ $error_msg .= "Error adding user access to project!\n"; debug_message($project->getLastError()); }else{ $activities[] = "Added user right level {$_POST['right_level']} to ".SI_User::getUserName($_POST['right_user_id']); } } if(isset($_POST['new_cc_id']) && $_POST['new_cc_id'] > 0){ if($project->addCC($_POST['new_cc_id']) === FALSE){ $error_msg .= "Error adding new CC to project!\n"; debug_message($project->getLastError()); }else{ $activities[] = "Added ".SI_User::getUserName($_POST['new_cc_id'])." to project CC list"; } } if($project->sendUpdateNotification($activities) === FALSE){ $error_msg .= "Error sending update notification!\n"; debug_message($project->getLastError()); } if(empty($error_msg) && $_POST['save'] == "Save"){ goBack(); }