diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-19 13:17:16 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-01-19 13:17:16 +0000 |
| commit | 57c41aefe08e7a3c0356b1f30cb19cbe429ca2b8 (patch) | |
| tree | 8b5442c16a7edb578b00a1df7a5a28f794274f88 /frontends/php/include/hosts.inc.php | |
| parent | 197bc5cadd3d2fc8826a5519248a6d8ebd0c60d9 (diff) | |
- Frontend improvements (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2544 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
| -rw-r--r-- | frontends/php/include/hosts.inc.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php index 3907dc74..147f7f94 100644 --- a/frontends/php/include/hosts.inc.php +++ b/frontends/php/include/hosts.inc.php @@ -43,7 +43,7 @@ return 0; } - if( isset($useip) && ($useip=="on") ) + if($useip=="on" || $useip=="yes" || $useip==1) { $useip=1; } @@ -52,7 +52,6 @@ $useip=0; } - $sql="insert into hosts (host,port,status,useip,ip,disable_until,available) values ('$host',$port,$status,$useip,'$ip',0,".HOST_AVAILABLE_UNKNOWN.")"; $result=DBexecute($sql); if(!$result) @@ -104,7 +103,7 @@ } - if($useip=="on") + if($useip=="on" || $useip=="yes" || $useip==1) { $useip=1; } @@ -112,6 +111,7 @@ { $useip=0; } + $sql="update hosts set host='$host',port=$port,useip=$useip,ip='$ip' where hostid=$hostid"; $result=DBexecute($sql); @@ -175,7 +175,10 @@ { $sql="update hosts set status=".HOST_STATUS_DELETED.",host=host||' [DEL$i]' where hostid=$hostid"; } - if($ret = DBexecute($sql)) break; + if($ret = DBexecute($sql,1)) break; + } + if($ret){ + delete_host_profile($hostid); } return $ret; } |
