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,11 +116,17 @@ 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']);
if ($outcome_id > 0)
{
$sql = "UPDATE `call` $sql = "UPDATE `call`
SET outcome_id = '$outcome_id' SET outcome_id = '$outcome_id'
WHERE call_id = '$call_id'"; WHERE call_id = '$call_id'";
$db->Execute($sql); $db->Execute($sql);
} }
}
else else
{ {
print "<h3>" . T_("Set an outcome for this call") . "</h3>"; print "<h3>" . T_("Set an outcome for this call") . "</h3>";
@@ -156,12 +162,15 @@ if ($case_id != false)
{ {
$outcome_id = bigintval($_GET['outcome_id']); $outcome_id = bigintval($_GET['outcome_id']);
if ($outcome_id > 0)
{
$sql = "UPDATE `case` $sql = "UPDATE `case`
SET current_outcome_id = $outcome_id SET current_outcome_id = $outcome_id
WHERE case_id = '$case_id'"; WHERE case_id = '$case_id'";
$db->Execute($sql); $db->Execute($sql);
} }
}
if (isset($_GET['operator_id'])) if (isset($_GET['operator_id']))
{ {