On Fri, Jun 18, 2010 at 9:47 PM, Siegfried Gevatter
> I'd say: Call the hook before the deletion with the full event list
> (or event ids only, not sure *) and have them return true or false to
> indicate whether the event should be deleted or the operation aborted.
> This may serve to create an evil extension which won't let you delete
> anything? Well, yes, but why the hell would you install that
> extension? And if you do, it's your fault :P.
> (* Full events may be needed by some extension, but require us to do a
> query to fetch the event if there is at least on hook. To avoid that
> we could just send the event ids, but then there may be two extensions
> fetching the info by themselves so doing two queries. Not sure what is
> worse. I think I tend to 'only IDs' to KISS).
> delete_event_hook for extensions
> You received this bug notification because you are subscribed to The
> Zeitgeist Project.
> Status in Zeitgeist Framework: New
> Bug description:
> Right now zeitgeist extensions have no way of knowing when events are
> deleted. I propose adding a delete_event_hook() method on the Extension
> class that extensions can override. The delete_event_hook() method should
> take an event_id as its sole argument.
> I need this functionality in the FTS extension.
I don't know if I agree or disagree with Siggi on this one. I think the hook
should be after the event has been deleted. An extension should
not interfere with the process of deletion. But I do see a purpose of
hooking in before the event is deleted.
It is more interesting to know if the event has been successfully deleted
and THEN hooking in with the extension.
Maybe a possibility is to add to hooks delete_event_hook and
delete_event_hook for extensions
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
Status in Zeitgeist Framework: New
Right now zeitgeist extensions have no way of knowing when events are deleted.
I propose adding a delete_event_hook() method on the Extension class that
extensions can override. The delete_event_hook() method should take an event_id
as its sole argument.
I need this functionality in the FTS extension.
Mailing list: https://launchpad.net/~zeitgeist
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~zeitgeist
More help : https://help.launchpad.net/ListHelp