1 <?php
3 class tabsVariable extends tabs
4 {
5 var $base= "";
6 var $parent;
8 function tabsVariable($config, $data, $dn,$category)
9 {
10 tabs::tabs($config, $data, $dn, $category);
12 /* Add references/acls/snapshots */
13 # $this->addSpecialTabs();
14 }
16 function check($ignore_account= FALSE)
17 {
18 return (tabs::check(TRUE));
19 }
22 function save($ignore_account= FALSE)
23 {
24 $baseobject= $this->by_object['faiVariable'];
25 $new_dn ='cn='.$baseobject->cn.",".get_ou('faivariableou').$this->parent->fai_release;
27 if ($this->dn != $new_dn && $this->dn != "new"){
29 /* if( new_dn is subtree of this->dn ) */
30 $cnt1 = count(split(",",$this->dn));
31 $cnt2 = count(split(",",$new_dn));
32 if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
33 msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
34 }else{
35 // $baseobject->recursive_move($this->dn, $new_dn);
36 }
37 }
38 $this->dn= $new_dn;
40 tabs::save(TRUE);
41 }
43 }
45 ?>