summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-22 11:04:36 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-22 11:04:36 +0000
commit6c2803e771f9844a204cdc47cabe5f06ff4c06d8 (patch)
tree1eb9c33574dc8c80da0cb818dcc41b9ea2676db8 /frontends/php
parent8c5ad4549975d8fd9fdd6d5da90fb44a1ac01745 (diff)
downloadzabbix-6c2803e771f9844a204cdc47cabe5f06ff4c06d8.tar.gz
zabbix-6c2803e771f9844a204cdc47cabe5f06ff4c06d8.tar.xz
zabbix-6c2803e771f9844a204cdc47cabe5f06ff4c06d8.zip
- [NTT-50] bulk acknowledge with empty comment (Sasha)
[svn merge -r5089:5090 svn://svn.zabbix.com/branches/1.4.j] git-svn-id: svn://svn.zabbix.com/trunk@5091 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/acknow.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/frontends/php/acknow.php b/frontends/php/acknow.php
index 7ffaf5bd..826a770c 100644
--- a/frontends/php/acknow.php
+++ b/frontends/php/acknow.php
@@ -31,12 +31,13 @@ include_once "include/page_header.php";
?>
<?php
-// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
- $fields=array(
- 'eventid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, '!isset({events})&&!isset({cancel})'),
- 'events'=> array(T_ZBX_INT, O_OPT, null, DB_ID, '!isset({eventid})&&!isset({cancel})'),
- 'message'=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, 'isset({save})||isset({saveandreturn})'),
+ $bulk = isset($_REQUEST['bulkacknowledge']);
+// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
+ $fields=array(
+ 'eventid'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, '!isset({events})&&!isset({cancel})'),
+ 'events'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID, '!isset({eventid})&&!isset({cancel})'),
+ 'message'=> array(T_ZBX_STR, O_OPT, NULL, $bulk ? NULL : NOT_EMPTY, 'isset({save})||isset({saveandreturn})'),
/* actions */
'bulkacknowledge'=> array(T_ZBX_STR,O_OPT, P_ACT|P_SYS, NULL, NULL),
"saveandreturn" => array(T_ZBX_STR,O_OPT, P_ACT|P_SYS, NULL, NULL),
@@ -45,8 +46,6 @@ include_once "include/page_header.php";
);
check_fields($fields);
- $bulk = isset($_REQUEST['bulkacknowledge']);
-
if(isset($_REQUEST['eventid'])){
$events[$_REQUEST['eventid']] = $_REQUEST['eventid'];
}
@@ -113,7 +112,9 @@ include_once "include/page_header.php";
else if(isset($_REQUEST["saveandreturn"]))
{
$result = true;
- $_REQUEST['message'] .= ($bulk)?("\n\r".S_SYS_BULK_ACKNOWLEDGE):('');
+ if($bulk) {
+ $_REQUEST['message'] .= ($_REQUEST['message'] != ''? "\n\r" : '').S_SYS_BULK_ACKNOWLEDGE;
+ }
foreach($events as $id => $eventid){
$result &= add_acknowledge_coment(