/** * While we can construct our SQL to apply some filters in the query, other filters * need to be checked against the retrieved record. This is for handling those ones. * * @param array $filter An array of XMLElement which is the filter definition * @param string $item The database row retrieved for this calendar item * * @return boolean True if the check succeeded, false otherwise. */ function apply_filter($filters, $item) { global $session, $c, $request; if (count($filters) == 0) { return true; } dbg_error_log("cardquery", "Applying filter for item '%s'", $item->dav_name); $vcard = new vComponent($item->caldav_data); return $vcard->TestFilter($filters); }