Implement support for proposed tzid parameter on list requests.

This commit is contained in:
Andrew McMillan 2011-10-05 17:01:10 +02:00
parent 147abf71c6
commit 3a4269136c

View File

@ -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 ) {