Code

Added navigation gray out if option is not available
[gosa.git] / plugins / gofon / macro / tabs_macros.inc
1 <?php
3 class macrotabs extends tabs
4 {
6   function macrotabs($config, $data, $dn)
7   {
8         tabs::tabs($config, $data, $dn);
9   }
11   function save()
12   {
13         $baseobject= $this->by_object['macro'];
15         /* Check for new 'dn', in order to propagate the
16            'dn' to all plugins */
17         $new_dn= "cn=".$baseobject->cn.",ou=macros,ou=asterisk,ou=configs,ou=systems,".$baseobject->base;
19         /* Move group? */
20         if ($this->dn != $new_dn){
22                 /* Write entry on new 'dn' */
23                 if ($this->dn != "new"){
24                         $baseobject->move($this->dn, $new_dn);
25                         $this->by_object['macro']= $baseobject;
26                 }
28                 /* Happen to use the new one */
29                 $this->dn= $new_dn;
30         }
31                 
32         tabs::save();
33   }
35 }
37 ?>