diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-07-07 21:16:37 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-07-07 21:16:37 +0000 |
| commit | 7fb79d3caf80fee6dfb5da59f6da9d6ba8829bae (patch) | |
| tree | 4aaf1bc90f8daa3cebf4e2ffc72820b336b10c76 /frontends/php/include | |
| parent | f35c694e248cf36d50d5130dda38849603ee19d8 (diff) | |
| download | zabbix-7fb79d3caf80fee6dfb5da59f6da9d6ba8829bae.tar.gz zabbix-7fb79d3caf80fee6dfb5da59f6da9d6ba8829bae.tar.xz zabbix-7fb79d3caf80fee6dfb5da59f6da9d6ba8829bae.zip | |
Different changes for PHP forms.
git-svn-id: svn://svn.zabbix.com/trunk@129 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontends/php/include/config.inc b/frontends/php/include/config.inc index 2d617642..b63d1db3 100644 --- a/frontends/php/include/config.inc +++ b/frontends/php/include/config.inc @@ -859,6 +859,7 @@ function add_trigger($expression,$description,$priority,$istrue,$comments) { + $description=addslashes($description); $sql="insert into triggers (description,priority,istrue,comments) values ('$description',$priority,$istrue,'$comments')"; # echo $sql,"<Br>"; $result=DBexecute($sql); @@ -948,6 +949,7 @@ break; } } + $description=sprintf($description,$host); add_trigger($expression,$description,0,0,""); } @@ -1020,13 +1022,16 @@ # Add Host definition - function add_host($host,$port,$status) + function add_host($host,$port,$status,$template) { $sql="insert into hosts (host,port,status) values ('$host',$port,$status)"; $result=DBexecute($sql); $hostid=DBinsert_id($result,"hosts","hostid"); - add_from_templates($hostid,$host); + if($template=="true") + { + add_from_templates($hostid,$host); + } } |
