From cc0bd18c4ffb08cb15e55fb787ba5b7be3ce4754 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 3 Jan 2009 13:06:36 -0800 Subject: [PATCH] tidying, moving to score --- core/event.class.php | 1 - core/util.inc.php | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/event.class.php b/core/event.class.php index 6c3cf409..49d26480 100644 --- a/core/event.class.php +++ b/core/event.class.php @@ -28,7 +28,6 @@ class InitExtEvent extends Event {} /* * PageRequestEvent: - * * User requests /view/42 -> an event is generated with $args = array("view", * "42"); when an event handler asks $event->page_matches("view"), it returns * true and ignores the matched part, such that $event->count_args() = 1 and diff --git a/core/util.inc.php b/core/util.inc.php index 98d8bf1e..d526fd04 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -496,7 +496,7 @@ function weighted_random($weights) { $_event_listeners = array(); -function add_event_listener($extension, $pos=50) { +function add_event_listener(Extension $extension, $pos=50) { global $_event_listeners; while(isset($_event_listeners[$pos])) { $pos++; @@ -505,7 +505,7 @@ function add_event_listener($extension, $pos=50) { } $_event_count = 0; -function send_event($event) { +function send_event(Event $event) { global $_event_listeners, $_event_count; $my_event_listeners = $_event_listeners; // http://bugs.php.net/bug.php?id=35106 ksort($my_event_listeners); @@ -560,7 +560,6 @@ function _get_user($config, $database) { if(!is_null($tmp_user)) { $user = $tmp_user; } - } if(is_null($user)) { $user = User::by_id($config, $database, $config->get_int("anon_id", 0));