diff --git a/core/event.class.php b/core/event.class.php index 7135637a..48a4f390 100644 --- a/core/event.class.php +++ b/core/event.class.php @@ -4,10 +4,12 @@ * generic parent class */ class Event { - var $_live = true; + var $vetoed = false; + var $veto_reason; - public function veto() { - $this->_live = false; + public function veto($reason="") { + $this->vetoed = true; + $this->veto_reason = $reason; } } ?> diff --git a/core/util.inc.php b/core/util.inc.php index ab68df3f..16a78ee2 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -330,7 +330,7 @@ function send_event($event) { ksort($my_event_listeners); foreach($my_event_listeners as $listener) { $listener->receive_event($event); - if(!$event->_live) break; + if($event->vetoed) break; } }