From: hickert Date: Mon, 26 Nov 2007 14:49:18 +0000 (+0000) Subject: Speed enhancement - Fixed snapshot server connection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=46cc0defa4f26f7039e70ca7385218cba39cc855;p=gosa.git Speed enhancement - Fixed snapshot server connection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7897 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 4440ab762..b71e576ca 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -1215,11 +1215,15 @@ class plugin $cfg= &$this->config->current; /* check if there are special server configurations for snapshots */ - if(isset($cfg['SNAPSHOT_SERVER'])){ + + if(isset($cfg['SERVER']) && isset($cfg['SNAPSHOT_SERVER']) && $cfg['SERVER'] == $cfg['SNAPSHOT_SERVER']){ + $ldap_to = $ldap; + }elseif(isset($cfg['SNAPSHOT_SERVER'])){ $server = $cfg['SNAPSHOT_SERVER']; $user = $cfg['SNAPSHOT_USER']; $password = $cfg['SNAPSHOT_PASSWORD']; $snapldapbase = $cfg['SNAPSHOT_BASE']; + $ldap_to = new LDAP($user,$password, $server); $ldap_to -> cd ($snapldapbase); show_ldap_error($ldap->get_error(), sprintf(_("Method get available snapshots with dn '%s' failed."),$this->dn));