summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd8a19e)
raw | patch | inline | side by side (parent: dd8a19e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Nov 2008 15:47:20 +0000 (15:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Nov 2008 15:47:20 +0000 (15:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12902 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history | |
gosa-core/include/class_plugin.inc | patch | blob | history |
index c7fa31f98107ead05b1d608a7788445adb442777..a0c46a7cc6de9d16ee098c506bd0b41569e23df7 100644 (file)
*/
function rename_dn($source,$dest)
{
- $source = LDAP::fix($source);
- $dest = LDAP::fix($dest);
-
/* Check if source and destination are the same entry */
if(strtolower($source) == strtolower($dest)){
trigger_error("Source and destination can't be the same entry.");
parent => ou=department,dc=...
dest_rdn => cn=herbert
*/
- $parent = preg_replace("/^[^,]+,/","",$dest);
- $dest_rdn = preg_replace("/,.*$/","",$dest);
-
+ $parent = @LDAP::fix(preg_replace("/^[^,]+,/","", @LDAP::convert($dest)));
+ $dest_rdn = @LDAP::fix(preg_replace("/,.*$/","",@LDAP::convert($dest)));
+
if($this->hascon){
if ($this->reconnect) $this->connect();
$r= ldap_rename($this->cid,$source,$dest_rdn,$parent,TRUE);
index dee53fbb0e430cf55c139e40fba865d2404c849c..95abb82d8865340d6565f5fd9f85ea6fbb67e250 100644 (file)
/* Try to move the source entry to the destination position */
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->create_missing_trees(preg_replace("/^[^,]+,/","",$dst_dn));
+ $ldap->create_missing_trees(preg_replace("/^[^,]+,/","",@LDAP::convert($dst_dn)));
if (!$ldap->rename_dn($src_dn,$dst_dn)){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $src_dn, "", get_class()));