summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c70415b)
raw | patch | inline | side by side (parent: c70415b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 11:27:51 +0000 (11:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 17 Sep 2010 11:27:51 +0000 (11:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19752 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc
index baaa24bcaa173a1422690a82a43c82b998a5b944..50fdafe6760014084a253bea279462652447f212 100644 (file)
{
// Prepare object DN
$baseobject= $this->by_object['Device'];
- $cn = preg_replace('/,/', '\,', $baseobject->cn);
- $cn = preg_replace('/"/', '\"', $cn);
- $this->dn= "cn=".$cn.",ou=systems,".$baseobject->base;
+ $uuid = preg_replace('/,/', '\,', $baseobject->deviceUUID);
+
+ if(empty($uuid)){
+ $cn = preg_replace('/,/', '\,', $baseobject->cn);
+ $cn = preg_replace('/"/', '\"', $cn);
+ $this->dn= "cn=".$cn.",ou=systems,".$baseobject->base;
+ }else{
+ $this->dn= "deviceUUID=".$uuid.",ou=systems,".$baseobject->base;
+ }
$baseobject->dn= $this->dn;
// Object moved?
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc
index 04b08f6883c14d39cb2ec8e5663e3d3fa141ee4e..ccbc6a7a75d29f133657080e52091aad6245f133 100644 (file)
}
}
}
+
+ // Check ip-address
+ if (!empty($this->ipHostNumber) && !tests::is_ip($this->ipHostNumber)){
+ $message[]= msgPool::invalid(_("IP address"), "", "", "192.168.1.10");
+ }
+
+ // Check mac-address
+ if (!empty($this->ipHostNumber) && !tests::is_ip($this->macAddress)){
+ $message[]= msgPool::invalid(_("MAC address"), "", "", "00:0C:7F:31:33:F1");
+ }
return($message);
}