diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index 78147cd0fa6332c23b400a2319e017b6d90e3f28..c71fa94920e3988584c1371a0642647d7e7d1145 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
/* 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);
$display.= "<td style=\"vertical-align:bottom;width:1px;\">";
/* Shorten string if its too long for the tab headers*/
- $title= '<nobr>'._($name).'</nobr>';
+ $title= _($name);
if (mb_strlen($title, 'UTF-8') > 28){
$title= mb_substr($title,0, 25, 'UTF-8')."...";
}
-
+
+ /* nobr causes w3c warnings so we use to keep the tab name in one line */
+ $title= preg_replace("/ /"," ",$title);
+
if ($_SESSION['js']==FALSE){
$display.= "<div class=\"$style[$index]\"><input type=\"submit\" name=\"$class\"".
" class=\"$style[$index]\" value=\"$title\"";