tidying, moving to score

This commit is contained in:
Shish 2009-01-03 13:06:36 -08:00
parent bca8221609
commit cc0bd18c4f
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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));