2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Fixes:1209486 Supervisor can assign a blank outcome to a case which makes it unavailable

This commit is contained in:
Adam Zammit
2013-08-08 14:45:22 +10:00
parent 8f747361f1
commit b43c6500bf

View File

@@ -116,10 +116,16 @@ if (isset($_GET['call_id']))
if (isset($_GET['set_outcome_id'])) if (isset($_GET['set_outcome_id']))
{ {
$outcome_id = bigintval($_GET['set_outcome_id']); $outcome_id = bigintval($_GET['set_outcome_id']);
$sql = "UPDATE `call`
SET outcome_id = '$outcome_id' if ($outcome_id > 0)
WHERE call_id = '$call_id'"; {
$db->Execute($sql);
$sql = "UPDATE `call`
SET outcome_id = '$outcome_id'
WHERE call_id = '$call_id'";
$db->Execute($sql);
}
} }
else else
{ {
@@ -156,11 +162,14 @@ if ($case_id != false)
{ {
$outcome_id = bigintval($_GET['outcome_id']); $outcome_id = bigintval($_GET['outcome_id']);
$sql = "UPDATE `case` if ($outcome_id > 0)
SET current_outcome_id = $outcome_id {
WHERE case_id = '$case_id'"; $sql = "UPDATE `case`
SET current_outcome_id = $outcome_id
$db->Execute($sql); WHERE case_id = '$case_id'";
$db->Execute($sql);
}
} }
if (isset($_GET['operator_id'])) if (isset($_GET['operator_id']))