Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix excessively long id search in logs #5238

Merged
merged 2 commits into from
May 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions www/class/centreon-clapi/centreonObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,8 @@ public function addAuditLog($actionType, $objId, $objName, $objValues = array())
$userId
));

$query = 'SELECT MAX(action_log_id) as action_log_id
FROM log_action
WHERE action_log_date = ?';
$stmt = $dbstorage->query($query, array($time));
$query = 'SELECT LAST_INSERT_ID() as action_log_id';
$stmt = $dbstorage->query($query);
$row = $stmt->fetch();
if (false === $row) {
throw new CentreonClapiException("Error while inserting log action");
Expand Down