From e9c4177762f9ecb58d771e24265cf3cbc88a10f7 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 Sep 2005 08:46:09 +0000 Subject: [PATCH] Added tabs for profiles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1344 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/FAI/tabsProfile.inc | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 plugins/admin/FAI/tabsProfile.inc diff --git a/plugins/admin/FAI/tabsProfile.inc b/plugins/admin/FAI/tabsProfile.inc new file mode 100644 index 000000000..97dcdb073 --- /dev/null +++ b/plugins/admin/FAI/tabsProfile.inc @@ -0,0 +1,42 @@ +by_object['faiProfile']; + + $new_dn= 'cn='.$baseobject->cn.",ou=profiles,ou=fai,ou=configs,ou=systems,".$_SESSION['config']->current['BASE']; + + if ($this->dn != $new_dn && $this->dn != "new"){ + + /* if( new_dn is subtree of this->dn ) */ + $cnt1 = count(split(",",$this->dn)); + $cnt2 = count(split(",",$new_dn)); + if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){ + print_red(_("Try to move tree failed. Destination tree is subtree of source tree.")); + }else{ + $baseobject->recursive_move($this->dn, $new_dn); + } + } + $this->dn= $new_dn; + + tabs::save(TRUE); + } + +} + +?> -- 2.30.2