diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-06-17 18:53:37 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-06-17 18:53:37 -0400 |
commit | 242ea5fa2b1ac775b74cf118a8b81d79e531104a (patch) | |
tree | 8862a9f5b7cc083dda00cb55ecf768dd72e94d33 /engine/lib/system_log.php | |
parent | bc92d109140453b216c412d1176bd37dd5b8943a (diff) | |
download | elgg-242ea5fa2b1ac775b74cf118a8b81d79e531104a.tar.gz elgg-242ea5fa2b1ac775b74cf118a8b81d79e531104a.tar.bz2 |
Fixes #4487 turned off logging for sites that haven't been upgraded with ip address column
Diffstat (limited to 'engine/lib/system_log.php')
-rw-r--r-- | engine/lib/system_log.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php index 28d90be56..53fa24557 100644 --- a/engine/lib/system_log.php +++ b/engine/lib/system_log.php @@ -156,9 +156,8 @@ function get_object_from_log_entry($entry_id) { * This is called by the event system and should not be called directly. * * @param object $object The object you're talking about. - * @param string $event String The event being logged - * - * @return mixed + * @param string $event The event being logged + * @return void */ function system_log($object, $event) { global $CONFIG; @@ -166,6 +165,12 @@ function system_log($object, $event) { static $cache_size = 0; if ($object instanceof Loggable) { + + if (datalist_get('version') < 2012012000) { + // this is a site that doesn't have the ip_address column yet + return; + } + // reset cache if it has grown too large if (!is_array($log_cache) || $cache_size > 500) { $log_cache = array(); @@ -213,8 +218,6 @@ function system_log($object, $event) { $log_cache[$time][$object_id][$event] = true; $cache_size += 1; } - - return true; } } |