ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
webdav.php
Go to the documentation of this file.
1<?php
2
3// BEGIN WebDAV
4/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
5
15// Initialize
16// -----------------------------------------------------
17
18// Retrieve the client id from PATH_INFO
19// Component 1 contains the ILIAS client_id.
20$path_info_components = explode('/',$_SERVER['PATH_INFO']);
22
23// For all requests, except for GET-Requests for files, we enforce HTTP
24// authentication for the WebDAV protocol.
25#if ($_SERVER['REQUEST_METHOD'] != 'GET' ||
26# count($path_info_components) < 3 ||
27# substr($path_info_components[2],0,5) != 'file_') {
28# define ('WebDAV_Authentication', 'HTTP');
29#}
30define ('WebDAV_Authentication', 'HTTP');
31
32// Set context for authentication
33include_once 'Services/Authentication/classes/class.ilAuthFactory.php';
35
36// Launch ILIAS using the client id we have determined
37// -----------------------------------------------------
38$_COOKIE["ilClientId"] = $client_id;
39
40include_once "Services/Context/classes/class.ilContext.php";
42
43require_once("Services/Init/classes/class.ilInitialisation.php");
45
46// Launch the WebDAV Server
47// -----------------------------------------------------
48include_once "Services/WebDAV/classes/class.ilDAVServer.php";
50$server->ServeRequest();
51// END WebDAV
52?>
static setContext($a_context)
set context
const CONTEXT_WEBDAV
static init($a_type)
Init context by type.
static initILIAS()
ilias initialisation
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
$client_id
Definition: webdav.php:21
$_COOKIE["ilClientId"]
Definition: webdav.php:38
$path_info_components
Definition: webdav.php:20
$server
Definition: webdav.php:49