Exemplo n.º 1
0
	}
	if($task_activity->isBilled() || $task_activity->isPaid()){
		fatal_error("Can not delete a task that is attached to an invoice or a check!");	
	}
	if($task->get($task_activity->task_id) === FALSE){
		fatal_error("Could not retreive task!");
		debug_message($task->getLastError());
	}
	if($project->get($task->project_id) === FALSE){
		fatal_error("Could not retreive project!");
		debug_message($project->getLastError());
	}
	if(!$project->hasRights(PROJECT_RIGHT_FULL)){
		fatal_error('Insufficent access rights for this project!');
	}else{
		if($task_activity->delete($_REQUEST['id'])){
			if($project->sendUpdateNotification(array("Deleted task activity ID ".$_REQUEST['id'])) === FALSE){
				$error_msg .= "Error sending update notification!\n";
				debug_message($project->getLastError());
			}else{
				goBack();
			}
		}else{
			fatal_error("Error deleting Task Activity!\n");
			debug_message($task_activity->getLastError());
		}
	}
}else{
	fatal_error("Error Invalid mode!\n");
}