mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Roughing out implementation of timezone server.
This commit is contained in:
1 parent
bc1e264c6b
commit
731677d623
5 files changed
+85
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* DAViCal Timezone Service handler
|
||||
*
|
||||
* @package davical
|
||||
* @subpackage caldav
|
||||
* @author Andrew McMillan <andrew@morphoss.com>
|
||||
* @copyright Morphoss Ltd
|
||||
* @license http://gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
require("./always.php");
|
||||
require("PublicSession.php");
|
||||
$session = new PublicSession();
|
||||
|
||||
param_to_global('action','{(capabilities|list|get|expand|update)}');
|
||||
param_to_global('format','{(text/calendar|application/calendar+xml)}');
|
||||
param_to_global('changesince');
|
||||
param_to_global('start');
|
||||
param_to_global('end');
|
||||
param_to_global('lang');
|
||||
$returnall = isset($_GET['returnall']);
|
||||
param_to_global('tzid');
|
||||
|
||||
$request = new CalDAVRequest();
|
||||
|
||||
$code_file = sprintf( 'tz/%s.php', $action );
|
||||
if ( ! @include_once( $code_file ) ) {
|
||||
$request->PreconditionFailed(400, "supported-action", 'The action "'+$_GET['action']+'" is not understood.' );
|
||||
}
|
||||
|
||||
$request->DoResponse( 500, translate("The application failed to understand that request.") );
|
||||
|
||||
@@ -20,6 +20,10 @@ switch ( $request->path ) {
|
||||
header('Location: ' . ConstructURL('/',true) );
|
||||
$request->DoResponse(301); // Moved permanently
|
||||
// does not return.
|
||||
case '/.well-known/timezone':
|
||||
header('Location: ' . ConstructURL('/tz.php',true) );
|
||||
$request->DoResponse(301); // Moved permanently
|
||||
// does not return.
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user