Code

Updated FAI template entry.
[gosa.git] / gosa-plugins / fai / admin / fai / tabsPartition.inc
index 308d50b8acbded0e6e6ee736376f6de31b89fdac..76ac003f7f88018511b0773256d813065387f017 100644 (file)
@@ -3,13 +3,14 @@
 class tabsPartition extends tabs
 {
   var $base= "";
+  var $parent ="";
 
   function tabsPartition($config, $data, $dn,$category)
   {
        tabs::tabs($config, $data, $dn,$category);
 
        /* Add references/acls/snapshots */
-       $this->addSpecialTabs();
+#      $this->addSpecialTabs();
   }
 
   function check($ignore_account= FALSE)
@@ -22,12 +23,7 @@ class tabsPartition extends tabs
   {
        $baseobject= $this->by_object['faiPartitionTable'];
 
-       $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipartitionou').get_ou('faiou').session::get('CurrentMainBase');
-
-       $faifilter = session::get('faifilter'); 
-       if($faifilter['branch']!="main"){
-               $new_dn ='cn='.$baseobject->cn.",".get_ou('faipartitionou').$faifilter['branch'];
-       }
+       $new_dn ='cn='.$baseobject->cn.",".get_ou('faiPartitionRDN').$this->parent->fai_release;
 
        if ($this->dn != $new_dn && $this->dn != "new"){
                
@@ -35,7 +31,7 @@ class tabsPartition extends tabs
                $cnt1 = count(split(",",$this->dn));
                $cnt2 = count(split(",",$new_dn));
                if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
-                       print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+                       msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
                }else{
 //                     $baseobject->recursive_move($this->dn, $new_dn);
                }