summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c967c9)
raw | patch | inline | side by side (parent: 2c967c9)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 4 Mar 2010 13:56:15 +0000 (13:56 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 4 Mar 2010 13:56:15 +0000 (13:56 +0000) |
When preparing objects for copy and paste use get_leaf_objects
to get the list of leaf objects straight. Otherwise copied objects
do not contain all classes they should contain.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@16072 594d385d-05f5-0310-b6e9-bd551577e9d8
to get the list of leaf objects straight. Otherwise copied objects
do not contain all classes they should contain.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@16072 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiHook.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiHook.inc
index 281b3d6becb09cefa6f5e8447730756398bfd883..5939f7eaa0e88875a4e45799153f70b4024ae914 100644 (file)
/* Read all leaf objects of this object (For FAIscript this would be FAIscriptEntry)
*/
- $res = FAI::get_all_objects_for_given_base($source['dn'],"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
+ $res = FAI::get_leaf_objects($source['dn'], $source['cn'][0], $this->subClass, get_ou('faiHookRDN'));
foreach($res as $obj){
-
- /* Skip not relevant objects */
- if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
-
$objects = array();
$objects['status'] = "edited";
$objects['dn'] = $obj['dn'];
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index 596e4ba0e3394c04f8849b3a26440e30bffcd2c8..07f4ab386798af451d243afc8c6f886daea2af88 100644 (file)
/* Read all leaf objects of this object (For FAIscript this would be FAIscriptEntry)
*/
- $res = FAI::get_all_objects_for_given_base($source['dn'],"(&(objectClass=FAIclass)(objectClass=FAIpartitionDisk))");
+ $res = FAI::get_leaf_objects($source['dn'], $source['cn'][0], "FAIpartitionDisk", get_ou('faiPartitionRDN'));
foreach($res as $obj){
-
- /* Skip not relevant objects */
- if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
-
$objects = array();
$objects['description'] = "";
$objects['status'] = "edited";
/* read all partitions for each disk
*/
foreach($this->disks as $name => $disk){
- $res = FAI::get_all_objects_for_given_base($disk['dn'],"(&(objectClass=FAIclass)(objectClass=FAIpartitionEntry))");
+ $res = FAI::get_leaf_objects($disk['dn'], $name, "FAIpartitionEntry", "cn=".$source['cn'][0].",".get_ou('faiPartitionRDN'));
foreach($res as $obj){
-
- /* Skip not relevant objects */
- if(!preg_match("/".preg_quote($disk['dn'], '/')."$/i",$obj['dn'])) continue;
-
$objects = array();
$objects['status'] = "edited";
$objects['dn'] = $obj['dn'];
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiScript.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiScript.inc
index b2a253e932bbcc0ad1ec42d97faaccc00563562a..278f068d11e7cf4959f3a23d22707b0a5c8db635 100644 (file)
/* Read all leaf objects of this object (For FAIscript this would be FAIscriptEntry)
*/
- $res = FAI::get_all_objects_for_given_base($source['dn'],"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
+ $res = FAI::get_leaf_objects($source['dn'], $source['cn'][0], $this->subClass, get_ou('faiScriptRDN'));
foreach($res as $obj){
-
- /* Skip not relevant objects */
- if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
-
$objects = array();
$objects['status'] = "edited";
$objects['dn'] = $obj['dn'];
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index 689d5464bfa856d6dc395d5a5d2cf95af2ca92a3..b507268f416d1b608ee372a98ea5741e2d21aac1 100644 (file)
/* Read all leaf objects of this object (For FAIscript this would be FAIscriptEntry)
*/
- $res = FAI::get_all_objects_for_given_base($source['dn'],"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
+ $res = FAI::get_leaf_objects($source['dn'], $source['cn'][0], $this->subClass, get_ou('faiTemplateRDN'));
foreach($res as $obj){
-
- /* Skip not relevant objects */
- if(!preg_match("/".preg_quote($source['dn'], '/')."$/i",$obj['dn'])) continue;
-
$objects = array();
$objects['status'] = "edited";
$objects['dn'] = $obj['dn'];
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index 372dac4dd8aeae457b5484ef46543670df07247f..45f45832616e9357bdac88f958ca66bc126a1fa5 100644 (file)
/* Read all leaf objects of this object (For FAIscript this would be FAIscriptEntry)
*/
- $res = FAI::get_all_objects_for_given_object($source['dn'],"(&(objectClass=FAIclass)(objectClass=".$this->subClass."))");
+ $res = FAI::get_leaf_objects($source['dn'], $source['cn'][0], $this->subClass, get_ou('faiVariableRDN'));
foreach($res as $obj){
-
$objects = array();
$objects['status'] = "edited";
$objects['dn'] = $obj['dn'];