summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-03 12:01:36 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-03 12:01:36 +0000
commitc3d3eaea01e691748c2d2b875bb5326e9e494047 (patch)
treef663f87c81c7b5588f94d5064f17252517c5168c /frontends/php
parent62d85d6dedace6ef9470bc2d8ff394df18f71bf2 (diff)
downloadzabbix-c3d3eaea01e691748c2d2b875bb5326e9e494047.tar.gz
zabbix-c3d3eaea01e691748c2d2b875bb5326e9e494047.tar.xz
zabbix-c3d3eaea01e691748c2d2b875bb5326e9e494047.zip
- [DEV-173] added support of notification escalations on server side
git-svn-id: svn://svn.zabbix.com/trunk@5748 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/actionconf.php8
-rw-r--r--frontends/php/include/actions.inc.php15
2 files changed, 17 insertions, 6 deletions
diff --git a/frontends/php/actionconf.php b/frontends/php/actionconf.php
index 5ab812c0..dfe3db53 100644
--- a/frontends/php/actionconf.php
+++ b/frontends/php/actionconf.php
@@ -252,6 +252,12 @@ include_once 'include/page_header.php';
$_REQUEST['operations'] = get_request('operations',array());
+ if($new_operation['esc_step_from'] > $new_operation['esc_step_to']) {
+ $from = $new_operation['esc_step_to'];
+ $new_operation['esc_step_to'] = $new_operation['esc_step_from'];
+ $new_operation['esc_step_from'] = $from;
+ }
+
if(!isset($new_operation['id'])){
if(!str_in_array($new_operation,$_REQUEST['operations']))
array_push($_REQUEST['operations'],$new_operation);
@@ -555,4 +561,4 @@ include_once 'include/page_header.php';
?>
<?php
include_once "include/page_footer.php";
-?> \ No newline at end of file
+?>
diff --git a/frontends/php/include/actions.inc.php b/frontends/php/include/actions.inc.php
index 16b15ca5..3df9c8d3 100644
--- a/frontends/php/include/actions.inc.php
+++ b/frontends/php/include/actions.inc.php
@@ -157,7 +157,7 @@ function add_action_operation($actionid, $operation){
if(!isset($operation['default_msg'])) $operation['default_msg'] = 0;
if(!isset($operation['opconditions'])) $operation['opconditions'] = array();
-
+
$result = DBexecute('INSERT INTO operations (operationid, actionid, operationtype, object, objectid, shortdata, longdata, esc_period, esc_step_from, esc_step_to, default_msg, evaltype)'.
' values('.$operationid.','.$actionid.','.
$operation['operationtype'].','.
@@ -515,8 +515,8 @@ function get_operation_desc($type=SHORT_DESCRITION, $data){
break;
case OPERATION_TYPE_COMMAND:
- $temp = bold(S_REMOTE_COMMANDS);
- $result = $temp->ToString().":\n".$data['longdata'];
+ $temp = bold(S_REMOTE_COMMANDS.': ');
+ $result = $temp->ToString().$data['longdata'];
break;
default: break;
}
@@ -1005,7 +1005,12 @@ function get_actions_for_event($eventid){
}
$sendto=$row["sendto"];
- $message = array(bold(S_SUBJECT.': '),br(),$row["subject"],br(),br(),bold(S_MESSAGE.': '),br(),$row['message']);
+ $message = array(bold(S_SUBJECT.':'),br(),$row["subject"],br(),br(),bold(S_MESSAGE.':'));
+ $msg = explode("\n",$row['message']);
+ foreach($msg as $m)
+ {
+ array_push($message, BR(), $m);
+ }
if(empty($row["error"])){
$error=new CSpan(SPACE,"off");
@@ -1078,4 +1083,4 @@ function get_actions_hint_by_eventid($eventid,$status=NULL){
return $tab_hint;
}
-?> \ No newline at end of file
+?>