Make the code work with or without upgrading the DB to 1.1.10.

This commit is contained in:
Andrew McMillan 2007-10-27 00:29:59 +13:00
parent 04656674f7
commit e8369c91fc

View File

@ -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=?";