summaryrefslogtreecommitdiffstats
path: root/frontends/php/acknow.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-08 11:59:45 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-08 11:59:45 +0000
commit0ecd87f94b017bed32e7a1511a9f3b60ac2621b2 (patch)
treeb4b65ccaa6a52b737677f87ff5ae657a3333add4 /frontends/php/acknow.php
parentf99327ef29f466bac40fdd47413d1a9cab9b3690 (diff)
downloadzabbix-0ecd87f94b017bed32e7a1511a9f3b60ac2621b2.tar.gz
zabbix-0ecd87f94b017bed32e7a1511a9f3b60ac2621b2.tar.xz
zabbix-0ecd87f94b017bed32e7a1511a9f3b60ac2621b2.zip
- [DEV-46] merged rev. 4843:4844 of branches/1.4/ (Artem) [added "save&return" button in acknowledgement]
git-svn-id: svn://svn.zabbix.com/trunk@4848 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/acknow.php')
-rw-r--r--frontends/php/acknow.php28
1 files changed, 23 insertions, 5 deletions
diff --git a/frontends/php/acknow.php b/frontends/php/acknow.php
index 5895194d..b6006fcf 100644
--- a/frontends/php/acknow.php
+++ b/frontends/php/acknow.php
@@ -33,12 +33,13 @@ include_once "include/page_header.php";
<?php
// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
$fields=array(
- "eventid"=> array(T_ZBX_INT, O_MAND, P_SYS, DB_ID, NULL),
- "message"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, 'isset({save})'),
+ "eventid"=> array(T_ZBX_INT, O_MAND, P_SYS, DB_ID, NULL),
+ "message"=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, 'isset({save})||isset({saveandreturn})'),
/* actions */
- "save"=> array(T_ZBX_STR,O_OPT, P_ACT|P_SYS, NULL, NULL),
- "cancel"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null)
+ "saveandreturn" => array(T_ZBX_STR,O_OPT, P_ACT|P_SYS, NULL, NULL),
+ "save"=> array(T_ZBX_STR,O_OPT, P_ACT|P_SYS, NULL, NULL),
+ "cancel"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null)
);
check_fields($fields);
?>
@@ -71,9 +72,26 @@ include_once "include/page_header.php";
' ['.$_REQUEST["message"].']');
}
}
+ else if(isset($_REQUEST["saveandreturn"]))
+ {
+ $result = add_acknowledge_coment(
+ $db_data["eventid"],
+ $USER_DETAILS["userid"],
+ $_REQUEST["message"]);
+
+ if($result)
+ {
+ add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_TRIGGER, S_ACKNOWLEDGE_ADDED.
+ ' ['.expand_trigger_description_by_data($db_data).']'.
+ ' ['.$_REQUEST["message"].']');
+ }
+
+ Redirect('tr_status.php?hostid='.get_profile('web.tr_status.hostid',0));
+ exit;
+ }
else if(isset($_REQUEST["cancel"]))
{
- Redirect('tr_status.php?hostid='.$db_data['hostid']);
+ Redirect('tr_status.php?hostid='.get_profile('web.tr_status.hostid',0));
exit;
}
?>