summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b589f33)
raw | patch | inline | side by side (parent: b589f33)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 16 Sep 2010 08:27:38 +0000 (08:27 +0000) | ||
committer | hickert <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] | patch | blob |
gosa-plugins/goto/admin/systems/goto/devices/class_Device.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/devices/registeredDeviceTab.inc | [deleted file] | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc
--- /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);
+ }
+}
+
+?>
diff --git a/gosa-plugins/goto/admin/systems/goto/devices/class_Device.inc b/gosa-plugins/goto/admin/systems/goto/devices/class_Device.inc
index c295d888ead6276621c407716d08061802302ca5..4c2014102403e79f4e05ee32e8e8d40af2e715de 100644 (file)
<?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 = "";
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)));
}
{
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
+++ /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);
- }
-}
-
-?>