From: hickert Date: Thu, 29 Jul 2010 13:54:23 +0000 (+0000) Subject: Updated object handling, special chars in obejct dns X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9e483e50603f0ea401f6fbac9d3ea81d7a718f14;p=gosa.git Updated object handling, special chars in obejct dns git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19256 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/devices/tabs_devices.inc b/gosa-plugins/goto/admin/devices/tabs_devices.inc index 518fe8469..bd0031162 100644 --- a/gosa-plugins/goto/admin/devices/tabs_devices.inc +++ b/gosa-plugins/goto/admin/devices/tabs_devices.inc @@ -2,36 +2,38 @@ class devicetabs extends tabs { - var $Release= ""; + var $Release= ""; - function devicetabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE) - { - tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls); + function devicetabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE) + { + tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls); - /* Add references/acls/snapshots */ - $this->addSpecialTabs(); - } + /* Add references/acls/snapshots */ + $this->addSpecialTabs(); + } - function save($ignore_account= FALSE) - { - $baseobject= $this->by_object['deviceGeneric']; - $new_dn= "cn=".$baseobject->cn.",".get_ou("deviceGeneric", "deviceRDN").$baseobject->base; + function save($ignore_account= FALSE) + { + $baseobject= $this->by_object['deviceGeneric']; + $nAV = preg_replace('/,/', '\,', $baseobject->cn); + $nAV = preg_replace('/"/', '\"', $nAV); + $new_dn= "cn=".$nAV.",".get_ou("deviceGeneric", "deviceRDN").$baseobject->base; - /* Move group? */ - if ($this->dn != $new_dn){ + /* Move group? */ + if ($this->dn != $new_dn){ - /* Write entry on new 'dn' */ - if ($this->dn != "new"){ - $baseobject->move($this->dn, $new_dn); - $this->by_object['deviceGeneric']= $baseobject; - } + /* Write entry on new 'dn' */ + if ($this->dn != "new"){ + $baseobject->move($this->dn, $new_dn); + $this->by_object['deviceGeneric']= $baseobject; + } - /* Happen to use the new one */ - $this->dn= $new_dn; - } + /* Happen to use the new one */ + $this->dn= $new_dn; + } - tabs::save(); - } + tabs::save(); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: