summaryrefslogtreecommitdiffstats
path: root/frontends/php/triggers.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-27 10:02:20 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-05-27 10:02:20 +0000
commitf729fb1a6163a129305c234b78cbb74f68dec229 (patch)
treeb06fc5767cb2402594fd8d9c5cec4794a2b21c51 /frontends/php/triggers.php
parente8fddd143139abfe2d257f5168a3176b16af5bd1 (diff)
downloadzabbix-f729fb1a6163a129305c234b78cbb74f68dec229.tar.gz
zabbix-f729fb1a6163a129305c234b78cbb74f68dec229.tar.xz
zabbix-f729fb1a6163a129305c234b78cbb74f68dec229.zip
- [ZBX-362] improvements and fixes to template linkage (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5730 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/triggers.php')
-rw-r--r--frontends/php/triggers.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php
index cb1afd5f..fe58ead4 100644
--- a/frontends/php/triggers.php
+++ b/frontends/php/triggers.php
@@ -236,17 +236,12 @@ include_once "include/page_header.php";
if(!check_right_on_trigger_by_triggerid(null, $triggerid)) continue;
$result=DBselect("SELECT triggerid FROM triggers t WHERE t.triggerid=".zbx_dbstr($triggerid));
- if(!($row = DBfetch($result))) continue;
+ if(!$row = DBfetch($result)) continue;
if($result = update_trigger_status($row['triggerid'],0)){
- $status = 0;
- $db_trigger = get_trigger_by_triggerid($row['triggerid']);
- if((TRIGGER_STATUS_ENABLED == $db_trigger['status']) && (TRIGGER_VALUE_TRUE == $db_trigger['value'])){
- $status = $trigger['priority'];
- }
-
- update_services($triggerid, $status); // updating status to all services by the dependency
+ $serv_status = get_service_status_of_trigger($row['triggerid']);
+ update_services($triggerid, $serv_status); // updating status to all services by the dependency
add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_TRIGGER,
S_TRIGGER." [".$triggerid."] [".expand_trigger_description($triggerid)."] ".S_ENABLED);