1 <?php
3 class ogrouptabs extends tabs
4 {
5 var $base= "";
7 function ogrouptabs($config, $data, $dn)
8 {
9 tabs::tabs($config, $data, $dn);
10 $this->base= $this->by_object['ogroup']->base;
12 /* Insert extra tabs for several object types - if present */
13 $objects= preg_replace('/[\[\]]/', '', $this->by_object['ogroup']->gosaGroupObjects);
14 for ($n= 0; $n<strlen($objects); $n++){
15 switch ($objects[$n]){
16 case "T":
17 /* Add a terminal tab */
18 require_once("class_termgroup.inc");
19 $this->by_name['termgroup']= _("Terminals");
20 $this->by_object['termgroup']= new termgroup($this->config, $this->dn);
21 $this->by_object['termgroup']->parent= &$this;
23 break;
24 }
25 }
26 }
28 function check()
29 {
30 return (tabs::check(TRUE));
31 }
34 function save()
35 {
36 $baseobject= $this->by_object['ogroup'];
38 /* Check for new 'dn', in order to propagate the
39 'dn' to all plugins */
40 $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
42 /* Move group? */
43 if ($this->dn != $new_dn){
45 /* Write entry on new 'dn' */
46 if ($this->dn != "new"){
47 $baseobject->move($this->dn, $new_dn);
48 $this->by_object['ogroup']= $baseobject;
49 }
51 /* Happen to use the new one */
52 $this->dn= $new_dn;
53 }
55 if ($this->dn == "new"){
56 $this->dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
57 }
58 tabs::save(TRUE);
59 }
61 }
63 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
64 ?>