Ejemplo n.º 1
0
		if($project->sendUpdateNotification(array("Removed attachment ID ".$_REQUEST['attachment_id'])) === FALSE){
			$error_msg .= "Error sending update notification!\n";
			debug_message($project->getLastError());
		}
		$_REQUEST['mode'] = 'edit';
	}

}else if($_REQUEST['mode'] == 'delete_cc'){
	$title = "Delete CC";
	$project->get($_REQUEST['id']);

	//Make sure the user is allowed to delete
	if(!$project->hasRights(PROJECT_RIGHT_EDIT)){
		fatal_error('Insufficent access rights for this project!');
	}else{
		if($project->deleteCC($_REQUEST['cc_id']) === FALSE){
			$error_msg .= "Error deleting cc from project!\n";
			debug_message($project->getLastError());
		}
		if($project->sendUpdateNotification(array("Removed cc ID ".$_REQUEST['attachment_id'])) === FALSE){
			$error_msg .= "Error sending update notification!\n";
			debug_message($project->getLastError());
		}
		$_REQUEST['mode'] = 'edit';
	}

}else{
	$title = "Invalid Mode";
	$error_msg .= "Error: Invalid mode!\n";
}