Code

Added ldap refresh via gosa-si
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 15:07:45 +0000 (15:07 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 15:07:45 +0000 (15:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9030 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index fdff198dfabef62dacb20f10efa5fed8b1992ed6..da458705eded97378e373ca65f539fc8f9bcce7c 100644 (file)
@@ -417,6 +417,9 @@ class termstartup extends plugin
       }
     }
 
+    /* Check if LDAP server has changed */
+    $ldap_changed= ($this->attrs['gotoLdapServer'] != $this->saved_attributes['gotoLdapServer']);
+
     /* Strip out 'default' values */
     foreach(array("gotoBootKernel") as $value){
       if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default"){
@@ -444,6 +447,10 @@ class termstartup extends plugin
 
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/startup with dn '%s' failed."),$this->dn));
     $this->handle_post_events("modify");
+
+    if ($ldap_changed){
+        gosaSupportDaemon::send("gosa_reload_ldap_config", $this->parent->by_object['termgeneric']->netConfigDNS->macAddress);
+    }
   }
 
   /* Add value to array, check if unique */
index c74b3761756fbcaf2b61f97a87b7863152e3aa42..555ddd8b4e02ddefe4527889ddfe781330f06244 100644 (file)
@@ -853,6 +853,9 @@ class workstartup extends plugin
       }
     }
 
+    /* Check if LDAP server has changed */
+    $ldap_changed= ($this->attrs['gotoLdapServer'] != $this->saved_attributes['gotoLdapServer']);
+
     if (($this->attrs['gotoBootKernel'] == "default-inherited") || ($this->attrs['gotoBootKernel'] == "%default%")){
       $this->attrs['gotoBootKernel']= array();
     }
@@ -895,6 +898,12 @@ class workstartup extends plugin
 
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/startup with dn '%s' failed."),$this->dn));
     $this->handle_post_events("modify");
+
+    /* Check if LDAP server has changed */
+    if ($ldap_changed){
+       gosaSupportDaemon::send("gosa_reload_ldap_config", $this->parent->by_object['workgeneric']->netConfigDNS->macAddress);
+    }
+
   }