ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 #}
30 define ('WebDAV_Authentication', 'HTTP');
31 
32 // Set context for authentication
33 include_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 
40 include_once "Services/Context/classes/class.ilContext.php";
42 
43 require_once("Services/Init/classes/class.ilInitialisation.php");
45 
46 // Launch the WebDAV Server
47 // -----------------------------------------------------
48 include_once "Services/WebDAV/classes/class.ilDAVServer.php";
50 $server->ServeRequest();
51 // END WebDAV
52 ?>