Code

* Created "old" branch and moved stuff
[gosa.git] / branches / old / gosa-plugins / goto / admin / mimetypes / tabs_mimetypes.inc
1 <?php
3 class mimetabs extends tabs
4 {
5   var $parent   = FALSE;
6   var $FAIstate = "";  
8   function mimetabs($config, $data, $dn,$category)
9   {
10     tabs::tabs($config, $data, $dn,$category);
12     /* Add references/acls/snapshots */
13     $this->addSpecialTabs();
14   }
16   function set_FAIstate($state)
17   {
18     $this->FAIstate = $state;
19     foreach($this->by_name as $name => $desc){
20       $this->by_object[$name]->FAIstate = $state;
21     }
22   }
24   function save($ignore_account= FALSE)
25   {
26     $baseobject= $this->by_object['mimetype'];
28     /* Check for new 'dn', in order to propagate the
29        'dn' to all plugins */
30     if($this->parent->IsReleaseManagementActivated()){
31       $new_dn= "cn=".$baseobject->cn.",".$this->parent->mime_release;
32     }else{
33       $new_dn= "cn=".$baseobject->cn.",".get_ou('mimetypeou').$baseobject->base;
34     }
36     /* Move group? */
37     if ($this->dn != $new_dn){
39       /* Write entry on new 'dn' */
40       if ($this->dn != "new"){
41         $baseobject->move($this->dn, $new_dn);
42         $this->by_object['mimetype']= $baseobject;
43       }
45       /* Happen to use the new one */
46       $this->dn= $new_dn;
47     }
49     tabs::save();
50   }
52 }
53 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
54 ?>