From f0395b47d6d6208340e9de9c9578f603180a2712 Mon Sep 17 00:00:00 2001 From: abaheti Date: Fri, 20 Mar 2015 15:10:44 +0530 Subject: [PATCH] Fixing http://mantis.testlink.org/view.php?id=7014 --- lib/functions/testcase.class.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/functions/testcase.class.php b/lib/functions/testcase.class.php index 1c3f0be3bb..5b606ea56a 100644 --- a/lib/functions/testcase.class.php +++ b/lib/functions/testcase.class.php @@ -5921,22 +5921,16 @@ function setExecutionType($tcversionID,$value) $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__; $execType = intval($value); - switch($execType) + + if(!is_null($this->execution_types[$execType])) { - case TESTCASE_EXECUTION_TYPE_MANUAL: - case TESTCASE_EXECUTION_TYPE_AUTO: - break; - - default: - $execType = TESTCASE_EXECUTION_TYPE_MANUAL; - break; - } - $sql = "/* $debugMsg */ " . + $sql = "/* $debugMsg */ " . " UPDATE {$this->tables['tcversions']} " . " SET execution_type=" . $this->db->prepare_int($execType) . " WHERE id = " . $this->db->prepare_int($tcversionID); - $this->db->exec_query($sql); - return array($value,$execType,$sql); + $this->db->exec_query($sql); + return array($value,$execType,$sql); + } }