Code

Updated device RDN to GOsaDeviceRDN
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jul 2011 13:47:58 +0000 (13:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jul 2011 13:47:58 +0000 (13:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20934 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc
gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc
gosa-plugins/goto/admin/systems/goto/migration/class_migrate_GOsaDeviceRDN.inc [new file with mode: 0644]

index b80756eeccb9088aebb1e579e1116d6f6ac4e7d1..0378c561714b48df2a06a5e17cec8eb7a1a51bbb 100644 (file)
@@ -10,7 +10,7 @@ class DeviceTab extends tabs
         $orig_uuid = $baseobject->orig_deviceUUID;
 
 
-        $rdn = get_ou('Device','DeviceRDN');
+        $rdn = get_ou('Device','GOsaDeviceRDN');
         $cn      = preg_replace('/,/', '\,', $baseobject->cn);
         $cn      = preg_replace('/"/', '\"', $cn);
 
index 2d3dca35e0c77d2ef7212ca80d31e410f2cc2f3a..c2b102cd53d83502d79d67e9bdd6e5da73bbd753 100644 (file)
@@ -49,7 +49,7 @@ class Device extends plugin
             $ui= get_userinfo();
             $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
         } else {
-            $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("Device", "DeviceRDN"), '/')."/i", "", $this->dn);
+            $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("Device", "GOsaDeviceRDN"), '/')."/i", "", $this->dn);
         }
 
         // Prepare the base selector
@@ -307,12 +307,12 @@ class Device extends plugin
             "plProperties" =>
                 array(
                         array(
-                            "name"          => "DeviceRDN",
+                            "name"          => "GOsaDeviceRDN",
                             "type"          => "rdn",
                             "default"       => "ou=devices,ou=systems,",
                             "description"   => _("RDN for device storage."),
                             "check"         => "gosaProperty::isRdn",
-                            "migrate"       => "migrate_deviceRDN",
+                            "migrate"       => "migrate_GOsaDeviceRDN",
                             "group"         => "plugin",
                             "mandatory"     => FALSE
                             ),
diff --git a/gosa-plugins/goto/admin/systems/goto/migration/class_migrate_GOsaDeviceRDN.inc b/gosa-plugins/goto/admin/systems/goto/migration/class_migrate_GOsaDeviceRDN.inc
new file mode 100644 (file)
index 0000000..b82e0e0
--- /dev/null
@@ -0,0 +1,6 @@
+<?php 
+class migrate_GOsaDeviceRDN extends migrateRDN implements propertyMigration
+{
+       protected $filter = "(&(objectClass=device)%s)";
+}
+?>