Private GIT

Skip to content
Snippets Groups Projects
Commit cfdcdd2d authored by loiclau's avatar loiclau
Browse files

fix query context #5263

parent 862dd2ed
Branches
Tags
No related merge requests found
...@@ -99,8 +99,8 @@ if (!$service_id) { ...@@ -99,8 +99,8 @@ if (!$service_id) {
AND cancelled = 0 AND cancelled = 0
AND end_time > UNIX_TIMESTAMP(NOW()) AND end_time > UNIX_TIMESTAMP(NOW())
ORDER BY actual_start_time"; ORDER BY actual_start_time";
$stmt = $pearDB->prepare($query); $stmt = $dbb->prepare($query);
$res = $pearDB->execute($stmt, array($dbb->escape($host_id))); $res = $dbb->execute($stmt, array((int)$host_id));
} else { } else {
$query = "SELECT author, actual_start_time, end_time, comment_data, duration, fixed $query = "SELECT author, actual_start_time, end_time, comment_data, duration, fixed
FROM downtimes FROM downtimes
...@@ -109,9 +109,11 @@ if (!$service_id) { ...@@ -109,9 +109,11 @@ if (!$service_id) {
AND cancelled = 0 AND cancelled = 0
AND end_time > UNIX_TIMESTAMP(NOW()) AND end_time > UNIX_TIMESTAMP(NOW())
ORDER BY actual_start_time"; ORDER BY actual_start_time";
$stmt = $pearDB->prepare($query); $stmt = $dbb->prepare($query);
$res = $pearDB->execute($stmt, array($dbb->escape($host_id), $dbb->escape($service_id))); $res = $dbb->execute($stmt, array((int)$host_id, (int)$service_id));
} }
$rowClass = "list_one"; $rowClass = "list_one";
while ($row = $res->fetchRow()) { while ($row = $res->fetchRow()) {
$row['comment_data'] = strip_tags($row['comment_data']); $row['comment_data'] = strip_tags($row['comment_data']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment