diff --git a/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc b/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc
index 740eb25c0b3a537a21383f2a61d1db71034211ac..c285290fee4a29641930efdcfd23095bc9c6ab45 100644 (file)
if(isset($this->by_object['ogroup']->objcache[$dn])){
$obj = $this->by_object['ogroup']->objcache[$dn];
if(isset($obj['objectClass'])){
- if(in_array("goFonAccount",$obj['objectClass'])){
+ if(in_array_strict("goFonAccount",$obj['objectClass'])){
$usePhoneTab = true;
}
}
$this->remove('mailogroup');
}
}
+ if(class_available("GroupwareDistributionList")){
+ if(!preg_match("/U/",$objects) && isset($this->by_object['GroupwareDistributionList'])){
+ $this->remove('GroupwareDistributionList');
+ }
+ }
/* Remove terminal group, if theres no terminal left in the object list
*/
if(isset($this->by_object['ogroup']->objcache[$dn])){
$obj = $this->by_object['ogroup']->objcache[$dn];
if(isset($obj['objectClass'])){
- if(in_array("goFonAccount",$obj['objectClass'])){
+ if(in_array_strict("goFonAccount",$obj['objectClass'])){
$this->by_name['phonequeue']= _("Phone queue");
$this->by_object['phonequeue']= new phonequeue($this->config, $this->dn);
$this->by_object['phonequeue']->parent= &$this;
}
}
}
+ if(class_available("GroupwareDistributionList")){
+ if((preg_match("/U/",$objects))&&(!isset($this->by_object['GroupwareDistributionList']))){
+ $this->by_name['GroupwareDistributionList']= _("Groupware");
+ $this->by_object['GroupwareDistributionList']= new GroupwareDistributionList($this->config, $this->dn);
+ $this->by_object['GroupwareDistributionList']->parent= &$this;
+ $this->add('GroupwareDistributionList');
+ }
+ }
/* Add Terminal tab */
if(class_available("termgroup")){
$this->dn= 'cn='.$baseobject->cn.','.get_ou("group", "ogroupRDN").$baseobject->base;
}
- /* Only delete attributes if there are members left */
- if (count($this->by_object['ogroup']->memberList) != 0) {
- foreach(array_keys($this->to_remove) as $object) {
- $this->to_remove[$object]->remove_from_parent();
- }
+ foreach(array_keys($this->to_remove) as $object) {
+ $this->to_remove[$object]->remove_from_parent();
}
tabs::save();
}