20dbg_error_log(
'DELTICKET',
'method handler');
21require_once(
'DAVResource.php');
23if ( ! $request->HavePrivilegeTo(
'DAV::unbind') && $request->ticket->owner() != $session->principal_id ) {
24 $request->NeedPrivilege(
'DAV::unbind');
27if ( ! isset($request->ticket) ) {
28 if ( isset($_GET[
'ticket']) || isset($_SERVER[
'HTTP_TICKET']) ) {
30 if ( ! $r->Exists() ) {
31 $request->PreconditionFailed(404,
'not-found');
34 $request->PreconditionFailed(412,
'ticket-does-not-exist',
'The specified ticket does not exist');
38 $request->MalformedRequest(
'No ticket specified');
41$qry =
new AwlQuery(
'DELETE FROM access_ticket WHERE ticket_id=:ticket_id', array(
':ticket_id' => $request->ticket->id() ) );
42if ( $qry->Exec(
'DELTICKET', __LINE__, __FILE__) ) {
43 $request->DoResponse( 204 );
45$request->DoResponse( 500 );