function to clear event listeners

This commit is contained in:
Shish 2019-07-19 10:25:07 +01:00
parent eb3cc73bce
commit a0b1c82d0d
2 changed files with 8 additions and 3 deletions

View file

@ -23,6 +23,13 @@ function _load_event_listeners(): void
}
}
function _clear_cached_event_listeners(): void
{
if (file_exists(data_path("cache/shm_event_listeners.php"))) {
unlink(data_path("cache/shm_event_listeners.php"));
}
}
function _set_event_listeners(): void
{
global $_shm_event_listeners;

View file

@ -224,8 +224,6 @@ class ExtManager extends Extension
// when the list of active extensions changes, we can be
// pretty sure that the list of who reacts to what will
// change too
if (file_exists("data/cache/event_listeners.php")) {
unlink("data/cache/event_listeners.php");
}
_clear_cached_event_listeners();
}
}