23 require_once
"Services/WebDAV/classes/Tools/_parse_propfind.php";
24 require_once
"Services/WebDAV/classes/Tools/_parse_proppatch.php";
25 require_once
"Services/WebDAV/classes/Tools/_parse_lockinfo.php";
129 $uri = (@$_SERVER[
"HTTPS"] ===
"on" ?
"https:" :
"http:");
130 $uri.=
"//$_SERVER[HTTP_HOST]$_SERVER[SCRIPT_NAME]";
132 $this->base_uri =
$uri;
133 $this->uri =
$uri . $_SERVER[PATH_INFO];
136 if (empty($this->dav_powered_by)) {
137 header(
"X-Dav-Powered-By: PHP class: ".get_class($this));
139 header(
"X-Dav-Powered-By: ".$this->dav_powered_by );
142 $this->
writelog(__METHOD__.
': Using uri: '.$this->uri);
150 header(
'WWW-Authenticate: Basic realm="'.($this->http_auth_realm).
'"');
155 $this->
writelog(
'Check auth failed');
162 $this->
writelog(__METHOD__.
': Precondition failed.');
168 $this->path = $this->
_urldecode($_SERVER[
"PATH_INFO"]);
169 if (!strlen($this->path)) {
170 header(
"Location: ".$this->base_uri.
"/");
171 $this->
writelog(
'HTTP_WebDAV_Server.ServeRequest() missing path info');
184 $method = strtolower($_SERVER[
"REQUEST_METHOD"]);
185 $wrapper =
"http_".$method;
187 $this->
writelog(__METHOD__.
': Using request method: '.$method);
190 if ($method ==
"head" && !method_exists($this,
"head"))
193 $this->
writelog(__METHOD__.
': Using head emulation by get.');
196 if (method_exists($this, $wrapper) && ($method ==
"options" || method_exists($this, $method)))
198 $this->
writelog(__METHOD__.
': Calling wrapper: '.$wrapper);
203 if ($_SERVER[
"REQUEST_METHOD"] ==
"LOCK")
205 $this->
writelog(__METHOD__.
': Method not found/implemented. Sending 412');
210 $this->
writelog(__METHOD__.
': Method not found/implemented. Sending allowd methods');
212 header(
"Allow: ".join(
", ", $this->
_allow()));
482 header(
"MS-Author-Via: DAV");
489 if (isset($allow[
'LOCK'])) {
495 header(
"DAV: " .join(
"," , $dav));
496 header(
"Allow: ".join(
", ", $allow));
497 $this->
writelog(__METHOD__.
': dav='.var_export($dav,
true).
' allow='.var_export($allow,
true));
498 header(
"Content-length: 0");
518 if (isset($_SERVER[
'HTTP_DEPTH'])) {
519 $options[
"depth"] = $_SERVER[
"HTTP_DEPTH"];
521 $options[
"depth"] =
"infinity";
526 if (!$propinfo->success) {
530 $options[
'props'] = $propinfo->props;
534 if (!$this->propfind($options,
$files)) {
543 $ns_defs =
"xmlns:ns0=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\"";
549 if (!isset(
$file[
"props"]) || !is_array(
$file[
"props"])) {
554 foreach(
$file[
"props"] as $key => $prop) {
559 switch($options[
'props']) {
567 unset(
$files[
"files"][$filekey][
"props"][$key][
"val"]);
574 foreach((array)$options[
"props"] as $reqprop) {
575 if ( $reqprop[
"name"] == $prop[
"name"]
576 && $reqprop[
"xmlns"] == $prop[
"ns"]) {
584 $files[
"files"][$filekey][
"props"][$key]=
"";
591 if (empty($prop[
"ns"]))
continue;
593 if ($ns ==
"DAV:")
continue;
594 if (isset($ns_hash[$ns]))
continue;
597 $ns_name =
"ns".(count($ns_hash) + 1);
598 $ns_hash[$ns] = $ns_name;
599 $ns_defs .=
" xmlns:$ns_name=\"$ns\"";
604 if (is_array($options[
'props'])) {
605 foreach($options[
"props"] as $reqprop) {
606 if($reqprop[
'name']==
"")
continue;
611 foreach(
$file[
"props"] as $prop) {
612 if ( $reqprop[
"name"] == $prop[
"name"]
613 && $reqprop[
"xmlns"] == $prop[
"ns"]) {
620 if($reqprop[
"xmlns"]===
"DAV:" && $reqprop[
"name"]===
"lockdiscovery") {
622 $files[
"files"][$filekey][
"props"][]
628 $files[
"files"][$filekey][
"noprops"][] =
629 $this->
mkprop($reqprop[
"xmlns"], $reqprop[
"name"],
"");
632 if ($reqprop[
"xmlns"] !=
"DAV:" && !isset($ns_hash[$reqprop[
"xmlns"]])) {
633 $ns_name =
"ns".(count($ns_hash) + 1);
634 $ns_hash[$reqprop[
"xmlns"]] = $ns_name;
635 $ns_defs .=
" xmlns:$ns_name=\"$reqprop[xmlns]\"";
645 header(
'Content-Type: text/xml; charset="utf-8"');
648 echo
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
649 echo
"<D:multistatus xmlns:D=\"DAV:\">\n";
653 if(!is_array($file) || empty($file) || !isset($file[
"path"]))
continue;
654 $path = $file[
'path'];
657 echo
" <D:response $ns_defs>\n";
661 $href = $_SERVER[
'SCRIPT_NAME'] .
$path;
664 echo
" <D:href>$href</D:href>\n";
667 if (isset($file[
"props"]) && is_array($file[
"props"])) {
668 echo
" <D:propstat>\n";
671 foreach($file[
"props"] as $key => $prop) {
673 if (!is_array($prop))
continue;
674 if (!isset($prop[
"name"]))
continue;
675 if (!isset($prop[
"val"]) || $prop[
"val"] ===
"" || $prop[
"val"] ===
false) {
677 if($prop[
"ns"]==
"DAV:") {
678 echo
" <D:$prop[name]/>\n";
679 }
else if(!empty($prop[
"ns"])) {
680 echo
" <".$ns_hash[$prop[
"ns"]].
":$prop[name]/>\n";
682 echo
" <$prop[name] xmlns=\"\"/>";
684 }
else if ($prop[
"ns"] ==
"DAV:") {
686 switch ($prop[
"name"]) {
688 echo
" <D:creationdate ns0:dt=\"dateTime.tz\">"
690 . gmdate(
"Y-m-d\\TH:i:s\\Z",$prop[
'val'])
693 .
"</D:creationdate>\n";
695 case "getlastmodified":
696 echo
" <D:getlastmodified ns0:dt=\"dateTime.rfc1123\">"
697 . gmdate(
"D, d M Y H:i:s ", $prop[
'val'])
698 .
"GMT</D:getlastmodified>\n";
701 echo
" <D:resourcetype><D:$prop[val]/></D:resourcetype>\n";
703 case "supportedlock":
704 echo
" <D:supportedlock>$prop[val]</D:supportedlock>\n";
706 case "lockdiscovery":
707 echo
" <D:lockdiscovery>\n";
709 echo
" </D:lockdiscovery>\n";
712 echo
" <D:$prop[name]>"
714 .
"</D:$prop[name]>\n";
720 echo
" <" . $ns_hash[$prop[
"ns"]] .
":$prop[name]>"
722 .
"</" . $ns_hash[$prop[
"ns"]] .
":$prop[name]>\n";
724 echo
" <$prop[name] xmlns=\"\">"
726 .
"</$prop[name]>\n";
732 echo
" <D:status>HTTP/1.1 200 OK</D:status>\n";
733 echo
" </D:propstat>\n";
737 if (isset($file[
"noprops"])) {
738 echo
" <D:propstat>\n";
741 foreach($file[
"noprops"] as $key => $prop) {
742 if ($prop[
"ns"] ==
"DAV:") {
743 echo
" <D:$prop[name]/>\n";
744 }
else if ($prop[
"ns"] ==
"") {
745 echo
" <$prop[name] xmlns=\"\"/>\n";
747 echo
" <" . $ns_hash[$prop[
"ns"]] .
":$prop[name]/>\n";
752 echo
" <D:status>HTTP/1.1 404 Not Found</D:status>\n";
753 echo
" </D:propstat>\n";
756 echo
" </D:response>\n";
759 echo
"</D:multistatus>\n";
781 if (!$propinfo->success) {
786 $options[
'props'] = $propinfo->props;
788 $responsedescr = $this->proppatch($options);
791 header(
'Content-Type: text/xml; charset="utf-8"');
793 echo
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
795 echo
"<D:multistatus xmlns:D=\"DAV:\">\n";
796 echo
" <D:response>\n";
797 echo
" <D:href>".$this->_urlencode($_SERVER[
"SCRIPT_NAME"].$this->path).
"</D:href>\n";
799 foreach($options[
"props"] as $prop) {
800 echo
" <D:propstat>\n";
801 echo
" <D:prop><$prop[name] xmlns=\"$prop[ns]\"/></D:prop>\n";
802 echo
" <D:status>HTTP/1.1 $prop[status]</D:status>\n";
803 echo
" </D:propstat>\n";
806 if ($responsedescr) {
807 echo
" <D:responsedescription>".
809 "</D:responsedescription>\n";
812 echo
" </D:response>\n";
813 echo
"</D:multistatus>\n";
835 $stat = $this->mkcol($options);
859 if (
true === ($status = $this->
get($options))) {
860 if (!headers_sent()) {
863 if (!isset($options[
'mimetype'])) {
864 $options[
'mimetype'] =
"application/octet-stream";
866 header(
"Content-type: $options[mimetype]");
868 if (isset($options[
'mtime'])) {
869 header(
"Last-modified:".gmdate(
"D, d M Y H:i:s ", $options[
'mtime']).
"GMT");
872 if (isset($options[
'stream'])) {
874 if (!empty($options[
'ranges']) && (0===fseek($options[
'stream'], 0, SEEK_SET))) {
877 if (count($options[
'ranges']) === 1) {
878 $range = $options[
'ranges'][0];
880 if (isset($range[
'start'])) {
881 fseek($options[
'stream'], $range[
'start'], SEEK_SET);
882 if (feof($options[
'stream'])) {
883 $this->
http_status(
"416 Requested range not satisfiable");
887 if (isset($range[
'end'])) {
888 $size = $range[
'end']-$range[
'start']+1;
890 header(
"Content-length: $size");
891 header(
"Content-range: $range[start]-$range[end]/"
892 . (isset($options[
'size']) ? $options[
'size'] :
"*"));
893 while ($size && !feof($options[
'stream'])) {
894 $buffer = fread($options[
'stream'], 4096);
895 $size -= strlen($buffer);
900 if (isset($options[
'size'])) {
901 header(
"Content-length: ".($options[
'size'] - $range[
'start']));
902 header(
"Content-range: $start-$end/"
903 . (isset($options[
'size']) ? $options[
'size'] :
"*"));
905 fpassthru($options[
'stream']);
908 header(
"Content-length: ".$range[
'last']);
909 fseek($options[
'stream'], -$range[
'last'], SEEK_END);
910 fpassthru($options[
'stream']);
914 foreach ($options[
'ranges'] as $range) {
916 if (isset($range[
'start'])) {
917 $from = $range[
'start'];
918 $to = !empty($range[
'end']) ? $range[
'end'] : $options[
'size']-1;
920 $from = $options[
'size'] - $range[
'last']-1;
921 $to = $options[
'size'] -1;
923 $total = isset($options[
'size']) ? $options[
'size'] :
"*";
924 $size = $to - $from + 1;
928 fseek($options[
'stream'], $start, SEEK_SET);
929 while ($size && !feof($options[
'stream'])) {
930 $buffer = fread($options[
'stream'], 4096);
931 $size -= strlen($buffer);
939 if (isset($options[
'size'])) {
940 header(
"Content-length: ".$options[
'size']);
947 while (! feof($options[
'stream'])) {
948 $buffer = fread($options[
'stream'], 4096);
955 } elseif (isset($options[
'data'])) {
956 if (is_array($options[
'data'])) {
959 header(
"Content-length: ".strlen($options[
'data']));
960 echo $options[
'data'];
966 if (
false === $status) {
968 $status =
'404 Not Found';
973 if (!headers_sent()) {
989 if (isset($_SERVER[
'HTTP_RANGE'])) {
992 if (ereg(
"bytes[[:space:]]*=[[:space:]]*(.+)", $_SERVER[
'HTTP_RANGE'], $matches)) {
993 $options[
"ranges"] = array();
996 foreach (explode(
",", $matches[1]) as $range) {
998 list($start, $end) = explode(
"-", $range);
999 $options[
"ranges"][] = ($start===
"")
1000 ? array(
"last"=>$end)
1001 : array(
"start"=>$start,
"end"=>$end);
1022 if ($mimetype ===
false) {
1023 if (!isset($this->multipart_separator)) {
1028 $this->multipart_separator =
"SEPARATOR_".md5(microtime());
1031 header(
"Content-type: multipart/byteranges; boundary=".$this->multipart_separator);
1036 echo
"\n--{$this->multipart_separator}--";
1040 echo
"\n--{$this->multipart_separator}\n";
1041 echo
"Content-type: $mimetype\n";
1042 echo
"Content-range: $from-$to/". (
$total ===
false ?
"*" :
$total);
1065 if (method_exists($this,
"HEAD")) {
1066 $status = $this->head($options);
1067 }
else if (method_exists($this,
"GET")) {
1069 $status = $this->GET($options);
1073 if($status===
true) $status =
"200 OK";
1074 if($status===
false) $status =
"404 Not found";
1094 $options[
"content_length"] = $_SERVER[
"CONTENT_LENGTH"];
1097 if (isset($_SERVER[
"CONTENT_TYPE"])) {
1099 if (!strncmp($_SERVER[
"CONTENT_TYPE"],
"multipart/", 10)) {
1101 echo
"The service does not support mulipart PUT requests";
1104 $options[
"content_type"] = $_SERVER[
"CONTENT_TYPE"];
1107 $options[
"content_type"] =
"application/octet-stream";
1115 foreach ($_SERVER as $key => $val) {
1116 if (strncmp($key,
"HTTP_CONTENT", 11))
continue;
1118 case 'HTTP_CONTENT_ENCODING':
1121 echo
"The service does not support '$val' content encoding";
1124 case 'HTTP_CONTENT_LANGUAGE':
1127 $options[
"content_language"] = $value;
1130 case 'HTTP_CONTENT_LOCATION':
1136 case 'HTTP_CONTENT_RANGE':
1140 if (!preg_match(
'@bytes\s+(\d+)-(\d+)/((\d+)|\*)@', $value, $matches)) {
1142 echo
"The service does only support single byte ranges";
1146 $range = array(
"start"=>$matches[1],
"end"=>$matches[2]);
1147 if (is_numeric($matches[3])) {
1148 $range[
"total_length"] = $matches[3];
1150 $option[
"ranges"][] = $range;
1157 case 'HTTP_CONTENT_MD5':
1160 echo
"The service does not support content MD5 checksum verification";
1166 echo
"The service does not support '$key'";
1171 $options[
"stream"] = fopen(
"php://input",
"r");
1173 $stat = $this->PUT($options);
1175 if ($stat ==
false) {
1176 $stat =
"403 Forbidden";
1177 }
else if (is_resource($stat) && get_resource_type($stat) ==
"stream") {
1180 $stat = $options[
"new"] ?
"201 Created" :
"204 No Content";
1182 if (!empty($options[
"ranges"])) {
1184 if (0 == fseek($stream, $range[0][
"start"], SEEK_SET)) {
1185 $length = $range[0][
"end"]-$range[0][
"start"]+1;
1186 if (!fwrite($stream, fread($options[
"stream"], $length))) {
1187 $stat =
"403 Forbidden";
1190 $stat =
"403 Forbidden";
1193 while (!feof($options[
"stream"])) {
1195 if (
false === ($written = fwrite($stream, fread($options[
"stream"], 4096)))) {
1197 $stat =
"403 Forbidden";
1207 $this->PUTfinished($options);
1231 if (isset($_SERVER[
"HTTP_DEPTH"])) {
1232 if ($_SERVER[
"HTTP_DEPTH"] !=
"infinity") {
1244 $stat = $this->
delete($options);
1308 if (isset($_SERVER[
'HTTP_DEPTH'])) {
1309 $options[
"depth"] = $_SERVER[
"HTTP_DEPTH"];
1311 $options[
"depth"] =
"infinity";
1314 if (isset($_SERVER[
"HTTP_TIMEOUT"])) {
1315 $options[
"timeout"] = explode(
",", $_SERVER[
"HTTP_TIMEOUT"]);
1318 if(empty($_SERVER[
'CONTENT_LENGTH']) && !empty($_SERVER[
'HTTP_IF'])) {
1326 $options[
"update"] = substr($_SERVER[
'HTTP_IF'], 2, -2);
1327 $stat = $this->lock($options);
1331 if (!$lockinfo->success) {
1342 $options[
"scope"] = $lockinfo->lockscope;
1343 $options[
"type"] = $lockinfo->locktype;
1344 $options[
"owner"] = $lockinfo->owner;
1348 $stat = $this->lock($options);
1351 if(is_bool($stat)) {
1352 $http_stat = $stat ?
"200 OK" :
"423 Locked";
1359 if ($http_stat{0} == 2) {
1360 if($options[
"timeout"]) {
1363 if($options[
"timeout"]>1000000) {
1364 $timeout =
"Second-".($options[
'timeout']-time());
1366 $timeout =
"Second-$options[timeout]";
1369 $timeout =
"Infinite";
1389 header(
'Content-Type: text/xml; charset="utf-8"');
1390 header(
"Lock-Token: <$options[locktoken]>");
1391 echo
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
1392 echo
"<D:prop xmlns:D=\"DAV:\">\n";
1393 echo
" <D:lockdiscovery>\n";
1394 echo
" <D:activelock>\n";
1395 echo
" <D:lockscope><D:$options[scope]/></D:lockscope>\n";
1396 echo
" <D:locktype><D:$options[type]/></D:locktype>\n";
1397 echo
" <D:depth>$options[depth]</D:depth>\n";
1398 echo
" <D:owner>$options[owner]</D:owner>\n";
1399 echo
" <D:timeout>$timeout</D:timeout>\n";
1400 echo
" <D:locktoken><D:href>$options[locktoken]</D:href></D:locktoken>\n";
1401 echo
" </D:activelock>\n";
1402 echo
" </D:lockdiscovery>\n";
1403 echo
"</D:prop>\n\n";
1423 if (isset($_SERVER[
'HTTP_DEPTH'])) {
1424 $options[
"depth"] = $_SERVER[
"HTTP_DEPTH"];
1426 $options[
"depth"] =
"infinity";
1430 $options[
"token"] = substr(trim($_SERVER[
"HTTP_LOCK_TOKEN"]), 1, -1);
1433 $stat = $this->unlock($options);
1450 if (isset($_SERVER[
"HTTP_DEPTH"])) {
1451 $options[
"depth"] = $_SERVER[
"HTTP_DEPTH"];
1453 $options[
"depth"] =
"infinity";
1456 extract(parse_url($_SERVER[
"HTTP_DESTINATION"]));
1462 if (isset($port) && $port != 80)
1463 $http_host.=
":$port";
1465 list($http_header_host,$http_header_port) = explode(
":",$_SERVER[
"HTTP_HOST"]);
1466 if (isset($http_header_port) && $http_header_port != 80) {
1467 $http_header_host .=
":".$http_header_port;
1470 if ($http_host == $http_header_host &&
1471 !strncmp($_SERVER[
"SCRIPT_NAME"],
$path,
1472 strlen($_SERVER[
"SCRIPT_NAME"]))) {
1473 $options[
"dest"] = substr(
$path, strlen($_SERVER[
"SCRIPT_NAME"]));
1483 $options[
"dest_url"] = $_SERVER[
"HTTP_DESTINATION"];
1487 if (isset($_SERVER[
"HTTP_OVERWRITE"])) {
1488 $options[
"overwrite"] = $_SERVER[
"HTTP_OVERWRITE"] ==
"T";
1490 $options[
"overwrite"] =
true;
1493 $stat = $this->$what($options);
1510 $allow = array(
"OPTIONS" =>
"OPTIONS");
1515 foreach(get_class_methods($this) as $method) {
1516 if (!strncmp(
"http_", $method, 5)) {
1517 $method = strtoupper(substr($method, 5));
1518 if (method_exists($this, $method)) {
1519 $allow[$method] = $method;
1525 if (isset($allow[
"GET"]))
1526 $allow[
"HEAD"] =
"HEAD";
1529 if (!method_exists($this,
"checklock")) {
1530 unset($allow[
"LOCK"]);
1531 unset($allow[
"UNLOCK"]);
1549 $args = func_get_args();
1550 if (count($args) == 3) {
1551 return array(
"ns" => $args[0],
1555 return array(
"ns" =>
"DAV:",
1571 if (method_exists($this,
"checkAuth")) {
1573 return $this->checkAuth(@$_SERVER[
"AUTH_TYPE"],
1574 @$_SERVER[
"PHP_AUTH_USER"],
1575 @$_SERVER[
"PHP_AUTH_PW"]);
1576 }
else if (method_exists($this,
"check_auth")) {
1578 return $this->check_auth(@$_SERVER[
"AUTH_TYPE"],
1579 @$_SERVER[
"PHP_AUTH_USER"],
1580 @$_SERVER[
"PHP_AUTH_PW"]);
1600 if (function_exists(
"uuid_create")) {
1601 return uuid_create();
1605 $uuid = md5(microtime().getmypid());
1609 $n = 8 + (ord($uuid{16}) & 3);
1610 $hex =
"0123456789abcdef";
1611 $uuid{16} = $hex{$n};
1614 return substr($uuid, 0, 8).
"-"
1615 . substr($uuid, 8, 4).
"-"
1616 . substr($uuid, 12, 4).
"-"
1617 . substr($uuid, 16, 4).
"-"
1618 . substr($uuid, 20);
1629 return "opaquelocktoken:".$this->_new_uuid();
1646 while (ctype_space($string{
$pos})) {
1651 if (strlen($string) <=
$pos) {
1656 $c = $string{
$pos++};
1662 $pos2 = strpos($string,
">",
$pos);
1665 return array(
"URI",
$uri);
1669 if ($string{
$pos} ==
"W") {
1670 $type =
"ETAG_WEAK";
1673 $type =
"ETAG_STRONG";
1675 $pos2 = strpos($string,
"]",
$pos);
1676 $etag = substr($string,
$pos + 1, $pos2 -
$pos - 2);
1678 return array(
$type, $etag);
1683 return array(
"NOT",
"Not");
1687 return array(
"CHAR", $c);
1700 $len = strlen($str);
1705 while (
$pos < $len) {
1710 if ($token[0] ==
"URI") {
1718 if ($token[0] !=
"CHAR" || $token[1] !=
"(") {
1727 if ($token[0] ==
"NOT") {
1731 switch ($token[0]) {
1733 switch ($token[1]) {
1746 $list[] = $not.
"<$token[1]>";
1750 $list[] = $not.
"[W/'$token[1]']>";
1754 $list[] = $not.
"['$token[1]']>";
1763 if (@is_array($uris[
$uri])) {
1764 $uris[
$uri] = array_merge($uris[$uri],$list);
1766 $uris[
$uri] = $list;
1784 if (isset($_SERVER[
"HTTP_IF"])) {
1785 $this->_if_header_uris =
1788 foreach($this->_if_header_uris as
$uri => $conditions) {
1794 foreach($conditions as $condition) {
1798 if (!strncmp($condition,
"<opaquelocktoken:", strlen(
"<opaquelocktoken"))) {
1799 if (!ereg(
"^<opaquelocktoken:[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}>$", $condition)) {
1810 if ($state ==
true) {
1846 if (method_exists($this,
"checkLock")) {
1848 $lock = $this->checkLock(
$path);
1851 if (is_array($lock) && count($lock)) {
1853 if (!strstr($_SERVER[
"HTTP_IF"], $lock[
"token"])) {
1854 if (!$exclusive_only || ($lock[
"scope"] !==
"shared"))
1875 if (!method_exists($this,
"checklock")) {
1883 $lock = $this->checklock(
$path);
1886 if (is_array($lock) && count($lock)) {
1888 if (!empty($lock[
"expires"])) {
1889 $timeout =
"Second-".($lock[
"expires"] - time());
1890 }
else if (!empty($lock[
"timeout"])) {
1891 $timeout =
"Second-$lock[timeout]";
1893 $timeout =
"Infinite";
1899 <D:lockscope><D:$lock[scope]/></D:lockscope>
1900 <D:locktype><D:$lock[type]/></D:locktype>
1901 <D:depth>$lock[depth]</D:depth>
1902 <D:owner>$lock[owner]</D:owner>
1903 <D:timeout>$timeout</D:timeout>
1904 <D:locktoken><D:href>$lock[token]</D:href></D:locktoken>
1911 return $activelocks;
1923 if($status ===
true) {
1929 $this->_http_status = $status;
1932 header(
"HTTP/1.1 $status");
1933 header(
"X-WebDAV-Status: $status",
true);
1947 return strtr($url, array(
" "=>
"%20",
1968 $result =& urldecode(str_replace(
'+',
'%2b',
$path));
1982 switch (strtolower($this->_prop_encoding)) {
1989 return utf8_encode($text);
2014 global
$log, $ilUser;
2018 .
' DAV Server.'.str_replace(
"\n",
";",$message)