break; default: break; } //testlink_cases $testlink_varcases = $platform_mgr->getVarCases($var_id); $gui = new stdClass(); $gui->var_id = $var_id; $gui->suite_id = $suite_id; $needadd = array_diff($var_cases, $testlink_varcases); $needdelete = array_diff($testlink_varcases, $var_cases); $gui->needadd = array(); $gui->needdelete = array(); if (!is_null($needadd)) { foreach ($needadd as $case_tcv_id) { $platform_mgr->modifyVarCases($var_id, $case_tcv_id, $args->login_username, 'add'); $gui->needadd[] = $platform_mgr->getTcversionName($case_tcv_id); } } if (!is_null($needdelete)) { foreach ($needdelete as $case_tcv_id) { $platform_mgr->modifyVarCases($var_id, $case_tcv_id, $args->login_username, 'delete'); $gui->needdelete[] = $platform_mgr->getTcversionName($case_tcv_id); } } $smarty = new TLSmarty(); $smarty->assign('gui', $gui); $smarty->display($templateCfg->template_dir . $templateCfg->default_template); function init_args() { $args = new stdClass();