Replace index.php with caldav.php when we find it in our path.

This commit is contained in:
Andrew McMillan 2010-11-30 09:52:33 +13:00
parent f492eabdd6
commit 04ecf36c88
2 changed files with 3 additions and 1 deletions

View File

@ -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)) );
}
/**

View File

@ -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;
}