X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_tabs.inc;h=8e2d42ca4861c77d3dd7305f14edb0c3610c4ce8;hb=bb68056b0d054f62fd3ebd2addb96374faa44be8;hp=0b422970e096bb4337ba4bf2e8bb2b7928a421d2;hpb=17666efa71a03351d74fa3089faf9b137b63d479;p=gosa.git diff --git a/include/class_tabs.inc b/include/class_tabs.inc index 0b422970e..8e2d42ca4 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -38,10 +38,19 @@ class tabs /* Save dn */ $this->dn= $dn; $this->config= $config; + + $baseobject= NULL; foreach ($data as $tab){ $this->by_name[$tab['CLASS']]= $tab['NAME']; - $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn); + + if ($baseobject == NULL){ + $baseobject= new $tab['CLASS']($this->config, $this->dn); + $this->by_object[$tab['CLASS']]= $baseobject; + } else { + $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject); + } + $this->by_object[$tab['CLASS']]->parent= &$this; $this->by_object[$tab['CLASS']]->set_acl_category($acl_category); @@ -166,15 +175,8 @@ class tabs function set_acl($acl) { - /* Set local acl */ - $this->acl= $acl; - - /* Setup for all plugins */ - foreach ($this->by_object as $key => $obj){ - $sacl= get_module_permission($acl, "$key", $this->dn); - $obj->acl= $sacl; - $this->by_object[$key]= $obj; - } + /* Look for attribute in ACL */ + trigger_error("Don't use tabs::set_acl() its obsolete."); } function delete() @@ -276,20 +278,23 @@ class tabs */ function getCopyDialog() { - $ret = ""; - $this->SubDialog = false; - foreach ($this->by_object as $key => $obj){ - if($obj->is_account){ - $tmp = $this->by_object[$key]->getCopyDialog(); - if($tmp['status'] == "SubDialog"){ - $this->SubDialog = true; - return($tmp['string']); - }else{ - $ret .= $tmp['string']; - } - } - } - return($ret); + $ret = ""; + $this->SubDialog = false; + foreach ($this->by_object as $key => $obj){ + if($obj->is_account){ + $tmp = $this->by_object[$key]->getCopyDialog(); + if($tmp['status'] == "SubDialog"){ + $this->SubDialog = true; + return($tmp['string']); + }else{ + if(!empty($tmp['string'])){ + $ret .= $tmp['string']; + $ret .= "

 

"; + } + } + } + } + return($ret); } @@ -320,5 +325,5 @@ class tabs } } - +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>