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

Commit

Permalink
fix excessively long id search in logs (#5238)
Browse files Browse the repository at this point in the history
* fix excessively long id search in logs

* Update centreonObject.class.php
  • Loading branch information
cgagnaire authored and kduret committed May 17, 2017
1 parent ff29335 commit f9ce1c4
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit f9ce1c4

Please sign in to comment.