ILIAS  release_8 Revision v8.24
webdav.php
Go to the documentation of this file.
1<?php declare(strict_types = 1);
2
19require_once("Services/Init/classes/class.ilInitialisation.php");
20
21$path_info_components = explode('/', $_SERVER['PATH_INFO']);
23$show_mount_instr = isset($_GET['mount-instructions']);
24
25try {
27
28 $_GET["client_id"] = $client_id;
31 $post_array = $_POST;
33} catch (InvalidArgumentException $e) {
34 header("HTTP/1.1 400 Bad Request");
35 header("X-WebDAV-Status: 400 Bad Request", true);
36 echo '<?xml version="1.0" encoding="utf-8"?>
37 <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
38 <s:sabredav-version>3.2.2</s:sabredav-version>
39 <s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
40 <s:message/>
41 </d:error>';
42 exit;
43}
44
46 header("HTTP/1.1 403 Forbidden");
47 header("X-WebDAV-Status: 403 Forbidden", true);
48 echo '<html><body><h1>Sorry</h1>' .
49 '<p><b>Please enable WebDAV in the ILIAS Administration panel.</b></p>' .
50 '<p>You can only access this page, if WebDAV is enabled on this server.</p>' .
51 '</body></html>';
52 exit;
53}
54
56$webdav_dic->init($DIC);
57
59 $mount_gui = $webdav_dic->mountinstructions();
60 $mount_gui->renderMountInstructionsContent();
61} else {
63 $server->handleRequest($post_array);
64}
static setContext(int $a_context)
set context
const CONTEXT_HTTP
HTTP Auth used for WebDAV and CalDAV If a special handling for WebDAV or CalDAV is required overwrite...
const CONTEXT_WEBDAV
static init(string $a_type)
Init context by type.
static initILIAS()
ilias initialisation
$server
global $DIC
Definition: feed.php:28
exit
Definition: login.php:28
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
$_GET["client_id"]
Definition: webdav.php:28
$client_id
Definition: webdav.php:22
$show_mount_instr
Definition: webdav.php:23
catch(InvalidArgumentException $e) if(!ilDAVActivationChecker::_isActive()) $webdav_dic
Definition: webdav.php:55
$path_info_components
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: webdav.php:21
$context
Definition: webdav.php:29
$post_array
Definition: webdav.php:31