Also need to change collection_id...
[davical.git] / htdocs / tz.php
blob3ec5617113d9df690d0c9bc666e76bf2571bda2d
1 <?php
2 /**
3 * DAViCal Timezone Service handler
5 * @package davical
6 * @subpackage tzservice
7 * @author Andrew McMillan <andrew@morphoss.com>
8 * @copyright Morphoss Ltd
9 * @license http://gnu.org/copyleft/gpl.html GNU GPL v3 or later
11 require("./always.php");
12 require("PublicSession.php");
13 $session = new PublicSession();
15 param_to_global('action','{[a-z_-]+}');
16 param_to_global('format','{[a-z]+/[a-zA-Z0-9.+_-]+}');
17 param_to_global('changedsince','{.*}','changesince');
18 param_to_global('start');
19 param_to_global('end');
20 param_to_global('lang');
21 $returnall = isset($_GET['returnall']);
22 param_to_global('tzid');
24 require_once('CalDAVRequest.php');
25 $request = new CalDAVRequest();
27 $code_file = sprintf( 'tz/%s.php', $action );
28 if ( ! @include_once( $code_file ) ) {
29 $request->PreconditionFailed(400, "supported-action", 'The action "'.$action.'" is not understood.', 'urn:ietf:params:xml:ns:timezone-service' );
32 $request->DoResponse( 500, translate("The application failed to understand that request.") );