Code

Fixed department list
[gosa.git] / plugins / admin / fai / tabsHook.inc
index 1a434eadd88847e4470e7b3b82e6fb4e77058078..c16313fe22f23de96f3554959d8533c68e7f7293 100644 (file)
@@ -19,7 +19,11 @@ class tabsHook extends tabs
   {
        $baseobject= $this->by_object['faiHook'];
 
-       $new_dn= 'cn='.$baseobject->cn.",ou=hooks,ou=fai,ou=configs,ou=systems,".$_SESSION['faifilter']['base'];
+       $new_dn= 'cn='.$baseobject->cn.",ou=hooks,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
+       
+       if($_SESSION['faifilter']['branch']!="main"){
+               $new_dn ='cn='.$baseobject->cn.",ou=hooks,".$_SESSION['faifilter']['branch'];
+       }
 
        if ($this->dn != $new_dn && $this->dn != "new"){