summaryrefslogtreecommitdiffstats
path: root/frontends/php/services_form.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-31 11:17:54 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-31 11:17:54 +0000
commitc606a0bad1b26b76bf7a061c329afbc49ff1cd97 (patch)
tree70ea31e3c754d9a91d531befd4ebd974c72abf63 /frontends/php/services_form.php
parented68e5fe0c92a2a620df0116f28c6ef7ceea8df4 (diff)
downloadzabbix-c606a0bad1b26b76bf7a061c329afbc49ff1cd97.tar.gz
zabbix-c606a0bad1b26b76bf7a061c329afbc49ff1cd97.tar.xz
zabbix-c606a0bad1b26b76bf7a061c329afbc49ff1cd97.zip
- improvements to services calculation algorithms (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5564 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/services_form.php')
-rw-r--r--frontends/php/services_form.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/frontends/php/services_form.php b/frontends/php/services_form.php
index c5a012cb..612eb1a4 100644
--- a/frontends/php/services_form.php
+++ b/frontends/php/services_form.php
@@ -115,7 +115,8 @@ if(isset($_REQUEST['saction'])){
show_messages($result, S_SERVICE_DELETED, S_CANNOT_DELETE_SERVICE);
add_audit_if($result,AUDIT_ACTION_DELETE,AUDIT_RESOURCE_IT_SERVICE,' Name ['.$service["name"].'] id ['.$service['serviceid'].']');
unset($service);
- } elseif(isset($_REQUEST["save_service"])){
+ }
+ else if(isset($_REQUEST["save_service"])){
$service_times = get_request('service_times',array());
$childs = get_request('childs',array());
@@ -132,7 +133,8 @@ if(isset($_REQUEST['saction'])){
$serviceid = $service["serviceid"];
$audit_acrion = AUDIT_ACTION_UPDATE;
- } else {
+ }
+ else {
$result = add_service(
$_REQUEST["name"],$triggerid,$_REQUEST["algorithm"],
$_REQUEST["showsla"],$_REQUEST["goodsla"],$_REQUEST["sortorder"],
@@ -144,7 +146,8 @@ if(isset($_REQUEST['saction'])){
add_audit_if($result,$audit_acrion,AUDIT_RESOURCE_IT_SERVICE,' Name ['.$_REQUEST["name"].'] id ['.$serviceid.']');
- } elseif(isset($_REQUEST["add_server"])){
+ }
+ else if(isset($_REQUEST["add_server"])){
if(!($host_data = DBfetch(DBselect('select h.* from hosts h where '.DBin_node('h.hostid').' and h.hostid not in ('.$denyed_hosts.') and h.hostid='.$_REQUEST["serverid"])))){
access_deny();
}
@@ -208,7 +211,8 @@ if(isset($_REQUEST['pservices'])){
' AND '.DBin_node('s.serviceid').
' AND s.serviceid NOT IN ('.$childs_str.$service['serviceid'].') '.
' ORDER BY s.sortorder,s.name';
- } else {
+ }
+ else {
$query = 'SELECT DISTINCT s.* '.
' FROM services s '.
' LEFT JOIN triggers t ON s.triggerid=t.triggerid '.