diff --git a/gosa-plugins/goto/admin/applications/tabs_application.inc b/gosa-plugins/goto/admin/applications/tabs_application.inc
index 5b6e82989e9129b09615e9bd925f06f9a4bd92b8..bf7a311f27bc76114d6e7572b4b39ee82ffbf475 100644 (file)
class apptabs extends tabs
{
- var $Release= "";
+ var $parent = FALSE;
+ var $FAIstate = "";
- function apptabs($config, $data, $dn,$category)
+ function apptabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE)
{
- tabs::tabs($config, $data, $dn,$category);
+ tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls);
/* Add references/acls/snapshots */
$this->addSpecialTabs();
}
- function set_release($newRelease)
+ function set_FAIstate($state)
{
- $this->Release= preg_replace('/,'.get_ou('applicationou').'.*$/', '', $newRelease);
- if ($this->Release != ""){
- $this->Release= ",".$this->Release;
+ $this->FAIstate = $state;
+ foreach($this->by_name as $name => $desc){
+ $this->by_object[$name]->FAIstate = $state;
}
}
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
- $appfilter = session::get('appfilter');
- if((!empty($tmp)) && (isset($appfilter['release']))){
- if(!$baseobject->isReleaseApplikation){
- $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
- }else{
- $new_dn ="cn=".$baseobject->cn.",".$appfilter['release'];
- }
+ if($baseobject->parent->parent->IsReleaseManagementActivated()){
+ $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release;
}else{
- $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base;
}
-
- /* Move group? */
+
+ // Do we have to move the object?
if ($this->dn != $new_dn){
-
- /* Write entry on new 'dn' */
if ($this->dn != "new"){
$baseobject->move($this->dn, $new_dn);
$this->by_object['application']= $baseobject;
}
-
- /* Happen to use the new one */
$this->dn= $new_dn;
}