[fix/acp-logs] Do not create duplicate acp logs and fix custom module logs
This commit is contained in:
@@ -263,9 +263,13 @@ class acp_portal
|
|||||||
|
|
||||||
$this->cache->destroy('portal_modules');
|
$this->cache->destroy('portal_modules');
|
||||||
$this->cache->destroy('sql', CONFIG_TABLE);
|
$this->cache->destroy('sql', CONFIG_TABLE);
|
||||||
|
|
||||||
if(isset($module_name))
|
if(isset($module_name))
|
||||||
{
|
{
|
||||||
add_log('admin', 'LOG_PORTAL_CONFIG', $module_name);
|
if ($module_data['module_classname'] !== 'custom')
|
||||||
|
{
|
||||||
|
add_log('admin', 'LOG_PORTAL_CONFIG', $module_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -169,7 +169,16 @@ class portal_custom_module
|
|||||||
$custom_permission = array_intersect($custom_permission, $groups_ary);
|
$custom_permission = array_intersect($custom_permission, $groups_ary);
|
||||||
$custom_permission = implode(',', $custom_permission);
|
$custom_permission = implode(',', $custom_permission);
|
||||||
|
|
||||||
add_log('admin', 'LOG_PORTAL_CONFIG', $user->lang['PORTAL_CUSTOM'] . ' - ' . $config['board3_custom_' . $module_id . '_title']);
|
if (isset($user->lang[$custom_title]))
|
||||||
|
{
|
||||||
|
$log_title = $user->lang[$custom_title];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$log_title = $custom_title;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_log('admin', 'LOG_PORTAL_CONFIG', $user->lang['PORTAL_CUSTOM'] . ': ' . $log_title);
|
||||||
|
|
||||||
// set_portal_config will take care of escaping the welcome message
|
// set_portal_config will take care of escaping the welcome message
|
||||||
set_portal_config('board3_custom_' . $module_id . '_code', $custom_code);
|
set_portal_config('board3_custom_' . $module_id . '_code', $custom_code);
|
||||||
|
|||||||
Reference in New Issue
Block a user