From cc134088fd1a544a922a1132817fea465a65d554 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 3 Oct 2012 16:25:24 -0500 Subject: [PATCH] Added system logs to platform language changes --- main/admin/sub_language.class.php | 1 + main/inc/lib/main_api.lib.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main/admin/sub_language.class.php b/main/admin/sub_language.class.php index e7f8d1f12b..9c93f1bb5e 100644 --- a/main/admin/sub_language.class.php +++ b/main/admin/sub_language.class.php @@ -282,6 +282,7 @@ class SubLanguageManager { $lang=Database::fetch_array($result); $sql_update_2 = "UPDATE ".$tbl_settings_current." SET selected_value='".$lang['english_name']."' WHERE variable='platformLanguage'"; $result_2 = Database::query($sql_update_2); + event_system(LOG_PLATFORM_LANGUAGE_CHANGE, LOG_PLATFORM_LANGUAGE, $lang['english_name']); return $result_2 !== false; } /** diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index 85f884e548..20b374a5af 100644 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -149,6 +149,7 @@ define('LOG_SESSION_DELETE', 'session_deleted'); define('LOG_SESSION_CATEGORY_CREATE', 'session_category_created'); define('LOG_SESSION_CATEGORY_DELETE', 'session_category_deleted'); define('LOG_CONFIGURATION_SETTINGS_CHANGE', 'settings_changed'); +define('LOG_PLATFORM_LANGUAGE_CHANGE', 'platform_language_changed'); define('LOG_SUBSCRIBE_USER_TO_COURSE', 'user_subscribed'); define('LOG_UNSUBSCRIBE_USER_FROM_COURSE', 'user_unsubscribed'); @@ -165,6 +166,7 @@ define('LOG_SESSION_ID', 'session_id'); define('LOG_SESSION_CATEGORY_ID', 'session_category_id'); define('LOG_CONFIGURATION_SETTINGS_CATEGORY', 'settings_category'); define('LOG_CONFIGURATION_SETTINGS_VARIABLE', 'settings_variable'); +define('LOG_PLATFORM_LANGUAGE', 'default_platform_language'); define('LOG_CAREER_ID', 'career_id'); define('LOG_PROMOTION_ID', 'promotion_id'); @@ -6074,4 +6076,4 @@ function api_set_default_visibility($item_id, $tool_id) { } api_item_property_update(api_get_course_info(), $original_tool_id, $item_id, $visibility, api_get_user_id(), api_get_group_id(), null, null, null, api_get_session_id()); } -} \ No newline at end of file +}