diff --git a/core/event.class.php b/core/event.class.php index 351fa8a4..7135637a 100644 --- a/core/event.class.php +++ b/core/event.class.php @@ -4,5 +4,10 @@ * generic parent class */ class Event { + var $_live = true; + + public function veto() { + $this->_live = false; + } } ?> diff --git a/core/util.inc.php b/core/util.inc.php index 5fb34873..ab68df3f 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -330,6 +330,7 @@ function send_event($event) { ksort($my_event_listeners); foreach($my_event_listeners as $listener) { $listener->receive_event($event); + if(!$event->_live) break; } }