More precise determination of when to back up the bookmarks
Instead of blindly assuming that any change to the bookmark table requires a
backup pass, we now attempt to discern whether the change is a user-visible
alteration of the bookmark set. We do this in the provider's hooks for
insert/delete/update operations.
Insert is easy; we simply check for bookmarks=1 in the field values of the row
being added, and request backup if it's there.
Delete and update operations are more problematic; we need to check whether the
record being acted on is part of the bookmark set. To do this unambiguously
requires querying the record's bookmark field, so we do that if it looks like
the operation might be one relevant to the bookmark backup [either deleting a
bookmark row, or changing the title/url of an existing bookmark, or changing
whether a given row represents a bookmark].
1 file changed