[dokuwiki] Event when a wiki page is deleted?

  • From: "Gabriel Birke" <Gabriel.Birke@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 18 Dec 2007 15:15:41 +0100

Hello, 

The events list at 
http://wiki.splitbrain.org/wiki:events_list#io_wikipage_write

says that page deletion can be detected by checking for $event->data[0][1]
== ''.
But after looking at the code in saveWikiText and checking with an action
plugin, it seems that the documentation contradicts the reality: When the
page is deleted, the event is only fired once when the current page is moved
to the attic and not when the page is deleted.

I need to check for page deletion in an action plugin, so I would propose
one of two code changes:

1) Wrap the @unlink call in saveWikiText in a IO_WIKIPAGE_WRITE event so the
documentation is correct.
2) Create the new IO_WIKIPAGE_DELETE event instead of using
IO_WIKIPAGE_WRITE.

I will supply patches for one of the variants (and documentation for the
IO_WIKIPAGE_DELETE event), I only need to know which event I should
implement.

Greetings,

Gabriel

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts:

  • » [dokuwiki] Event when a wiki page is deleted?