*/ $process_file = $this_upload->upload_add_to_database($add_arguments); if ($process_file['database'] == true) { $add_arguments['new_file_id'] = $process_file['new_file_id']; $add_arguments['all_users'] = $users; $add_arguments['all_groups'] = $groups; if ($current_level != 0) { /** * 2- Add the assignments to the database */ $process_assignment = $this_upload->upload_add_assignment($add_arguments); /** * 3- Hide for everyone if checked */ if (!empty($file['hideall'])) { $this_file = new FilesActions(); $hide_file = $this_file->hide_for_everyone($this_file_id); } /** * 4- Add the notifications to the database */ if ($send_notifications == true) { $process_notifications = $this_upload->upload_add_notifications($add_arguments); } } $new_log_action = new LogActions(); $log_action_args = array('action' => $action_log_number, 'owner_id' => $global_id, 'owner_user' => $global_user, 'affected_file' => $process_file['new_file_id'], 'affected_file_name' => $file['name']); $new_record_action = $new_log_action->log_action_save($log_action_args); $msg = __('The file has been edited succesfuly.', 'cftp_admin'); echo system_message('ok', $msg); include ROOT_DIR . '/upload-send-notifications.php';
*/ foreach ($selected_files as $work_file) { $this_file = new FilesActions(); $unassign_file = $this_file->unassign_file($work_file, $_POST['modify_type'], $_POST['modify_id']); } $msg = __('The selected files were unassigned from this client.', 'cftp_admin'); echo system_message('ok', $msg); if ($search_on == 'group_id') { $log_action_number = 11; } elseif ($search_on == 'client_id') { $log_action_number = 10; } break; case 'delete': foreach ($selected_files as $work_file) { $this_file = new FilesActions(); $delete_file = $this_file->delete_files($work_file); } $msg = __('The selected files were deleted.', 'cftp_admin'); echo system_message('ok', $msg); $log_action_number = 12; break; } /** Record the action log */ foreach ($all_files as $work_file_id => $work_file) { $new_log_action = new LogActions(); $log_action_args = array('action' => $log_action_number, 'owner_id' => $global_id, 'affected_file' => $work_file_id, 'affected_file_name' => $work_file); if (!empty($name_for_actions)) { $log_action_args['affected_account_name'] = $name_for_actions; $log_action_args['get_user_real_name'] = true; }