Code

Renamed classes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Sep 2010 08:27:38 +0000 (08:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 16 Sep 2010 08:27:38 +0000 (08:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19696 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc [new file with mode: 0644]
gosa-plugins/goto/admin/systems/goto/devices/class_Device.inc
gosa-plugins/goto/admin/systems/goto/devices/registeredDeviceTab.inc [deleted file]

diff --git a/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc
new file mode 100644 (file)
index 0000000..fa902b0
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+
+class registeredDeviceTab extends tabs
+{
+
+    
+    
+    function save($ignore_account= FALSE)
+    {
+        // Prepare object DN
+        $baseobject= $this->by_object['registeredDevice'];
+        $cn      = preg_replace('/,/', '\,', $baseobject->cn);
+        $cn      = preg_replace('/"/', '\"', $cn);
+        $this->dn= "cn=".$cn.",ou=systems,".$baseobject->base;
+        $baseobject->dn= $this->dn;
+
+        // Object moved?
+        if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
+            $baseobject->update_acls($baseobject->orig_dn,$this->dn);
+            $baseobject->move($baseobject->orig_dn,$this->dn);
+        }
+
+        // Populate values 
+        foreach ($this->by_object as $key => $obj){
+            $this->by_object[$key]->dn= $this->dn;
+            $this->by_object[$key]->cn= $baseobject->cn;
+        }
+
+        // Save now
+        tabs::save(TRUE);
+    }
+}
+
+?>
index c295d888ead6276621c407716d08061802302ca5..4c2014102403e79f4e05ee32e8e8d40af2e715de 100644 (file)
@@ -1,15 +1,16 @@
 <?php
 
 
-class registeredDevice extends plugin
+class Device extends plugin
 {
 
-    public $objectclasses = array('top','device','registeredDevice');
+    public $objectclasses = array('top','device');
     public $attributes = array("cn","serialNumber","seeAlso","owner","ou","o","ipHostNumber",
             "l","description","manager","deviceUUID","deviceStatus","macAddress",);
 
     public $dynClasses = array(
             'ieee802Device' => array('macAddress'),
+            'registeredDevice' => array('deviceStatus','deviceUUID'),
             'ipHost' => array('ipHostNumber'));
 
     public $cn = "";
@@ -44,7 +45,7 @@ class registeredDevice extends plugin
         foreach($this->attributes as $attr){
             $smarty->assign($attr, $this->$attr);
         }
-        return($smarty->fetch(get_template_path('goto/devices/registeredDevice.tpl', TRUE)));
+        return($smarty->fetch(get_template_path('goto/devices/Device.tpl', TRUE)));
     }
 
 
@@ -82,14 +83,15 @@ class registeredDevice extends plugin
     {
         return (array(
                     "plShortName"   => _("Device"),
-                    "plDescription" => _("Registered device"),
+                    "plDescription" => _("Device"),
                     "plSelfModify"  => FALSE,
                     "plDepends"     => array(),
                     "plPriority"    => 1,
                     "plSection"     => array("administration"),
                     "plCategory"    => array(
-                        "registeredDevice" => array( "description"  => _("Registered device"),
-                            "objectClass"  => "registeredDevice")),
+                        "Device" => array( 
+                            "description"  => _("Device"),
+                            "objectClass"  => "Device")),
                     "plProvidedAcls" => array(
                         "cn" => _("Name"),
                         "serialNumber" => _("Serial number"),
diff --git a/gosa-plugins/goto/admin/systems/goto/devices/registeredDeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/devices/registeredDeviceTab.inc
deleted file mode 100644 (file)
index fa902b0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-class registeredDeviceTab extends tabs
-{
-
-    
-    
-    function save($ignore_account= FALSE)
-    {
-        // Prepare object DN
-        $baseobject= $this->by_object['registeredDevice'];
-        $cn      = preg_replace('/,/', '\,', $baseobject->cn);
-        $cn      = preg_replace('/"/', '\"', $cn);
-        $this->dn= "cn=".$cn.",ou=systems,".$baseobject->base;
-        $baseobject->dn= $this->dn;
-
-        // Object moved?
-        if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
-            $baseobject->update_acls($baseobject->orig_dn,$this->dn);
-            $baseobject->move($baseobject->orig_dn,$this->dn);
-        }
-
-        // Populate values 
-        foreach ($this->by_object as $key => $obj){
-            $this->by_object[$key]->dn= $this->dn;
-            $this->by_object[$key]->cn= $baseobject->cn;
-        }
-
-        // Save now
-        tabs::save(TRUE);
-    }
-}
-
-?>