From 29cebb44f9a3bbd27aba6cbf9e6d9db4a9c1d9a9 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 30 Mar 2012 18:07:40 +0100 Subject: [PATCH] event_listeners is a bit of cached data --- core/util.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/util.inc.php b/core/util.inc.php index e749d0a3..2de968e1 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -1030,8 +1030,8 @@ function _load_extensions() { ctx_log_start("Loading extensions"); - if(COMPILE_ELS && file_exists("data/event_listeners.php")) { - require_once("data/event_listeners.php"); + if(COMPILE_ELS && file_exists("data/cache/event_listeners.php")) { + require_once("data/cache/event_listeners.php"); } else { foreach(get_declared_classes() as $class) { @@ -1075,7 +1075,10 @@ function _load_extensions() { $p .= ");\n"; $p .= "?".">"; - file_put_contents("data/event_listeners.php", $p); + if(!file_exists("data/cache")) { + mkdir("data/cache", 755, true); + } + file_put_contents("data/cache/event_listeners.php", $p); } }