From 04ecf36c884e5274be1258b7733b8f2efebea072 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 30 Nov 2010 09:52:33 +1300 Subject: [PATCH] Replace index.php with caldav.php when we find it in our path. --- htdocs/always.php | 3 ++- inc/always.php.in | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/always.php b/htdocs/always.php index 04558c35..584ad7b1 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -358,6 +358,7 @@ function ConstructURL( $partial_path, $force_script = false ) { $partial_path = str_replace( '%2F', '/', $partial_path); if ( ! isset($c->_url_script_path) ) { + $c->protocol_server_port_script = str_replace( 'index.php', 'caldav.php', $c->protocol_server_port_script); $c->_url_script_path = (preg_match('#/$#', $c->protocol_server_port_script) ? 'caldav.php' : ''); $c->_url_script_path = $c->protocol_server_port_script . $c->_url_script_path; } @@ -412,7 +413,7 @@ function DeconstructURL( $url, $force_script = false ) { */ function ISODateToHTTPDate( $isodate ) { // Use strtotime since strptime is not available on Windows platform. - return( gmstrftime('%a, %d %b %Y %T GMT', strtotime($isodate)) ); + return( gmstrftime('%a, %d %b %Y %H:%M:%S GMT', strtotime($isodate)) ); } /** diff --git a/inc/always.php.in b/inc/always.php.in index 1ba09166..be249150 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -358,6 +358,7 @@ function ConstructURL( $partial_path, $force_script = false ) { $partial_path = str_replace( '%2F', '/', $partial_path); if ( ! isset($c->_url_script_path) ) { + $c->protocol_server_port_script = str_replace( 'index.php', 'caldav.php', $c->protocol_server_port_script); $c->_url_script_path = (preg_match('#/$#', $c->protocol_server_port_script) ? 'caldav.php' : ''); $c->_url_script_path = $c->protocol_server_port_script . $c->_url_script_path; }