From: hickert Date: Thu, 16 Sep 2010 08:48:18 +0000 (+0000) Subject: Renamed folder X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=611d6498dd4c175f46c3111fac9818f32229094b;p=gosa.git Renamed folder git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19700 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/Device/Device.tpl b/gosa-plugins/goto/admin/systems/goto/Device/Device.tpl new file mode 100644 index 000000000..3a99b999f --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/Device.tpl @@ -0,0 +1,77 @@ + + + + + + + +
+ +

{t}Device{/t}

+ + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

{t}Registered device{/t}

+ + + + + + + + + + + + + +
+ +
+

{t}Network settings{/t}

+ + + + + + + + + +
+
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc new file mode 100644 index 000000000..baaa24bca --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/DeviceTab.inc @@ -0,0 +1,31 @@ +by_object['Device']; + $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/Device/class_Device.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc new file mode 100644 index 000000000..19be8bf87 --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc @@ -0,0 +1,115 @@ + array('macAddress'), + 'registeredDevice' => array('deviceStatus','deviceUUID','manager','deviceType'), + 'ipHost' => array('ipHostNumber')); + + public $cn = ""; + public $serialNumber = ""; + public $seeAlso = ""; + public $owner = ""; + public $ou = ""; + public $o = ""; + public $l = ""; + public $description = ""; + public $manager = ""; + public $deviceUUID = ""; + public $deviceStatus = ""; + public $deviceType = ""; + public $ipHostNumber = ""; + public $macAddress = ""; + + public $base = ""; + public $orig_dn =""; + + function __construct(&$config, $dn) + { + plugin::plugin($config, $dn); + $this->base = $this->config->current['BASE']; + $this->orig_dn = $this->dn; + } + + function execute() + { + plugin::execute(); + $smarty = get_smarty(); + foreach($this->attributes as $attr){ + $smarty->assign($attr, $this->$attr); + } + return($smarty->fetch(get_template_path('goto/devices/Device.tpl', TRUE))); + } + + + function save() + { + + plugin::save(); + + // Append and remove dynmic object classes + foreach($this->dynClasses as $oc => $attrs){ + $this->attrs['objectClass'] = array_remove_entries(array($oc), $this->attrs['objectClass']); + foreach($attrs as $attr){ + if(isset($this->attrs[$attr]) && !empty($this->attrs[$attr])){ + $this->attrs['objectClass'][] = $oc; + break; + } + } + } + + $this->cleanup(); + $ldap=$this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->cd($this->dn); + + if($this->initially_was_account){ + $ldap->modify($this->attrs); + }else{ + $ldap->add($this->attrs); + } + echo $ldap->get_error(); + } + + + static function plInfo() + { + return (array( + "plShortName" => _("Device"), + "plDescription" => _("Device"), + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 1, + "plSection" => array("administration"), + "plCategory" => array( + "Device" => array( + "description" => _("Device"), + "objectClass" => "Device")), + "plProvidedAcls" => array( + "cn" => _("Name"), + "serialNumber" => _("Serial number"), + "seeAlso" => _("See also"), + "owner" => _("Owner"), + "ou" => _("Organizational unit"), + "o" => _("Organization"), + "l" => _("Location"), + "description" => _("Description"), + "manager" => _("Manager"), + "deviceUUID" => _("Uuid"), + "deviceStatus" => _("Stauts"), + "macAddress" => _("MAC address"), + "ipHostNumber" => _("IP address") + ) + ) + ); + } +} + +?> diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_installRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_installRecipe.inc new file mode 100644 index 000000000..ba0dcd51d --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_installRecipe.inc @@ -0,0 +1,81 @@ +attributes as $attr){ + $smarty->assign($attr, $this->$attr); + } + return($smarty->fetch(get_template_path('goto/devices/installRecipe.tpl', TRUE))); + } + + + function save() + { + plugin::save(); + $this->cleanup(); + $ldap=$this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->cd($this->dn); + $ldap->modify($this->attrs); + echo $ldap->get_error(); + } + + static function plInfo() + { + return (array( + "plShortName" => _("Device"), + "plDescription" => _("Registered device"), + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 1, + "plSection" => array("administration"), + "plCategory" => array("registeredDevice"), + "plProvidedAcls" => array( + "member" => _("Member"), + "ksTemplate" => _("Template"), + "ksKeyboardlayout" => _("Keyboard layout"), + "ksSystemLocale" => _("System locale"), + "ksTimezone" => _("Timezone"), + "ksTimeUTC" => _("Time"), + "ksNTPServer" => _("NTP-Server"), + "ksMirror" => _("Kickstart mirror"), + "ksMirrorTorrent" => _("Kickstart torrent mirror"), + "ksRootEnabled" => _("Root login enabled"), + "ksRootPasswordHash" => _("Root password hash"), + "ksKernelPackage" => _("Kernal package"), + "ksPartitionTable" => _("Partition table") + ) + ) + ); + } +} + +?> diff --git a/gosa-plugins/goto/admin/systems/goto/Device/installRecipe.tpl b/gosa-plugins/goto/admin/systems/goto/Device/installRecipe.tpl new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Device/installRecipe.tpl @@ -0,0 +1 @@ +test diff --git a/gosa-plugins/goto/admin/systems/goto/devices/Device.tpl b/gosa-plugins/goto/admin/systems/goto/devices/Device.tpl deleted file mode 100644 index 3a99b999f..000000000 --- a/gosa-plugins/goto/admin/systems/goto/devices/Device.tpl +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - -
- -

{t}Device{/t}

- - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

{t}Registered device{/t}

- - - - - - - - - - - - - -
- -
-

{t}Network settings{/t}

- - - - - - - - - -
-
diff --git a/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc b/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc deleted file mode 100644 index baaa24bca..000000000 --- a/gosa-plugins/goto/admin/systems/goto/devices/DeviceTab.inc +++ /dev/null @@ -1,31 +0,0 @@ -by_object['Device']; - $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 deleted file mode 100644 index 19be8bf87..000000000 --- a/gosa-plugins/goto/admin/systems/goto/devices/class_Device.inc +++ /dev/null @@ -1,115 +0,0 @@ - array('macAddress'), - 'registeredDevice' => array('deviceStatus','deviceUUID','manager','deviceType'), - 'ipHost' => array('ipHostNumber')); - - public $cn = ""; - public $serialNumber = ""; - public $seeAlso = ""; - public $owner = ""; - public $ou = ""; - public $o = ""; - public $l = ""; - public $description = ""; - public $manager = ""; - public $deviceUUID = ""; - public $deviceStatus = ""; - public $deviceType = ""; - public $ipHostNumber = ""; - public $macAddress = ""; - - public $base = ""; - public $orig_dn =""; - - function __construct(&$config, $dn) - { - plugin::plugin($config, $dn); - $this->base = $this->config->current['BASE']; - $this->orig_dn = $this->dn; - } - - function execute() - { - plugin::execute(); - $smarty = get_smarty(); - foreach($this->attributes as $attr){ - $smarty->assign($attr, $this->$attr); - } - return($smarty->fetch(get_template_path('goto/devices/Device.tpl', TRUE))); - } - - - function save() - { - - plugin::save(); - - // Append and remove dynmic object classes - foreach($this->dynClasses as $oc => $attrs){ - $this->attrs['objectClass'] = array_remove_entries(array($oc), $this->attrs['objectClass']); - foreach($attrs as $attr){ - if(isset($this->attrs[$attr]) && !empty($this->attrs[$attr])){ - $this->attrs['objectClass'][] = $oc; - break; - } - } - } - - $this->cleanup(); - $ldap=$this->config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - $ldap->cd($this->dn); - - if($this->initially_was_account){ - $ldap->modify($this->attrs); - }else{ - $ldap->add($this->attrs); - } - echo $ldap->get_error(); - } - - - static function plInfo() - { - return (array( - "plShortName" => _("Device"), - "plDescription" => _("Device"), - "plSelfModify" => FALSE, - "plDepends" => array(), - "plPriority" => 1, - "plSection" => array("administration"), - "plCategory" => array( - "Device" => array( - "description" => _("Device"), - "objectClass" => "Device")), - "plProvidedAcls" => array( - "cn" => _("Name"), - "serialNumber" => _("Serial number"), - "seeAlso" => _("See also"), - "owner" => _("Owner"), - "ou" => _("Organizational unit"), - "o" => _("Organization"), - "l" => _("Location"), - "description" => _("Description"), - "manager" => _("Manager"), - "deviceUUID" => _("Uuid"), - "deviceStatus" => _("Stauts"), - "macAddress" => _("MAC address"), - "ipHostNumber" => _("IP address") - ) - ) - ); - } -} - -?> diff --git a/gosa-plugins/goto/admin/systems/goto/devices/class_installRecipe.inc b/gosa-plugins/goto/admin/systems/goto/devices/class_installRecipe.inc deleted file mode 100644 index ba0dcd51d..000000000 --- a/gosa-plugins/goto/admin/systems/goto/devices/class_installRecipe.inc +++ /dev/null @@ -1,81 +0,0 @@ -attributes as $attr){ - $smarty->assign($attr, $this->$attr); - } - return($smarty->fetch(get_template_path('goto/devices/installRecipe.tpl', TRUE))); - } - - - function save() - { - plugin::save(); - $this->cleanup(); - $ldap=$this->config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - $ldap->cd($this->dn); - $ldap->modify($this->attrs); - echo $ldap->get_error(); - } - - static function plInfo() - { - return (array( - "plShortName" => _("Device"), - "plDescription" => _("Registered device"), - "plSelfModify" => FALSE, - "plDepends" => array(), - "plPriority" => 1, - "plSection" => array("administration"), - "plCategory" => array("registeredDevice"), - "plProvidedAcls" => array( - "member" => _("Member"), - "ksTemplate" => _("Template"), - "ksKeyboardlayout" => _("Keyboard layout"), - "ksSystemLocale" => _("System locale"), - "ksTimezone" => _("Timezone"), - "ksTimeUTC" => _("Time"), - "ksNTPServer" => _("NTP-Server"), - "ksMirror" => _("Kickstart mirror"), - "ksMirrorTorrent" => _("Kickstart torrent mirror"), - "ksRootEnabled" => _("Root login enabled"), - "ksRootPasswordHash" => _("Root password hash"), - "ksKernelPackage" => _("Kernal package"), - "ksPartitionTable" => _("Partition table") - ) - ) - ); - } -} - -?> diff --git a/gosa-plugins/goto/admin/systems/goto/devices/installRecipe.tpl b/gosa-plugins/goto/admin/systems/goto/devices/installRecipe.tpl deleted file mode 100644 index 9daeafb98..000000000 --- a/gosa-plugins/goto/admin/systems/goto/devices/installRecipe.tpl +++ /dev/null @@ -1 +0,0 @@ -test