summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa3bdaa)
raw | patch | inline | side by side (parent: aa3bdaa)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Aug 2008 09:36:02 +0000 (09:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Aug 2008 09:36:02 +0000 (09:36 +0000) |
-Fixed empty checks.
-Fixed object creation, it wasn't possible to create new devices - no objectClasses were set.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12206 594d385d-05f5-0310-b6e9-bd551577e9d8
-Fixed object creation, it wasn't possible to create new devices - no objectClasses were set.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12206 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/devices/class_deviceGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
index e87182120b62c388b433a014680e80a5d75165de..59295598ae3bc429f7b5e9f0017d82ab9b59851a 100644 (file)
{
$message = plugin::check();
- if(empty($this->cn)||(preg_match("/[^a-z0-9]/i",$this->cn))){
+ if($this->cn == "" ||(preg_match("/[^a-z0-9]/i",$this->cn))){
$message[]= msgPool::invalid(_("Name"),$this->cn,"/^[a-z0-9]*$/i");
}
if(preg_match("/[^a-z0-9!\"?.,;:-_\(\) ]/i",$this->description)){
{
plugin::save();
- $this->attrs = array();
- $this->attrs['cn'] = $this->cn;
+ /* Unset non ldap attributes
+ */
+ foreach(array("devID","serial","vendor", "type", "description") as $name){
+ if(isset($this->attrs[$name])){
+ unset($this->attrs[$name]);
+ }
+ }
+
$this->attrs['gotoHotplugDevice'] = "";
foreach(array("description","devID","serial","vendor", "type") as $post){
$this->attrs['gotoHotplugDevice'] .= $this->$post."|";