diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index ea9bc6956c30a196bf73dfc6b7daf0c453d871d2..b85d9c834acfad10647d435721ebd3500e23d48e 100644 (file)
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we represent a valid server? */
if (!$this->is_account && $this->parent == NULL){
$display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
if (isset($_POST['action'])){
switch($_POST['action']){
case 'wake':
- $cmd= $this->search($this->config->data['TABS'], "servgeneric", "WAKECMD");
+ $cmd= search_config($this->config->data['TABS'], "servgeneric", "WAKECMD");
if ($cmd == ""){
print_red(_("No WAKECMD definition found in your gosa.conf"));
} else {
break;
case 'reboot':
- $cmd= $this->search($this->config->data['TABS'], "servgeneric", "REBOOTCMD");
+ $cmd= search_config($this->config->data['TABS'], "servgeneric", "REBOOTCMD");
if ($cmd == ""){
print_red(_("No REBOOTCMD definition found in your gosa.conf"));
} else {
break;
case 'halt':
- $cmd= $this->search($this->config->data['TABS'], "servgeneric", "HALTCMD");
+ $cmd= search_config($this->config->data['TABS'], "servgeneric", "HALTCMD");
if ($cmd == ""){
print_red(_("No HALTCMD definition found in your gosa.conf"));
} else {
$smarty->assign($attr."ACL", chkacl($this->acl, $attr));
$smarty->assign("$attr", $this->$attr);
}
+ $smarty->assign("staticAddress", "");
$smarty->assign("base_select", $this->base);
/* Assign status */
/* must: cn */
if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
- $message[]= "The required field 'Server name' is not set.";
+ $message[]= _("The required field 'Server name' is not set.");
}
$ui= get_userinfo();
$ldap->add($this->attrs);
$mode= "add";
} else {
- if ($this->orig_dn != $this->dn){
- $this->move($this->orig_dn, $this->dn);
+
+ /* cn is not case sensitive for ldap, but for php it is!! */
+ if($this->config->current['DNMODE'] == "cn"){
+ if (strtolower($this->orig_dn) != (strtolower($this->dn))){
+ $this->move($this->orig_dn, $this->dn);
+ plugin::save();
+ }
+ }else{
+ if ($this->orig_dn != $this->dn){
+ $this->move($this->orig_dn, $this->dn);
+ plugin::save();
+ }
}
-
+
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
$mode= "modify";