From e8369c91fc65af7320836f77fc3ebb55acc504e1 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 27 Oct 2007 00:29:59 +1300 Subject: [PATCH] Make the code work with or without upgrading the DB to 1.1.10. --- inc/caldav-PUT-functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 8a33f938..ebf9851a 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -90,6 +90,10 @@ function controlRequestContainer( $username, $user_no, $path, $caldav_context ) * @return boolean Return true if public events only are allowed. */ function public_events_only( $user_no, $dav_name ) { + global $c; + // Not supported until DB versions from 1.001.010 + if ( $c->schema_version < 1001.010 ) return false; + $sql = "SELECT public_events_only "; $sql .= "FROM collection "; $sql .= "WHERE user_no=? AND dav_name=?";