Code

Fixed LDAP change detection
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Mar 2008 15:50:47 +0000 (15:50 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Mar 2008 15:50:47 +0000 (15:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9901 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc

index 17f3ae958b7a8d768f15d8e3612e83bfdd6ae7c9..0b12ac8e898d69eba6195bfa8f641fb780949189 100644 (file)
@@ -847,9 +847,16 @@ class workstartup extends plugin
     }
 
     /* Check if LDAP server has changed */
-    $ldap_changed= (isset($this->attrs['gotoLdapServer'])) && 
-                   (isset($this->saved_attributes['gotoLdapServer'])) &&
-                   ($this->attrs['gotoLdapServer'] != $this->saved_attributes['gotoLdapServer']);
+    $ldap_changed= false;
+    if (isset($this->saved_attributes['gotoLdapServer'])){
+      if (isset($this->attrs['gotoLdapServer']) && $this->attrs['gotoLdapServer'] != $this->saved_attributes['gotoLdapServer']){
+        $ldap_changed= true;
+      }
+    } else {
+      if (isset($this->attrs['gotoLdapServer'])){
+        $ldap_changed= true;
+      }
+    }
 
     if (($this->attrs['gotoBootKernel'] == "default-inherited") || ($this->attrs['gotoBootKernel'] == "%default%")){
       $this->attrs['gotoBootKernel']= array();