diff --git a/inc/caldav-MKCALENDAR.php b/inc/caldav-MKCALENDAR.php index 79273c5b..8c14274c 100644 --- a/inc/caldav-MKCALENDAR.php +++ b/inc/caldav-MKCALENDAR.php @@ -23,10 +23,10 @@ if ( preg_match( '#^(.*/)([^/]+)(/)?$#', $request->path, $matches ) ) { $sql = "SELECT * FROM collection WHERE user_no = ? AND dav_name = ?;"; $qry = new PgQuery( $sql, $request->user_no, $request->path ); if ( ! $qry->Exec("MKCALENDAR") ) { - $request->DoResponse( 500, "Error querying database." ); + $request->DoResponse( 500, translate("Error querying database.") ); } if ( $qry->rows != 0 ) { - $request->DoResponse( 412, "A collection already exists at that location." ); + $request->DoResponse( 412, translate("A collection already exists at that location.") ); } $sql = "INSERT INTO collection ( user_no, parent_container, dav_name, dav_etag, dav_displayname, is_calendar, created, modified ) VALUES( ?, ?, ?, ?, ?, ?, current_timestamp, current_timestamp );"; @@ -34,10 +34,10 @@ $qry = new PgQuery( $sql, $request->user_no, $parent_container, $request->path, if ( $qry->Exec("MKCALENDAR",__LINE__,__FILE__) ) { dbg_error_log( "MKCALENDAR", "New calendar '%s' created named '%s' for user '%d' in parent '%s'", $request->path, $displayname, $session->user_no, $parent_container); - $request->DoResponse( 200, "" ); + $request->DoResponse( 201, "" ); } else { - $request->DoResponse( 500, "Error writing calendar details to database." ); + $request->DoResponse( 500, translate("Error writing calendar details to database.") ); } /** diff --git a/testing/tests/regression-suite/016-Mulberry-MKCALENDAR-3.result b/testing/tests/regression-suite/016-Mulberry-MKCALENDAR-3.result index ae68b5a6..4e1eec04 100644 --- a/testing/tests/regression-suite/016-Mulberry-MKCALENDAR-3.result +++ b/testing/tests/regression-suite/016-Mulberry-MKCALENDAR-3.result @@ -1,6 +1,6 @@ -HTTP/1.1 200 Created +HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Server: Apache/2.2.3 (Debian) DAV/2 Content-Length: 0 -Content-Type: text/html; charset=UTF-8 +Content-Type: text/plain; charset=UTF-8