Code

* Created "old" branch and moved stuff
[gosa.git] / branches / old / gosa-plugins / fai / admin / fai / tabsHook.inc
1 <?php
3 class tabsHook extends tabs
4 {
5   var $base= "";
6   var $parent ="";
8   function tabsHook($config, $data, $dn,$category)
9   {
10         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   }
19   
21   function save($ignore_account= FALSE)
22   {
23         $baseobject= $this->by_object['faiHook'];
24         $new_dn ='cn='.$baseobject->cn.",".get_ou('faihookou').$this->parent->fai_release;
26         if ($this->dn != $new_dn && $this->dn != "new"){
27                 
28                 /* if( new_dn is subtree of this->dn ) */
29                 $cnt1 = count(split(",",$this->dn));
30                 $cnt2 = count(split(",",$new_dn));
31                 if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
32                         msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
33                 }else{
34 //                      $baseobject->recursive_move($this->dn, $new_dn);
35                 }
36         }
37         $this->dn= $new_dn;
39         tabs::save(TRUE);
40   }
42 }
44 ?>