more spaced out priorities
This commit is contained in:
parent
e538181fa1
commit
e210fe739b
1 changed files with 2 additions and 1 deletions
|
@ -884,9 +884,10 @@ $_event_listeners = array();
|
|||
*/
|
||||
function add_event_listener(Extension $extension, $pos=50, $events=array()) {
|
||||
global $_event_listeners;
|
||||
$pos *= 100;
|
||||
foreach($events as $event) {
|
||||
while(isset($_event_listeners[$event][$pos])) {
|
||||
$pos++;
|
||||
$pos += 1;
|
||||
}
|
||||
$_event_listeners[$event][$pos] = $extension;
|
||||
}
|
||||
|
|
Reference in a new issue