diff options
author | Andreas Gohr <andi@splitbrain.org> | 2018-06-15 17:35:53 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2019-04-20 21:48:53 +0200 |
commit | cbb44eabe033d70affb048ec0daf4e579e09dd20 (patch) | |
tree | 97a8a28e9cabd7aa4e54253487f071d87f840c87 /inc/common.php | |
parent | e1d9dcc8b460b6f029ac9c8d5d3b8d23b6e73402 (diff) | |
download | dokuwiki-cbb44eabe033d70affb048ec0daf4e579e09dd20.tar.gz dokuwiki-cbb44eabe033d70affb048ec0daf4e579e09dd20.zip |
deprecated trigger_event() in favor of a static method on Event
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php index a2ef313f9..94993629c 100644 --- a/inc/common.php +++ b/inc/common.php @@ -757,7 +757,7 @@ function checkwordblock($text = '') { $callback = function () { return true; }; - return trigger_event('COMMON_WORDBLOCK_BLOCKED', $data, $callback, true); + return Event::createAndTrigger('COMMON_WORDBLOCK_BLOCKED', $data, $callback, true); } } return false; @@ -1380,7 +1380,7 @@ function saveWikiText($id, $text, $summary, $minor = false) { if($svdta['changeType'] == DOKU_CHANGE_TYPE_DELETE) { // Send "update" event with empty data, so plugins can react to page deletion $data = array(array($svdta['file'], '', false), getNS($id), noNS($id), false); - trigger_event('IO_WIKIPAGE_WRITE', $data); + Event::createAndTrigger('IO_WIKIPAGE_WRITE', $data); // pre-save deleted revision @touch($svdta['file']); clearstatcache(); @@ -1478,7 +1478,7 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = if(!actionOK('subscribe')) return false; //subscribers enabled? if($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors $data = array('id' => $id, 'addresslist' => '', 'self' => false, 'replacements' => $replace); - trigger_event( + Event::createAndTrigger( 'COMMON_NOTIFY_ADDRESSLIST', $data, array(new Subscription(), 'notifyaddresses') ); |