Code

Updated get_ou it receives values from the config registry now.
[gosa.git] / gosa-plugins / goto / admin / devices / class_deviceGeneric.inc
index 80db75c46f807d155ed953b9d5e0484c6b9bedba..81993e1a2e27dc849553b26268feb8de091becd4 100644 (file)
@@ -56,7 +56,7 @@ class deviceGeneric extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou('deviceRDN'), '/')."/i","",$this->dn);
+      $this->base =preg_replace ("/^[^,]+,".preg_quote(get_ou("deviceGeneric", "deviceRDN") , '/')."/i","",$this->dn);
     }
     $this->orig_base = $this->base;
     $this->orig_dn   = $this->dn;
@@ -274,6 +274,18 @@ class deviceGeneric extends plugin
           "plSection"     => array("administration"),
           "plCategory"    => array("devices" => array("description"  => _("Devices"),
                                                         "objectClass"  => "gotoHotplugDevice")),
+          "plProperties" =>
+          array(
+              array(
+                  "name"          => "deviceRDN",
+                  "type"          => "rdn",
+                  "default"       => "ou=devices,",
+                  "description"   => "The 'deviceRDN' statement defines the location where new devices will be created. The default is 'ou=devices,'.",
+                  "check"         => "gosaProperty::isRdn",
+                  "migrate"       => "",
+                  "group"         => "plugin",
+                  "mandatory"     => FALSE)),
+
           "plProvidedAcls"=> array(
             "cn"            => _("Name"),
             "base"          => _("Base"),