Logo Search packages:      
Sourcecode: davical version File versions  Download package

CalDAVRequest::DoResponse ( status,
message = "",
content_type = "text/plain; charset=\"utf-8\"" 
)

Utility function we call when we have a simple status-based response to return to the client. Possibly

Parameters:
int$statusThe HTTP status code to send.
string$messageThe friendly text message to send with the response.

Definition at line 686 of file CalDAVRequest.php.

Referenced by CalDAVRequest(), FailIfLocked(), GetLockRow(), IsLocked(), and XMLResponse().

                                                                                             {
    global $session, $c;
    @header( sprintf("HTTP/1.1 %d %s", $status, getStatusMessage($status)) );
    @header( sprintf("X-DAViCal-Version: DAViCal/%d.%d.%d; DB/%d.%d.%d", $c->code_major, $c->code_minor, $c->code_patch, $c->schema_major, $c->schema_minor, $c->schema_patch) );
    @header( "Content-type: ".$content_type );
    echo $message;

    if ( strlen($message) > 100 || strstr($message, "\n") ) {
      $message = substr( preg_replace("#\s+#m", ' ', $message ), 0, 100) . (strlen($message) > 100 ? "..." : "");
    }

    dbg_error_log("caldav", "Status: %d, Message: %s, User: %d, Path: %s", $status, $message, $session->user_no, $this->path);

    exit(0);
  }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index