diff options
author | Gabriel Birke <Gabriel.Birke@delti.com> | 2007-12-21 16:01:30 +0100 |
---|---|---|
committer | Gabriel Birke <Gabriel.Birke@delti.com> | 2007-12-21 16:01:30 +0100 |
commit | 307253286cdb2153607d0a29a9675f3bfc25a456 (patch) | |
tree | 8727dad806f32fba6c334a294cfd6b8108aa2cbe | |
parent | 03ff8795c5212cb5bb8ec4cb5d78c442e8750bd5 (diff) | |
download | rpg-307253286cdb2153607d0a29a9675f3bfc25a456.tar.gz rpg-307253286cdb2153607d0a29a9675f3bfc25a456.tar.bz2 |
Trigger IO_WIKIPAGE_WRITE on page delete
DokuWiki will fire two IO_WIKIPAGE_WRITE events
instead of one when a page is deleted. The first event has no revision and
empty text in the data. Now the code conforms with the documentation at
http://wiki.splitbrain.org/wiki:events_list#io_wikipage_write
Now action plugins can act on page delete.
darcs-hash:20071221150130-79ce3-51092d13c2e29285e5580f704f409f25563134c6.gz
-rw-r--r-- | inc/common.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php index ec500d906..866c64b8c 100644 --- a/inc/common.php +++ b/inc/common.php @@ -787,6 +787,9 @@ function saveWikiText($id,$text,$summary,$minor=false){ } if ($wasRemoved){ + // Send "update" event with empty data, so plugins can react to page deletion + $data = array(array($file, '', false), getNS($id), noNS($id), false); + trigger_event('IO_WIKIPAGE_WRITE', $data); // pre-save deleted revision @touch($file); clearstatcache(); |