From 3a4269136c8c381dd6b0095b58e11558e3633beb Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 17:01:10 +0200 Subject: [PATCH] Implement support for proposed tzid parameter on list requests. --- inc/tz/list.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/tz/list.php b/inc/tz/list.php index b3b4c399..74075c8f 100644 --- a/inc/tz/list.php +++ b/inc/tz/list.php @@ -33,6 +33,11 @@ if ( !empty($changedsince) ) { $where .= 'last_modified > :changedsince'; $params[':changedsince'] = $changedsince; } +if ( !empty($tzid) ) { + if ( !empty($where) ) $where .= ' AND '; + $where .= '(tzid = :tzid OR our_tzno IN (SELECT our_tzno FROM tz_aliases WHERE tzalias = :tzid))'; + $params[':tzid'] = $tzid; +} if ( !empty($where)) $sql .= ' WHERE '.$where; if ( !empty($c->strict_result_ordering) && $c->strict_result_ordering ) {