diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
index 6ce15fb9cb99868159b8b91bcceb354db1c57709..a92a9cbb7d7295c5e3857d5177064f7049e1ebf6 100644 (file)
$this->is_account = TRUE;
$this->types= array("camera" => _("Digital camera"),
- "harddisk" => _("Harddisk"),
- "stick" => _("USB stick"),
- "cd" => _("CD/DVD drive"),);
+ "disc" => _("USB stick"),
+ "cdrom" => _("CD/DVD drive"),);
asort($this->types);
/* Set class values */
$message[]= msgPool::invalid(_("Serial"),"","","0x1234");
}
if(empty($this->vendor) || !$this->is_2byteHex($this->vendor)){
- $message[]= msgPool::invalid(_("Vender ID"),"","","0x1234");
+ $message[]= msgPool::invalid(_("Vendor ID"),"","","0x1234");
}
/* Check if entry already exists */
$ldap = $this->config->get_ldap_link();
$ldap->search("(&(objectClass=gotoDevice)(cn=".$this->cn."*))",array("cn"));
if($ldap->count()){
- $message[]= msgPool::duplicate(_("Name"));
+ $message[]= msgPool::duplicated(_("Name"));
}
}
$ldap->search("(&(objectClass=gotoEnvironment)(gotoHotplugDeviceDN=".$this->dn."))",array("cn","gotoHotplugDeviceDN"));
$skip = FALSE;
- $str ="";
- $cnt = 3;
- while($cnt && $attrs = $ldap->fetch()){
+ $obj = array();
+ while($attrs = $ldap->fetch()){
+ $obj[$ldap->getDN()]= $attrs['cn'][0];
$skip =TRUE;
- $str .= $attrs['cn'][0].", ";
- $cnt --;
}
if($skip){
- $str = preg_replace("/, $/","",$str);
- if($cnt == 0){
- $str .= "...";
- }
- print_red(sprintf(_("Can't remove the device '%s' it is still in use be this user(s) : %s"),$this->cn,$str));
+ msg_dialog::display(_("Error"), msgPool::stillInUse(_("Device"), $obj), INFO_DIALOG);
}else{
$ldap->rmdir_recursive($this->dn);
}