summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4884f5d)
raw | patch | inline | side by side (parent: 4884f5d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Oct 2008 14:37:57 +0000 (14:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Oct 2008 14:37:57 +0000 (14:37 +0000) |
-Update references
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12786 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12786 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc b/gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc
index 4c1380fe70198e79afd65248c62f4d674d58ad96..3a86186ce3207ef32ded0cddfbb27b984bb7aae1 100644 (file)
var $cn = "";
var $goLdapServerStatus = "";
var $goLdapBase = "";
+ var $oldBase = "";
var $view_logged =FALSE;
var $krb_service_prefix = "ldap/";
}
$this->goLdapBase= "ldap://$srv:389/".$config->current['BASE'];
}
+ $this->oldBase = $this->goLdapBase;
}
}
}
+
+ function save()
+ {
+ goService::save();
+
+ /* Update object relation */
+ if(!empty($this->oldBase) && $this->oldBase != $this->goLdapBase){
+ $new = array();
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search('(&(objectClass=GOhard)(gotoLdapServer=*'.$this->oldBase.'))',array("cn","gotoLdapServer"));
+ while($attrs = $ldap->fetch()){
+ $ldapServer = array();
+ for($i = 0 ; $i < $attrs['gotoLdapServer']['count'] ; $i ++ ){
+ $ldapServer[] = preg_replace("/".normalizePreg($this->oldBase)."/",$this->goLdapBase,$attrs['gotoLdapServer'][$i]);
+ }
+ $new[$attrs['dn']]['gotoLdapServer'] = $ldapServer;
+ }
+ foreach($new as $dn => $data){
+ $ldap->cd($dn);
+ $ldap->modify($data);
+ if(!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
+ }
+ }
+ }
+
/* Return plugin informations for acl handling */
static function plInfo()