summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-01-11 09:19:34 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-01-11 09:19:34 +0000
commitd70314f923d57cc5c623da7cd10b4eed632e851d (patch)
treee65d33af22e1658ae6c30e54250306a08e9fe970 /frontends/php/include
parent8e34afed351eaef48e00e77f05dae2e03430a1cc (diff)
downloadzabbix-d70314f923d57cc5c623da7cd10b4eed632e851d.tar.gz
zabbix-d70314f923d57cc5c623da7cd10b4eed632e851d.tar.xz
zabbix-d70314f923d57cc5c623da7cd10b4eed632e851d.zip
- assured uniqueness of host names (Alexei)
- added upgrades/dbpatches/1.0beta7_to_1.0beta8/ with patches (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@633 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 258d9374..aa379c83 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -2271,6 +2271,14 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
return 0;
}
+ $sql="select * from hosts where host='$host'";
+ $result=DBexecute($sql);
+ if(DBnum_rows($result)>0)
+ {
+ $ERROR_MSG="Host '$host' already exists";
+ return 0;
+ }
+
if( isset($useip) && ($useip=="on") )
{
$useip=1;
@@ -2316,6 +2324,15 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
return 0;
}
+ $sql="select * from hosts where host='$host' and hostid<>$hostid";
+ $result=DBexecute($sql);
+ if(DBnum_rows($result)>0)
+ {
+ $ERROR_MSG="Host '$host' already exists";
+ return 0;
+ }
+
+
if($useip=="on")
{
$useip=1;