From 8ab5d8a404b79ea66c1e3268a0174f011d70f857 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 11 Mar 2010 13:53:27 +1300 Subject: [PATCH] Set expiry to null when we get told 'infinity' for the timeout. --- inc/caldav-MKTICKET.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/caldav-MKTICKET.php b/inc/caldav-MKTICKET.php index b25dd421..8e97ea9b 100644 --- a/inc/caldav-MKTICKET.php +++ b/inc/caldav-MKTICKET.php @@ -68,6 +68,9 @@ if ( preg_match( '{^([a-z]+)-(\d+)$}i', $ticket_timeout, $matches ) ) { /** It isn't specified, but timeout seems to be 'unit-number' like 'Seconds-3600', so we make it '3600 Seconds' which PostgreSQL understands */ $sql_timeout = $matches[2] . ' ' . $matches[1]; } +else if ( $ticket_timeout == 'infinity' ) { + $sql_timeout = null; +} else { $sql_timeout = $ticket_timeout; }