diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index c7be1b78462ceddbb2109e8db8c5609e1a66559b..f75847a3a54503f521f7b2ad5f7833bfb18a799e 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
var $by_object= array();
var $SubDialog = false;
var $by_object= array();
var $SubDialog = false;
- var $multiple_entries = FALSE;
-
function tabs(&$config, $data, $dn, $acl_category= "")
{
/* Save dn */
function tabs(&$config, $data, $dn, $acl_category= "")
{
/* Save dn */
$baseobject= NULL;
$baseobject= NULL;
- /* Check specified dn
- */
- if(is_string($dn)){
-
- }elseif(is_array($dn)&&count($dn) == 1){
- $this->dn = $dn[key($dn)];
- }elseif(is_array($dn)&&count($dn) > 1){
- $this->multiple_entries = TRUE;
- }
-
-
foreach ($data as &$tab){
foreach ($data as &$tab){
-
- /* Check we want to handle multiple obejcts at once
- * and if this is supported by enabled plugins
- */
- $tmp = get_class_vars($tab['CLASS']);
- if($this->multiple_entries && !$tmp['multiple_support']){
- continue;
- }
-
$this->by_name[$tab['CLASS']]= $tab['NAME'];
if ($baseobject === NULL){
$this->by_name[$tab['CLASS']]= $tab['NAME'];
if ($baseobject === NULL){
$this->current= $tab['CLASS'];
}
}
$this->current= $tab['CLASS'];
}
}
+ }
+
+
+ function multiple_support_available()
+ {
+ foreach($this->by_object as $name => $obj){
+ if($obj->multiple_support){
+ return(TRUE);
+ }
+ }
+ return(FALSE);
+ }
- /* Return false if tabs */
- if(!count($this->by_object)){
+ function enable_multiple_support()
+ {
+ if(!$this->multiple_support_available()){
return(FALSE);
return(FALSE);
+ }else{
+ foreach($this->by_object as $name => $obj){
+ if($obj->multiple_support){
+ $this->by_object[$name]->multiple_support_active = TRUE;
+ }else{
+ unset($this->by_object[$name]);
+ unset($this->by_name[$name]);
+ }
+ }
}
}
+ return(TRUE);
}
}
+
function execute()
{
/* Rotate current to last */
function execute()
{
/* Rotate current to last */
$title= preg_replace("/ /"," ",$title);
/* Take care about notifications */
$title= preg_replace("/ /"," ",$title);
/* Take care about notifications */
- if ($this->by_object[$class]->pl_notify){
+ $obj = $this->by_object[$class];
+ if ( $this->by_object[$class]->pl_notify && ($obj->is_account || $obj->ignore_account)){
$notify= "id=\"notify\"";
} else {
$notify= "";
$notify= "id=\"notify\"";
} else {
$notify= "";
function addSpecialTabs()
{
function addSpecialTabs()
{
- if(!is_array($this->dn)){
- $this->by_name['acl']= _("ACL");
- $this->by_object['acl']= new acl($this->config, $this, $this->dn);
- $this->by_object['acl']->parent= &$this;
- $this->by_name['reference']= _("References");
- $this->by_object['reference']= new reference($this->config, $this->dn);
- $this->by_object['reference']->parent= &$this;
- }
+ $this->by_name['acl']= _("ACL");
+ $this->by_object['acl']= new acl($this->config, $this, $this->dn);
+ $this->by_object['acl']->parent= &$this;
+ $this->by_name['reference']= _("References");
+ $this->by_object['reference']= new reference($this->config, $this->dn);
+ $this->by_object['reference']->parent= &$this;
}
}