summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d8e45f)
raw | patch | inline | side by side (parent: 3d8e45f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 May 2010 08:29:00 +0000 (08:29 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 May 2010 08:29:00 +0000 (08:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18470 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc | patch | blob | history |
diff --git a/gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc b/gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc
index 50ace96793c497379edb8fbfc5ef3cfb95a3871e..046b3ef59d8745f0fb90083a023faad4d60d1932 100644 (file)
protected $found = array();
protected $filter ="";
+ // Additional suffixes or prefixes
+ // e.g. for 'faiScriptRDN' (ou=scripts,) moving to new destination lets say
+ // to 'ou=FAIscripts,' would break stuff with having 'ou=fai,ou=systems,ou=config'
+ // prepended.
+ //
+ protected $suffix = "";
+ protected $prefix = "";
+
function __construct($config,$property)
{
$this->property = &$property;
$ldap2->cd($this->config->current['BASE']);
// If the userRDN wasn't empty, then only search for users inside of the old userRDN.
- $initialValue = $this->property->getValue();
- $targetValue = $this->property->getValue(TRUE);
+ $initialValue = $this->prefix.$this->property->getValue().$this->suffix;
+ $targetValue = $this->prefix.$this->property->getValue(TRUE).$this->suffix;
+
$dnMatch = "";
if(!empty($initialValue)){
foreach(preg_split("/,/", $initialValue) as $rdnPart){
$container = preg_replace("/^[^,]*+,/","",$container);
}
+
$dnTo = $name.",".$targetValue.$container;
if(!empty($targetValue) && !$ldap->dn_exists($targetValue.$container)){
$this->found['add'][$targetValue.$container] = array();