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']))){
28 if(!$baseobject->isReleaseApplikation){
29 $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
30 }else{
31 $new_dn ="cn=".$baseobject->cn.",".$_SESSION['appfilter']['release'];
32 }
33 }else{
34 $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
35 }
37 /* Move group? */
38 if ($this->dn != $new_dn){
40 /* Write entry on new 'dn' */
41 if ($this->dn != "new"){
42 $baseobject->move($this->dn, $new_dn);
43 $this->by_object['application']= $baseobject;
44 }
46 /* Happen to use the new one */
47 $this->dn= $new_dn;
48 }
50 tabs::save();
52 /* Fix tagging if needed */
53 $baseobject->handle_object_tagging();
54 }
56 }
57 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
58 ?>