summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1b5bc3)
raw | patch | inline | side by side (parent: b1b5bc3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 10 Jan 2006 16:31:11 +0000 (16:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 10 Jan 2006 16:31:11 +0000 (16:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2438 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_askClassName.inc | patch | blob | history | |
plugins/admin/fai/class_faiManagement.inc | patch | blob | history |
index a5bddcd7f4b0987a597b0e1195cdedf62fe3add4..13b923a8b0cbd45c1014b117e408b4058d9de4a3 100644 (file)
* With a second search detect all object that belong to the different ous.
*/
- $bb ="";
+ $base = "ou=fai,ou=configs,ou=systems,".$faifilter['base'];
if($faifilter['branch'] != "main"){
- $bb = "ou=".$faifilter['branch'].",";
+ $base = $faifilter['branch'];
}
- $base = $bb."ou=fai,ou=configs,ou=systems,".$faifilter['base'];
$ldap = $this->config->get_ldap_link();
$res = get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",FALSE, $base, array("cn","description","objectClass"),TRUE);
$used = array();
index 42438f6dddf83dc383e8f7e19528ba1fb652ced4..17971a305dda1423d352b9bca4d7944e0c133f18 100644 (file)
/* Create it know */
$ldap = $this->config->get_ldap_link();
- $ldap->cd ("ou=".$name.",".$base);
+ $baseToUse = $base;
+ if($_SESSION['faifilter']['branch']!="main"){
+ $baseToUse = $_SESSION['faifilter']['branch'];
+ }
+
+ $ldap->cd ("ou=".$name.",".$baseToUse);
$ldap->recursive_remove();
$ldap->cd ($this->config->current['BASE']);
- $ldap->copy_FAI_resource_recursive($base,"ou=".$name.",".$base,"branch",true);
+ $ldap->copy_FAI_resource_recursive($baseToUse,"ou=".$name.",".$baseToUse,"branch",true);
$this->dispNewBranch = false;
}
/* Create it know */
$ldap = $this->config->get_ldap_link();
- $ldap->cd ("ou=".$name.",".$base);
+ $baseToUse = $base;
+ if($_SESSION['faifilter']['branch']!="main"){
+ $baseToUse = $_SESSION['faifilter']['branch'];
+ }
+
+ $ldap->cd ("ou=".$name.",".$baseToUse);
$ldap->recursive_remove();
$ldap->cd ($this->config->current['BASE']);
- $ldap->copy_FAI_resource_recursive($base,"ou=".$name.",".$base,"freeze",true);
+ $ldap->copy_FAI_resource_recursive($baseToUse,"ou=".$name.",".$baseToUse,"freeze",true);
$this->dispNewFreeze = false;
}
if((isset($attrs['ou']))&&($attrs['dn']!=$base)){
$ret[$attrs['dn']]= $prefix.$attrs['ou'][0];
- $ret = array_merge($ret,$this->getBranches($attrs['dn'],$prefix."/".$attrs['ou'][0]));
+ $ret = array_merge($ret,$this->getBranches($attrs['dn'],$prefix.$attrs['ou'][0]."/"));
}
}
return($ret);