Code

Added activation signals
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jan 2008 09:24:04 +0000 (09:24 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jan 2008 09:24:04 +0000 (09:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8652 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_servGeneric.inc

index 91eec6805b528ff08c3c65a9e65bd668df8c91f8..07b7bfa822d4f774815c4214e85e92162f35d16c 100644 (file)
@@ -324,6 +324,12 @@ class servgeneric extends plugin
   /* Save to LDAP */
   function save()
   {
+    /* Detect mode changes */
+    $activate= (isset($this->saved_attributes['gotoMode']) &&
+        $this->gotoMode != $this->saved_attributes['gotoMode'] &&
+        $this->gotoMode == "active" &&
+        tests::is_ip($this->netConfigDNS->ipHostNumber));
+
     plugin::save();
 
     /* Remove all empty values */
@@ -377,6 +383,11 @@ class servgeneric extends plugin
     if(!$this->didAction){
       $this->handle_post_events($mode,array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
     }
+
+    if ($activate){
+      gosaSupportDaemon::send("gosa_set_activated_for_installation", $this->netConfigDNS->ipHostNumber);
+    }
+
   }