diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-05-10 11:21:21 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-05-10 11:21:21 +0000 |
commit | ef7ed2fb63f67c7a7f0699624d264b5dd797651f (patch) | |
tree | bbea31a6acf7b2bbec781dbacad3665d12581828 /frontends/php/services_form.php | |
parent | 931005057f7522a7f7b95cbcf0608c71196eb1ab (diff) | |
download | zabbix-ef7ed2fb63f67c7a7f0699624d264b5dd797651f.tar.gz zabbix-ef7ed2fb63f67c7a7f0699624d264b5dd797651f.tar.xz zabbix-ef7ed2fb63f67c7a7f0699624d264b5dd797651f.zip |
- [DEV-169] improvements in msges for services (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5696 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/services_form.php')
-rw-r--r-- | frontends/php/services_form.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/frontends/php/services_form.php b/frontends/php/services_form.php index e81fb28f..3561700f 100644 --- a/frontends/php/services_form.php +++ b/frontends/php/services_form.php @@ -120,22 +120,28 @@ if(isset($_REQUEST['saction'])){ $triggerid = (isset($_REQUEST["linktrigger"]))?($_REQUEST["triggerid"]):(null); + DBstart(); if(isset($service["serviceid"])){ $result = update_service($service["serviceid"], $_REQUEST["name"],$triggerid,$_REQUEST["algorithm"], $_REQUEST["showsla"],$_REQUEST["goodsla"],$_REQUEST["sortorder"], - $service_times,$_REQUEST['parentid'],$childs); - - show_messages($result, S_SERVICE_UPDATED, S_CANNOT_UPDATE_SERVICE); - $serviceid = $service["serviceid"]; - $audit_acrion = AUDIT_ACTION_UPDATE; - + $service_times,$_REQUEST['parentid'],$childs); } else { $result = add_service( $_REQUEST["name"],$triggerid,$_REQUEST["algorithm"], $_REQUEST["showsla"],$_REQUEST["goodsla"],$_REQUEST["sortorder"], $service_times,$_REQUEST['parentid'],$childs); + } + + $result = DBend()?$result:false; + + if(isset($serrvice['serviceid'])){ + show_messages($result, S_SERVICE_UPDATED, S_CANNOT_UPDATE_SERVICE); + $serviceid = $service["serviceid"]; + $audit_acrion = AUDIT_ACTION_UPDATE; + } + else{ show_messages($result, S_SERVICE_ADDED, S_CANNOT_ADD_SERVICE); $serviceid = $result; $audit_acrion = AUDIT_ACTION_ADD; |