1 <?php
3 class tabsPackage extends tabs
4 {
5 var $base= "";
7 function tabsPackage($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['faiPackage'];
25 $new_dn= 'cn='.$baseobject->cn.",ou=packages,ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
26 if($_SESSION['faifilter']['branch']!="main"){
27 $new_dn ='cn='.$baseobject->cn.",ou=packages,".$_SESSION['faifilter']['branch'];
28 }
30 if ($this->dn != $new_dn && $this->dn != "new"){
32 /* if( new_dn is subtree of this->dn ) */
33 $cnt1 = count(split(",",$this->dn));
34 $cnt2 = count(split(",",$new_dn));
35 if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
36 print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
37 }else{
38 // $baseobject->recursive_move($this->dn, $new_dn);
39 }
40 }
41 $this->dn= $new_dn;
43 tabs::save(TRUE);
44 }
46 }
48 ?>