Code

Do not post names
[gosa.git] / gosa-plugins / goto / admin / devices / tabs_devices.inc
1 <?php
3 class devicetabs extends tabs
4 {
5     var $Release= "";
7     function devicetabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE)
8     {
9         tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls);
11         /* Add references/acls/snapshots */
12         $this->addSpecialTabs();
13     }
15     function save($ignore_account= FALSE)
16     {
17         $baseobject= $this->by_object['deviceGeneric'];
18         $nAV      = preg_replace('/,/', '\,', $baseobject->cn);
19         $nAV      = preg_replace('/"/', '\"', $nAV);
20         $new_dn= "cn=".$nAV.",".get_ou("deviceGeneric", "deviceRDN").$baseobject->base;
22         /* Move group? */
23         if ($this->dn != $new_dn){
25             /* Write entry on new 'dn' */
26             if ($this->dn != "new"){
27                 $baseobject->move($this->dn, $new_dn);
28                 $this->by_object['deviceGeneric']= $baseobject;
29             }
31             /* Happen to use the new one */
32             $this->dn= $new_dn;
33         }
35         tabs::save();
36     }
38 }
39 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
40 ?>