Example #1
0
<?php

define("STOP_STATISTICS", true);
define("STOP_WEBDAV", true);
define("NOT_CHECK_PERMISSIONS", true);
define('NO_AGENT_CHECK', true);
define("DisableEventsCheck", true);
if (isset($_REQUEST["help"]) && ($_REQUEST["help"] === "Y" || $_REQUEST["help"] === "y")) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/dav/help.php";
    die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
CModule::IncludeModule("dav");
CDav::Report("<<<<<<<<<<<<<< REQUEST >>>>>>>>>>>>>>>>", "\n" . print_r(array("REQUEST_METHOD" => $_SERVER["REQUEST_METHOD"], "REQUEST_URI" => $_SERVER["REQUEST_URI"], "PATH_INFO" => $_SERVER["PATH_INFO"], "HTTP_DEPTH" => $_SERVER["HTTP_DEPTH"], "AUTH_TYPE" => $_SERVER["AUTH_TYPE"], "PHP_AUTH_USER" => $_SERVER["PHP_AUTH_USER"]), true) . "\n", "UNDEFINED", true);
CDav::ProcessRequest();
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
Example #2
0
 public function GetRequestBody()
 {
     if ($this->rawRequestBody == null) {
         $this->rawRequestBody = file_get_contents('php://input');
         CDav::Report("<<<<<<<<<<<<<< REQUEST BODY >>>>>>>>>>>>>>>>", "\n" . $this->rawRequestBody . "\n", "UNDEFINED", true);
     }
     return $this->rawRequestBody;
 }
Example #3
0
 public function Delete($id, $siteId, $account, $arPath)
 {
     $calendarId = $this->GetCalendarId($siteId, $account, $arPath);
     if ($calendarId == null) {
         return '404 Not Found';
     }
     $request = $this->groupdav->GetRequest();
     $oldEvent = $this->GetEntry('DELETE', $id, $calendarId);
     if (!is_array($oldEvent)) {
         return $oldEvent;
     }
     CDav::Report("CDavCalendarHandler::Delete", "id", $id);
     return CCalendar::DeleteCalendarEvent($calendarId, $oldEvent["ID"], $request->GetPrincipal()->Id());
 }
Example #4
0
 public function Render()
 {
     $status = $this->httpStatus;
     if (strlen($status) <= 0) {
         $status = "200 OK";
     }
     static::sendStatus($status);
     foreach ($this->arHeaders as $header) {
         static::sendHeader($header);
     }
     static::sendStatus($status);
     if ($this->outputType == DAV_XML_OUTPUT && !empty($this->body)) {
         echo "<" . "?xml version=\"1.0\" encoding=\"utf-8\"?" . ">\n";
     }
     echo $this->body;
     CDav::Report("<<<<<<<<<<<<<< RESPONSE >>>>>>>>>>>>>>>>", "\nheaders:\n" . print_r(headers_list(), true) . "\noutput:\n" . $this->body . "\n", "UNDEFINED", true);
 }