ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
webdav.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
11
// Initialize
12
// -----------------------------------------------------
13
// Retrieve the client id from PATH_INFO
14
// Component 1 contains the ILIAS client_id.
15
require_once(
"Services/Init/classes/class.ilInitialisation.php"
);
16
$path_info_components
= explode(
'/'
,
$_SERVER
[
'PATH_INFO'
]);
17
$client_id
=
$path_info_components
[1];
18
$show_mount_instr
= isset(
$_GET
[
'mount-instructions'
]);
19
20
try
{
21
// Set context for authentication
22
ilAuthFactory::setContext
(
ilAuthFactory::CONTEXT_HTTP
);
23
24
// Launch ILIAS using the client id we have determined
25
$_GET
[
"client_id"
] =
$client_id
;
26
$context
=
ilContext::CONTEXT_WEBDAV
;
27
ilContext::init
(
$context
);
28
ilInitialisation::initILIAS
();
29
}
catch
(
InvalidArgumentException
$e
) {
30
header(
"HTTP/1.1 400 Bad Request"
);
31
header(
"X-WebDAV-Status: 400 Bad Request"
,
true
);
32
echo
'<?xml version="1.0" encoding="utf-8"?>
33
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
34
<s:sabredav-version>3.2.2</s:sabredav-version>
35
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
36
<s:message/>
37
</d:error>'
;
38
exit
;
39
}
40
41
if
(!
ilDAVActivationChecker::_isActive
()) {
42
header(
"HTTP/1.1 403 Forbidden"
);
43
header(
"X-WebDAV-Status: 403 Forbidden"
,
true
);
44
echo
'<html><body><h1>Sorry</h1>'
.
45
'<p><b>Please enable the WebDAV plugin in the ILIAS Administration panel.</b></p>'
.
46
'<p>You can only access this page, if WebDAV is enabled on this server.</p>'
.
47
'</body></html>'
;
48
exit
;
49
}
50
51
if
(
$show_mount_instr
) {
52
// Show mount instructions page for WebDAV
53
$f
=
new
ilWebDAVMountInstructionsFactory
(
54
new
ilWebDAVMountInstructionsRepositoryImpl
(
$DIC
->database()),
55
$DIC
->http()->request(),
56
$DIC
->user()
57
);
58
$mount_instructions =
$f
->getMountInstructionsObject();
59
60
$mount_gui =
new
ilWebDAVMountInstructionsGUI
($mount_instructions);
61
$mount_gui->renderMountInstructionsContent();
62
}
else
{
63
// Launch the WebDAV Server
64
$server
=
ilWebDAVRequestHandler::getInstance
();
65
$server
->handleRequest();
66
}
$_GET
$_GET["client_id"]
Definition:
webdav.php:25
exit
exit
Definition:
login.php:29
$context
$context
Definition:
webdav.php:26
ilAuthFactory\CONTEXT_HTTP
const CONTEXT_HTTP
Definition:
class.ilAuthFactory.php:29
ilContext\CONTEXT_WEBDAV
const CONTEXT_WEBDAV
Definition:
class.ilContext.php:25
Vendor\Package\$e
$e
Definition:
example_cleaned.php:31
$path_info_components
$path_info_components
Definition:
webdav.php:16
ilDAVActivationChecker\_isActive
static _isActive()
Static getter.
Definition:
class.ilDAVActivationChecker.php:17
$show_mount_instr
$show_mount_instr
Definition:
webdav.php:18
$client_id
$client_id
Definition:
webdav.php:17
ilInitialisation\initILIAS
static initILIAS()
ilias initialisation
Definition:
class.ilInitialisation.php:1158
ilWebDAVMountInstructionsRepositoryImpl
Definition:
class.ilWebDAVMountInstructionsRepositoryImpl.php:4
Vendor\Package\$f
$f
Definition:
example_cleaned.php:31
$_SERVER
$_SERVER['HTTP_HOST']
Definition:
raiseError.php:10
$DIC
global $DIC
Definition:
goto.php:24
ilAuthFactory\setContext
static setContext($a_context)
set context
Definition:
class.ilAuthFactory.php:90
ilWebDAVMountInstructionsGUI
Class ilWebDAVMountInstructionsGUI.
Definition:
class.ilWebDAVMountInstructionsGUI.php:11
ilContext\init
static init($a_type)
Init context by type.
Definition:
class.ilContext.php:45
$server
$server
Definition:
dummy_client.php:12
ilWebDAVMountInstructionsFactory
Class ilWebDAVMountInstructionsfactory.
Definition:
class.ilWebDAVMountInstructionsFactory.php:9
InvalidArgumentException
ilWebDAVRequestHandler\getInstance
static getInstance()
Definition:
class.ilWebDAVRequestHandler.php:18
webdav.php
Generated on Sat Apr 5 2025 21:01:49 for ILIAS by
1.8.13 (using
Doxyfile
)