Code

Updated the device tab
[gosa.git] / gosa-plugins / goto / admin / applications / tabs_application.inc
1 <?php
3 class apptabs extends tabs
4 {
5   var $parent   = FALSE;
6   var $FAIstate = "";
8   function apptabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE)
9   {
10     tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls);
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['application'];
27     $cn      = preg_replace('/,/', '\,', $baseobject->cn); 
28     $cn      = preg_replace('/"/', '\"', $cn); 
30     /* Check for new 'dn', in order to propagate the
31        'dn' to all plugins */
32     if($baseobject->parent->parent->IsReleaseManagementActivated()){
33       $new_dn= "cn=".$cn.",".$baseobject->parent->parent->app_release;
34     }else{
35       $new_dn= "cn=".$cn.",".get_ou("application", "applicationRDN").$baseobject->base;
36     }
37     
38     // Do we have to move the object?
39     if ($this->dn != $new_dn){
40       if ($this->dn != "new"){
41         $baseobject->move($this->dn, $new_dn);
42         $this->by_object['application']= $baseobject;
43       }
44       $this->dn= $new_dn;
45     }
47     tabs::save();
48   }
50 }
51 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
52 ?>