1 <?php
3 class tabsPartition extends tabs
4 {
5 var $base= "";
7 function tabsPartition($config, $data, $dn,$category)
8 {
9 tabs::tabs($config, $data, $dn,$category);
11 /* Add references/acls/snapshots */
12 $this->addSpecialTabs();
13 }
15 function check($ignore_account= FALSE)
16 {
17 return (tabs::check(TRUE));
18 }
21 function save($ignore_account= FALSE)
22 {
23 $baseobject= $this->by_object['faiPartitionTable'];
25 $new_dn= 'cn='.$baseobject->cn.",".get_ou('faipartitionou').get_ou('faiou').session::get('CurrentMainBase');
27 $faifilter = session::get('faifilter');
28 if($faifilter['branch']!="main"){
29 $new_dn ='cn='.$baseobject->cn.",".get_ou('faipartitionou').$faifilter['branch'];
30 }
32 if ($this->dn != $new_dn && $this->dn != "new"){
34 /* if( new_dn is subtree of this->dn ) */
35 $cnt1 = count(split(",",$this->dn));
36 $cnt2 = count(split(",",$new_dn));
37 if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
38 print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
39 }else{
40 // $baseobject->recursive_move($this->dn, $new_dn);
41 }
42 }
43 $this->dn= $new_dn;
45 tabs::save(TRUE);
46 }
48 }
50 ?>