From b4f2eb3fbb6c50d8c9338e5202fb5be36ce0d710 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 31 Aug 2005 13:15:21 +0000 Subject: [PATCH] Added check for duplicates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1273 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/environment/class_hotplugDialog.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/personal/environment/class_hotplugDialog.inc b/plugins/personal/environment/class_hotplugDialog.inc index 1bc4ed264..63ad92877 100644 --- a/plugins/personal/environment/class_hotplugDialog.inc +++ b/plugins/personal/environment/class_hotplugDialog.inc @@ -114,6 +114,13 @@ class hotplugDialog extends plugin if((empty($this->HOT_id))||(preg_match("/[\|]/i",$this->HOT_id))){ $message[]=_("Please specify a valid id."); } + + $ldap = $this->config->get_ldap_link(); + $ldap->search("(&(objectClass=gotoEnvironment)(gotoHotplugDevice=".$this->HOT_name."*))"); + if($ldap->count()){ + $message[]=_("An Entry with this name already exists."); + } + }else{ if((!isset($_POST['hotplugName']))||(empty($_POST['hotplugName']))){ $message[] = _("Please select an entry or press cancel."); -- 2.30.2