diff --git a/appointment.php b/appointment.php index 3c265c9d..71bd8b7c 100644 --- a/appointment.php +++ b/appointment.php @@ -59,6 +59,8 @@ include("functions/functions.operator.php"); */ include("functions/functions.input.php"); +$db->StartTrans(); + $operator_id = get_operator_id(); $questionnaire_id = get_questionnaire_id($operator_id); $case_id = get_case_id($operator_id); @@ -67,6 +69,7 @@ if (!$case_id){ xhtml_head(T_("Appointment error")); print("
" . T_("No case") . "
"; + + $db->CompleteTrans(); } xhtml_foot(); diff --git a/index.php b/index.php index b0d8ebd9..8a0fa5d0 100644 --- a/index.php +++ b/index.php @@ -45,11 +45,12 @@ include ("functions/functions.xhtml.php"); */ include("functions/functions.operator.php"); +$db->StartTrans(); + $operator_id = get_operator_id(); if (isset($_GET['endwork'])) { - $db->StartTrans(); if (isset($_GET['note'])) { @@ -72,7 +73,6 @@ if (isset($_GET['endwork'])) if (isset($_GET['endcase'])) { - $db->StartTrans(); if (isset($_GET['note'])) { @@ -86,11 +86,8 @@ if (isset($_GET['endcase'])) end_case($operator_id); //if ($db->HasFailedTrans()) {print "FAILED AT ENDCASE
"; exit();} - $db->CompleteTrans(); } -$db->StartTrans(); - xhtml_head(T_("queXS"), true, array("css/index.css","css/tabber.css") , array("js/popup.js","js/tabber.js")); ?> diff --git a/respondent.php b/respondent.php index b76f591c..aa0e7c81 100644 --- a/respondent.php +++ b/respondent.php @@ -68,6 +68,8 @@ xhtml_head(T_("Respondent Selector"),true,array("css/table.css","css/respondent. global $db; +$db->StartTrans(); + $operator_id = get_operator_id(); $call_attempt_id = get_call_attempt($operator_id); $case_id = get_case_id($operator_id); @@ -153,5 +155,5 @@ else xhtml_foot(); - +$db->CompleteTrans(); ?>