11694b1d1a4fd167d958581705ea7055b4524577
1 <?php
3 class tabsVariable extends tabs
4 {
5 var $base= "";
7 function tabsVariable($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['faiVariable'];
25 $new_dn= 'cn='.$baseobject->cn.",".get_ou('faivariableou').get_ou('faiou').session::get('CurrentMainBase');
27 $faifilter = session::get('faifilter');
29 if($faifilter['branch']!="main"){
30 $new_dn ='cn='.$baseobject->cn.",".get_ou('faivariableou').$faifilter['branch'];
31 }
33 if ($this->dn != $new_dn && $this->dn != "new"){
35 /* if( new_dn is subtree of this->dn ) */
36 $cnt1 = count(split(",",$this->dn));
37 $cnt2 = count(split(",",$new_dn));
38 if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
39 print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
40 }else{
41 // $baseobject->recursive_move($this->dn, $new_dn);
42 }
43 }
44 $this->dn= $new_dn;
46 tabs::save(TRUE);
47 }
49 }
51 ?>