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()
16 {
17 return (tabs::check(TRUE));
18 }
21 function save()
22 {
23 $baseobject= $this->by_object['faiVariable'];
25 $new_dn= 'cn='.$baseobject->cn.",ou=variables,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
27 if($_SESSION['faifilter']['branch']!="main"){
28 $new_dn ='cn='.$baseobject->cn.",ou=variables,".$_SESSION['faifilter']['branch'];
29 }
31 if ($this->dn != $new_dn && $this->dn != "new"){
33 /* if( new_dn is subtree of this->dn ) */
34 $cnt1 = count(split(",",$this->dn));
35 $cnt2 = count(split(",",$new_dn));
36 if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
37 print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
38 }else{
39 // $baseobject->recursive_move($this->dn, $new_dn);
40 }
41 }
42 $this->dn= $new_dn;
44 tabs::save(TRUE);
45 }
47 }
49 ?>