Code

Some changes
[gosa.git] / plugins / admin / fai / tabsTemplate.inc
index 98be6054ef18b578328ec2097e6da358c0bae263..1363b09bc873bb5612f81e65cde9209046490e29 100644 (file)
@@ -19,13 +19,12 @@ class tabsTemplate extends tabs
   {
        $baseobject= $this->by_object['faiTemplate'];
        
-       $branch = "";
+       $new_dn= 'cn='.$baseobject->cn.",ou=templates,ou=fai,ou=configs,ou=systems,".$_SESSION['faifilter']['base'];
+
        if($_SESSION['faifilter']['branch']!="main"){
-               $branch = "ou=".$_SESSION['faifilter']['branch'].",";
+               $new_dn ='cn='.$baseobject->cn.",ou=templates,".$_SESSION['faifilter']['branch'];
        }
-                                            
-       $new_dn= 'cn='.$baseobject->cn.",ou=templates,".$branch."ou=fai,ou=configs,ou=systems,".$_SESSION['faifilter']['base'];
-       
+
        if ($this->dn != $new_dn && $this->dn != "new"){
                
                /* if( new_dn is subtree of this->dn ) */