Code

Updated object movement.
[gosa.git] / plugins / admin / fai / tabsHook.inc
index 1a434eadd88847e4470e7b3b82e6fb4e77058078..1523398cd15e26f00a8e6664dff4baa5a8e700de 100644 (file)
@@ -4,9 +4,11 @@ class tabsHook extends tabs
 {
   var $base= "";
 
-  function tabsHook($config, $data, $dn)
+  function tabsHook($config, $data, $dn,$category)
   {
-       tabs::tabs($config, $data, $dn);
+       tabs::tabs($config, $data, $dn,$category);
+       /* Add references/acls/snapshots */
+       $this->addSpecialTabs();
   }
 
   function check()
@@ -19,7 +21,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"){
                
@@ -29,7 +35,7 @@ class tabsHook extends tabs
                if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
                        print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
                }else{
-                       $baseobject->recursive_move($this->dn, $new_dn);
+//                     $baseobject->recursive_move($this->dn, $new_dn);
                }
        }
        $this->dn= $new_dn;