Code

Updated system acls
[gosa.git] / plugins / admin / applications / tabs_application.inc
1 <?php
3 class apptabs extends tabs
4 {
5   var $Release= "";
7   function apptabs($config, $data, $dn)
8   {
9     tabs::tabs($config, $data, $dn);
10   }
12   function set_release($newRelease)
13   {
14     $this->Release= preg_replace('/,ou=apps,.*$/', '', $newRelease);
15     if ($this->Release != ""){
16       $this->Release= ",".$this->Release;
17     }
18   }
20   function save()
21   {
22     $baseobject= $this->by_object['application'];
24     /* Check for new 'dn', in order to propagate the
25        'dn' to all plugins */
26     $tmp = search_config($this->config->data,"faiManagement","CLASS");
27     if((!empty($tmp)) && (isset($_SESSION['appfilter']['release'])) && ($baseobject->isReleaseApplikation) && $_SESSION['appfilter']['release'] != "main"){
28       $new_dn ="cn=".$baseobject->cn.",".$_SESSION['appfilter']['release'];
29     }else{
30       $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
31     }
33     /* Move group? */
34     if ($this->dn != $new_dn){
36       /* Write entry on new 'dn' */
37       if ($this->dn != "new"){
38         $baseobject->move($this->dn, $new_dn);
39         $this->by_object['application']= $baseobject;
40       }
42       /* Happen to use the new one */
43       $this->dn= $new_dn;
44     }
46     tabs::save();
48     /* Fix tagging if needed */
49     $baseobject->dn= $this->dn;
50     $baseobject->handle_object_tagging();
51   }
53 }
54 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
55 ?>