From 4aca3489d214ed64febdba1f32a062de7d2def4a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 27 Nov 2006 09:12:42 +1300 Subject: [PATCH] Fix another bug in OPTIONS. --- inc/caldav-OPTIONS.php | 4 ++-- testing/tests/regression-suite/101-Evo-OPTIONS-1.result | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/caldav-OPTIONS.php b/inc/caldav-OPTIONS.php index 5fe152a1..6fdda699 100644 --- a/inc/caldav-OPTIONS.php +++ b/inc/caldav-OPTIONS.php @@ -23,10 +23,10 @@ if ( $request->path == '/' ) { else { if ( preg_match( '#^/[^/]+/$#', $request->path) ) { $sql = "SELECT user_no, '/' || username || '/' AS dav_name, md5( '/' || username || '/') AS dav_etag, "; - $sql .= "updated AS created, fullname AS dav_displayname, FALSE AS is_calendar FROM usr WHERE user_no = $path_user_no ; "; + $sql .= "updated AS created, fullname AS dav_displayname, FALSE AS is_calendar FROM usr WHERE user_no = $request->user_no ; "; } else { - $sql = "SELECT user_no, dav_name, dav_etag, created, dav_displayname, is_calendar FROM collection WHERE user_no = $path_user_no AND dav_name = ".qpg($request->path); + $sql = "SELECT user_no, dav_name, dav_etag, created, dav_displayname, is_calendar FROM collection WHERE user_no = $request->user_no AND dav_name = ".qpg($request->path); } $qry = new PgQuery($sql ); if( $qry->Exec("OPTIONS",__LINE__,__FILE__) && $qry->rows > 0 && $collection = $qry->Fetch() ) { diff --git a/testing/tests/regression-suite/101-Evo-OPTIONS-1.result b/testing/tests/regression-suite/101-Evo-OPTIONS-1.result index 53fc8049..7ec32f38 100644 --- a/testing/tests/regression-suite/101-Evo-OPTIONS-1.result +++ b/testing/tests/regression-suite/101-Evo-OPTIONS-1.result @@ -1,8 +1,8 @@ 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 Allow: OPTIONS, GET, PUT, DELETE, PROPFIND, PROPPATCH, MKCOL, MKCALENDAR, REPORT DAV: 1, 2, access-control, calendar-access +Content-Length: 0 Content-Type: text/plain; charset=UTF-8