diff --git a/core/Controllers/StatusController.php b/core/Controllers/StatusController.php index 89e189b76e75eb78e2b83b6f55f7b5b2ae2870f6..abf1abfac11569c80d2a0a0910e4a8334d1f87c7 100755 --- a/core/Controllers/StatusController.php +++ b/core/Controllers/StatusController.php @@ -87,10 +87,10 @@ class StatusController $return['status'] = StatusModel::getById(['id' => $aArgs['id']])[0]; HistoryController::add([ - 'table_name' => 'status', - 'record_id' => $return['status']['id'], - 'event_type' => 'ADD', - 'event_id' => 'statusup', + 'tableName' => 'status', + 'recordId' => $return['status']['id'], + 'eventType' => 'ADD', + 'eventId' => 'statusup', 'info' => _STATUS_ADDED . ' : ' . $return['status']['id'] ]); @@ -120,10 +120,10 @@ class StatusController $return['status'] = StatusModel::getByIdentifier(['identifier' => $aArgs['identifier']])[0]; HistoryController::add([ - 'table_name' => 'status', - 'record_id' => $return['status']['id'], - 'event_type' => 'UP', - 'event_id' => 'statusup', + 'tableName' => 'status', + 'recordId' => $return['status']['id'], + 'eventType' => 'UP', + 'eventId' => 'statusup', 'info' => _MODIFY_STATUS . ' : ' . $return['status']['id'] ]); @@ -149,10 +149,10 @@ class StatusController StatusModel::delete(['identifier' => $aArgs['identifier']]); HistoryController::add([ - 'table_name' => 'status', - 'record_id' => $statusDeleted[0]['id'], - 'event_type' => 'DEL', - 'event_id' => 'statusdel', + 'tableName' => 'status', + 'recordId' => $statusDeleted[0]['id'], + 'eventType' => 'DEL', + 'eventId' => 'statusdel', 'info' => _STATUS_DELETED . ' : ' . $statusDeleted[0]['id'] ]); } else { diff --git a/core/Controllers/UserController.php b/core/Controllers/UserController.php index c84f3d5f61b7bef401a6e7a0e407d2012166ce4a..9cdec912944734bdb54697a1f21e7da7fe5fc04c 100755 --- a/core/Controllers/UserController.php +++ b/core/Controllers/UserController.php @@ -241,10 +241,10 @@ class UserController UserModel::activateAbsenceById(['userId' => $user['user_id']]); HistoryController::add([ - 'table_name' => 'users', - 'record_id' => $user['user_id'], - 'event_type' => 'ABS', - 'event_id' => 'userabs', + 'tableName' => 'users', + 'recordId' => $user['user_id'], + 'eventType' => 'ABS', + 'eventId' => 'userabs', 'info' => _ABS_USER. " {$user['firstname']} {$user['lastname']}" ]); @@ -280,10 +280,10 @@ class UserController UserModel::desactivateAbsenceById(['id' => $aArgs['id']]); HistoryController::add([ - 'table_name' => 'users', - 'record_id' => $user['user_id'], - 'event_type' => 'RET', - 'event_id' => 'userabs', + 'tableName' => 'users', + 'recordId' => $user['user_id'], + 'eventType' => 'RET', + 'eventId' => 'userabs', 'info' => "{$user['firstname']} {$user['lastname']} " ._BACK_FROM_VACATION ]); diff --git a/core/Models/UserModelAbstract.php b/core/Models/UserModelAbstract.php index c9546ab4eb9824740b4e150078da8cf968984655..3cabd475451dd677288f8c5ad09a2b6743c234c5 100755 --- a/core/Models/UserModelAbstract.php +++ b/core/Models/UserModelAbstract.php @@ -603,10 +603,10 @@ class UserModelAbstract $groupInfos = GroupModel::getById(['groupId' => $aArgs['groupId']]); HistoryController::add([ - 'table_name' => 'users', - 'record_id' =>$user['user_id'], - 'event_type' => 'GROUP ADD', - 'event_id' => 'groupadded', + 'tableName' => 'users', + 'recordId' =>$user['user_id'], + 'eventType' => 'GROUP ADD', + 'eventId' => 'groupadded', 'info' =>$_SESSION['user']['UserId'].' '._ADDED_USER.' '.$user['user_id'].' '._IN_GROUP.' '.$groupInfos['group_desc'] ]); @@ -648,10 +648,10 @@ class UserModelAbstract $groupInfos = GroupModel::getById(['groupId' => $aArgs['groupId']]); HistoryController::add([ - 'table_name' => 'users', - 'record_id' =>$user['user_id'], - 'event_type' => 'GROUP DELETED', - 'event_id' => 'groupdeleted', + 'tableName' => 'users', + 'recordId' =>$user['user_id'], + 'eventType' => 'GROUP DELETED', + 'eventId' => 'groupdeleted', 'info' =>$_SESSION['user']['UserId'].' '._REMOVED_USER.' '.$user['user_id'].' '._FROM_GROUP.' '.$groupInfos['group_desc'] ]); @@ -695,10 +695,10 @@ class UserModelAbstract $entityInfos = EntityModel::getByID(['entityId' => $aArgs['entityId']]); HistoryController::add([ - 'table_name' => 'users', - 'record_id' => $user['user_id'], - 'event_type' => 'ENTITY ADD', - 'event_id' => 'entityadded', + 'tableName' => 'users', + 'recordId' => $user['user_id'], + 'eventType' => 'ENTITY ADD', + 'eventId' => 'entityadded', 'info' => $_SESSION['user']['UserId'].' '._ADDED_USER.' '.$user['user_id'].' '._IN_ENTITY.' '.$entityInfos['entity_label'] ]); @@ -793,10 +793,10 @@ class UserModelAbstract $entityInfos=EntityModel::getByID(['entityId' => $aArgs['entityId']]); HistoryController::add([ - 'table_name' => 'users', - 'record_id' =>$user['user_id'], - 'event_type' => 'ENTITY DELETE', - 'event_id' => 'entitydeleted', + 'tableName' => 'users', + 'recordId' =>$user['user_id'], + 'eventType' => 'ENTITY DELETE', + 'eventId' => 'entitydeleted', 'info' =>$_SESSION['user']['UserId'].' '._REMOVED_USER.' '.$user['user_id'].' '._FROM_ENTITY.' '.$entityInfos['entity_label'] ]); diff --git a/modules/notifications/Controllers/NotificationController.php b/modules/notifications/Controllers/NotificationController.php index 321b432a1eeefe76fb3be094ada21e3aba4a306d..6bed5cb4bcd9b92d54d453da32ebb489e931bd18 100644 --- a/modules/notifications/Controllers/NotificationController.php +++ b/modules/notifications/Controllers/NotificationController.php @@ -99,11 +99,11 @@ class NotificationController if (NotificationModel::create($data)) { HistoryController::add([ - 'table_name' => 'notifications', - 'record_id' => $data['notification_id'], - 'event_type' => 'ADD', - 'event_id' => 'notificationsadd', - 'info' => _ADD_NOTIFICATIONS . ' : ' . $data['notification_id'] + 'tableName' => 'notifications', + 'recordId' => $data['notification_id'], + 'eventType' => 'ADD', + 'eventId' => 'notificationsadd', + 'info' => _ADD_NOTIFICATIONS . ' : ' . $data['notification_id'] ]); return $response->withJson(NotificationModel::getByNotificationId(['notificationId' => $data['notification_id']])); } else { @@ -134,10 +134,10 @@ class NotificationController $notification = NotificationModel::getById(['notificationId' => $data['notification_id']]); HistoryController::add([ - 'table_name' => 'notifications', - 'record_id' => $data['notification_sid'], - 'event_type' => 'UP', - 'event_id' => 'notificationsup', + 'tableName' => 'notifications', + 'recordId' => $data['notification_sid'], + 'eventType' => 'UP', + 'eventId' => 'notificationsup', 'info' => _MODIFY_NOTIFICATIONS . ' : ' . $data['notification_sid'] ]); @@ -153,10 +153,10 @@ class NotificationController NotificationModel::delete(['notification_sid' => $aArgs['id']]); HistoryController::add([ - 'table_name' => 'notifications', - 'record_id' => $aArgs['id'], - 'event_type' => 'DEL', - 'event_id' => 'notificationsdel', + 'tableName' => 'notifications', + 'recordId' => $aArgs['id'], + 'eventType' => 'DEL', + 'eventId' => 'notificationsdel', 'info' => _DELETE_NOTIFICATIONS . ' : ' . $aArgs['id'] ]);