We should be getting the sync_changes data last.

This is so we get dav_name correct for delete actions, which
will otherwise be null since there is no caldav_data or
calendar_item record for them any longer.
This commit is contained in:
Andrew McMillan 2010-02-03 09:04:40 -08:00
parent 580d5312c3
commit 5fac9850db

View File

@ -53,7 +53,8 @@ EOSQL;
}
else {
$sql = <<<EOSQL
SELECT * FROM collection LEFT JOIN sync_changes USING(collection_id)
SELECT collection.*, caldav_data.*, calendar_item.*, sync_changes.*
FROM collection LEFT JOIN sync_changes USING(collection_id)
LEFT JOIN calendar_item USING (collection_id,dav_id)
LEFT JOIN caldav_data USING (collection_id,dav_id)
WHERE collection.collection_id = ?