1 <?php
3 class apptabs extends tabs
4 {
5 var $Release= "";
7 function apptabs($config, $data, $dn)
8 {
9 tabs::tabs($config, $data, $dn);
11 /* Add references/acls/snapshots */
12 $this->addSpecialTabs();
13 }
15 function set_release($newRelease)
16 {
17 $this->Release= preg_replace('/,ou=apps,.*$/', '', $newRelease);
18 if ($this->Release != ""){
19 $this->Release= ",".$this->Release;
20 }
21 }
23 function save()
24 {
25 $baseobject= $this->by_object['application'];
27 /* Check for new 'dn', in order to propagate the
28 'dn' to all plugins */
29 $tmp = search_config($this->config->data,"faiManagement","CLASS");
30 if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){
31 if(!$baseobject->isReleaseApplikation){
32 $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
33 }else{
34 $new_dn ="cn=".$baseobject->cn.",".$_SESSION['appfilter']['release'];
35 }
36 }else{
37 $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
38 }
40 /* Move group? */
41 if ($this->dn != $new_dn){
43 /* Write entry on new 'dn' */
44 if ($this->dn != "new"){
45 $baseobject->move($this->dn, $new_dn);
46 $this->by_object['application']= $baseobject;
47 }
49 /* Happen to use the new one */
50 $this->dn= $new_dn;
51 }
53 tabs::save();
55 /* Fix tagging if needed */
56 $baseobject->dn= $this->dn;
57 $baseobject->handle_object_tagging();
58 }
60 }
61 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
62 ?>