summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7d4d77)
raw | patch | inline | side by side (parent: f7d4d77)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 09:24:18 +0000 (09:24 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 09:24:18 +0000 (09:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8653 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index 82bb857b8a7a422fcab6a2008db15e851cc3529e..9ac6d7d1f5278980aed38507e8c2a31d995b85ec 100644 (file)
var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
/* Generic terminal attributes */
- var $gotoMode= "disabled";
+ var $gotoMode= "locked";
var $gotoTerminalPath= "";
var $gotoSwapServer= "";
var $gotoSyslogServer= "";
}
}
- $this->modes["disabled"]= _("Locked");
- $this->modes["enabled"]= _("Activated");
+ $this->modes["locked"]= _("Locked");
+ $this->modes["active"]= _("Activated");
/* Set base */
if ($this->dn == "new"){
$this->move($this->orig_dn, $this->dn);
}
+ /* Detect mode changes */
+ $activate= (isset($this->saved_attributes['gotoMode']) &&
+ $this->gotoMode != $this->saved_attributes['gotoMode'] &&
+ $this->gotoMode == "enabled" &&
+ tests::is_ip($this->netConfigDNS->ipHostNumber));
+
plugin::save();
/* Strip out 'default' values */
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/generic with dn '%s' failed."),$this->dn));
- }
-
-
+ if ($activate){
+ gosaSupportDaemon::send("gosa_set_activated_for_installation", $this->netConfigDNS->ipHostNumber);
+ }
+ }
/* Display generic part for server copy & paste */
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index 0b58f76678c800179c4416f8782660c06d602e34..8b31f43295040dfe5cdd245ef1c2afdc9ab47c92 100644 (file)
/* 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();
/* Strip out 'default' values */
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
+
+ if ($activate){
+ gosaSupportDaemon::send("gosa_set_activated_for_installation", $this->netConfigDNS->ipHostNumber);
+ }
}