Code

Speed enhancement - Fixed snapshot server connection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Nov 2007 14:49:18 +0000 (14:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Nov 2007 14:49:18 +0000 (14:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7897 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc

index 4440ab7626ead2106a0fb992fa7ef64960921db9..b71e576ca9b205b107d7e07509c0d45aefa6d54d 100644 (file)
@@ -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));