ILIAS
trunk Revision v12.0_alpha-1227-g7ff6d300864
◀ ilDoc Overview
webdav.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
require_once __DIR__ .
'/../vendor/composer/vendor/autoload.php'
;
22
require_once(
"../artifacts/bootstrap_default.php"
);
23
24
$path_info_components
= explode(
'/'
, (
string
)
$_SERVER
[
'PATH_INFO'
]);
25
$client_id
=
$path_info_components
[1];
26
$show_mount_instr
= isset(
$_GET
[
'mount-instructions'
]);
27
28
try
{
29
ilAuthFactory::setContext
(
ilAuthFactory::CONTEXT_HTTP
);
30
$_GET
[
"client_id"
] =
$client_id
;
31
ilContext::init
(
ilContext::CONTEXT_WEBDAV
);
32
$post_array
=
$_POST
;
33
entry_point
(
"ILIAS Legacy Initialisation Adapter"
);
34
}
catch
(InvalidArgumentException) {
35
header
(
"HTTP/1.1 400 Bad Request"
);
36
header
(
"X-WebDAV-Status: 400 Bad Request"
,
true
);
37
echo
'<?xml version="1.0" encoding="utf-8"?>
38
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
39
<s:sabredav-version>3.2.2</s:sabredav-version>
40
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
41
<s:message/>
42
</d:error>'
;
43
exit
;
44
}
45
46
if
(!
ilDAVActivationChecker::_isActive
()) {
47
header
(
"HTTP/1.1 403 Forbidden"
);
48
header
(
"X-WebDAV-Status: 403 Forbidden"
,
true
);
49
echo
'<html><body><h1>Sorry</h1>'
.
50
'<p><b>Please enable the WebDAV plugin in the ILIAS Administration panel.</b></p>'
.
51
'<p>You can only access this page, if WebDAV is enabled on this server.</p>'
.
52
'</body></html>'
;
53
exit
;
54
}
55
56
$webdav_dic
=
new
ilWebDAVDIC
();
57
$webdav_dic
->init(
$DIC
);
58
59
if
(
$show_mount_instr
) {
60
$mount_gui =
$webdav_dic
->mountinstructions();
61
$mount_gui->renderMountInstructionsContent();
62
}
else
{
63
try
{
64
$server
=
new
ilWebDAVRequestHandler
(
$webdav_dic
);
65
$server
->handleRequest(
$post_array
);
66
}
catch
(Throwable
$e
) {
67
header
(
"HTTP/1.1 400 Bad Request"
);
68
header
(
"X-WebDAV-Status: 400 Bad Request"
,
true
);
69
echo
'<?xml version="1.0" encoding="utf-8"?>
70
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
71
<s:sabredav-version>3.2.2</s:sabredav-version>
72
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
73
<s:message>'
.
$e
->getMessage() .
'</s:message>
74
</d:error>'
;
75
exit
;
76
}
77
}
ilAuthFactory\CONTEXT_HTTP
const int CONTEXT_HTTP
HTTP Auth used for WebDAV and CalDAV If a special handling for WebDAV or CalDAV is required overwrite...
Definition:
class.ilAuthFactory.php:33
ilAuthFactory\setContext
static setContext(int $a_context)
Definition:
class.ilAuthFactory.php:62
ilContext\CONTEXT_WEBDAV
const CONTEXT_WEBDAV
Definition:
ilContext.php:36
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
ilContext.php:52
ilDAVActivationChecker\_isActive
static _isActive()
Definition:
class.ilDAVActivationChecker.php:27
ilWebDAVDIC
Definition:
class.ilWebDAVDIC.php:29
ilWebDAVRequestHandler
Definition:
class.ilWebDAVRequestHandler.php:28
exit
exit
Definition:
dummy_client.php:21
$_POST
$_POST['cmd']
Definition:
lti.php:27
ILIAS\UI\examples\Symbol\Glyph\Header\header
header()
Definition:
header.php:29
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
$_SERVER
$_SERVER['HTTP_HOST']
Definition:
raiseError.php:26
entry_point
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
result1.php:21
$DIC
global $DIC
Definition:
shib_login.php:26
$server
$server
Definition:
shib_login.php:28
$_GET
$_GET["client_id"]
Definition:
webdav.php:30
$client_id
$client_id
Definition:
webdav.php:25
$show_mount_instr
$show_mount_instr
Definition:
webdav.php:26
$webdav_dic
catch(InvalidArgumentException) if(!ilDAVActivationChecker::_isActive()) $webdav_dic
Definition:
webdav.php:56
$path_info_components
$path_info_components
Definition:
webdav.php:24
$post_array
$post_array
Definition:
webdav.php:32
components
ILIAS
WebDAV
resources
webdav.php
Generated on Wed Apr 8 2026 23:06:59 for ILIAS by
1.9.4 (using
Doxyfile
)