function get_realhost_by_applicationid($applicationid) { $application = get_application_by_applicationid($applicationid); if ($application["templateid"] > 0) { return get_realhost_by_applicationid($application["templateid"]); } return get_host_by_applicationid($applicationid); }
$host = get_host_by_applicationid($httptest_data['applicationid']); add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCENARIO, _('Scenario') . ' [' . $httptest_data['name'] . '] [' . $id . '] ' . _('Host') . ' [' . $host['host'] . ']' . _('Scenario disabled')); } } show_messages($go_result, _('Scenario disabled'), null); } elseif ($_REQUEST['go'] == 'clean_history' && isset($_REQUEST['group_httptestid'])) { $go_result = false; $group_httptestid = $_REQUEST['group_httptestid']; foreach ($group_httptestid as $id) { if (!($httptest_data = get_httptest_by_httptestid($id))) { continue; } if (delete_history_by_httptestid($id)) { $go_result = true; DBexecute('UPDATE httptest SET nextcheck=0 WHERE httptestid=' . $id); $host = get_host_by_applicationid($httptest_data['applicationid']); add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_SCENARIO, _('Scenario') . ' [' . $httptest_data['name'] . '] [' . $id . '] ' . _('Host') . ' [' . $host['host'] . ']' . _('History cleared')); } } show_messages($go_result, _('History cleared'), null); } elseif ($_REQUEST['go'] == 'delete' && isset($_REQUEST['group_httptestid'])) { $go_result = API::WebCheck()->delete($_REQUEST['group_httptestid']); show_messages($go_result, _('Scenario deleted'), null); } if ($_REQUEST['go'] != 'none' && isset($go_result) && $go_result) { $url = new CUrl(); $path = $url->getPath(); insert_js('cookie.eraseArray("' . $path . '")'); } show_messages(); /*