From: cajus Date: Tue, 31 May 2005 08:27:49 +0000 (+0000) Subject: Fixed problems in kolab/server tabs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d7fd69b22dc6a6614c574f953e22fff953205209;p=gosa.git Fixed problems in kolab/server tabs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@523 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc index eedef9cb5..d6bbee442 100644 --- a/plugins/admin/systems/class_componentGeneric.inc +++ b/plugins/admin/systems/class_componentGeneric.inc @@ -9,6 +9,7 @@ class componentGeneric extends plugin /* Generic terminal attributes */ var $interfaces= array(); + var $ignore_account= TRUE; /* Needed values and lists */ var $base= ""; diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index c0d2d8ba2..ae378919b 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -9,6 +9,7 @@ class phoneGeneric extends plugin /* Generic terminal attributes */ var $interfaces= array(); + var $ignore_account= TRUE; /* Needed values and lists */ var $base= ""; diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 78efba1b9..c816cc234 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -9,6 +9,7 @@ class printgeneric extends plugin /* Generic terminal attributes */ var $interfaces= array(); + var $ignore_account= TRUE; /* Needed values and lists */ var $base= ""; diff --git a/plugins/admin/systems/class_servDB.inc b/plugins/admin/systems/class_servDB.inc index dd7c1d291..c6e38f25c 100644 --- a/plugins/admin/systems/class_servDB.inc +++ b/plugins/admin/systems/class_servDB.inc @@ -25,6 +25,7 @@ class servdb extends plugin var $goFonPassword= ""; var $goFonAreaCode= ""; var $goFonCountryCode= ""; + var $ignore_account= TRUE; /* attribute list for save action */ var $attributes= array("goImapName", "goImapConnect", "goImapAdmin", "goImapPassword", diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index dd5fffe56..72fd08251 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -8,6 +8,7 @@ class servdhcp extends plugin var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes= array(); var $objectclasses= array("whatever"); diff --git a/plugins/admin/systems/class_servDNS.inc b/plugins/admin/systems/class_servDNS.inc index 03c92fd0b..6f39d7b22 100644 --- a/plugins/admin/systems/class_servDNS.inc +++ b/plugins/admin/systems/class_servDNS.inc @@ -8,6 +8,7 @@ class servdns extends plugin var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes= array(); var $objectclasses= array("whatever"); diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index c5f4229c5..ea9bc6956 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -8,6 +8,7 @@ class servgeneric extends plugin var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); /* Generic terminal attributes */ + var $ignore_account= TRUE; var $interfaces= array(); /* Needed values and lists */ diff --git a/plugins/admin/systems/class_servKolab.inc b/plugins/admin/systems/class_servKolab.inc index edf3d65fd..65d5a147e 100644 --- a/plugins/admin/systems/class_servKolab.inc +++ b/plugins/admin/systems/class_servKolab.inc @@ -6,15 +6,16 @@ class servkolab extends plugin { var $cli_description = "Some longer text\nfor help"; var $cli_parameters = array("eins"=>"Eins ist toll", "zwei"=>"Zwei ist noch besser"); - var $postfix_mydomain = "\$domain"; - var $postfix_mydestination = "\$domain"; + var $postfix_mydomain = ""; + var $postfix_mydestination = ""; var $postfix_mynetworks = "127.0.0.1/8"; var $postfix_enable_virus_scan = "TRUE"; var $postfix_relayhost = ""; var $postfix_mxrelayenabled = true; - var $postfix_allow_unauthenticated = "false"; + var $postfix_allow_unauthenticated = "FALSE"; var $cyrus_quotawarn = "80"; var $kolabFreeBusyFuture = "1"; + var $k = "kolab"; var $cyrus_admins = "TRUE"; var $cyrus_imap = "TRUE"; var $cyrus_pop3 = "TRUE"; @@ -25,22 +26,16 @@ class servkolab extends plugin { var $proftpd_ftp = "TRUE"; var $apache_http = "TRUE"; var $kolabHost = array(); - var $added = false; - var $remove = false; - var $changed = false; - var $attributes = array("postfix_mydomain", "postfix_mydestination", - "postfix_mynetworks", "postfix_enable_virus_scan","postfix_relayhost","postfix_allow_unauthenticated", - "cyrus_admins", "cyrus_imap","kolabFreeBusyFuture", - "cyrus_pop3", "cyrus_imaps", "cyrus_pop3s", "cyrus_sieve", - "apache_allow_unauthenticated_fb", "proftpd_ftp", - "apache_http", "cyrus_quotawarn", "kolabHost"); - + + var $attributes = array("postfix_mydomain", "postfix_mydestination", "proftpd_ftp", "k", + "postfix_mynetworks", "postfix_enable_virus_scan", "postfix_relayhost", "apache_http", + "postfix_allow_unauthenticated", "cyrus_admins", "cyrus_imap","kolabFreeBusyFuture", + "cyrus_pop3", "cyrus_imaps", "cyrus_pop3s", "cyrus_sieve", "apache_allow_unauthenticated_fb", + "cyrus_quotawarn"); var $objectclasses = array("top", "kolab"); function servkolab($config, $dn = NULL) { - - /* Setting the hostname and tell this Plugin that we are the kolab extension*/ $this->hostname= preg_replace('/^cn=([^,]+),.*$/', '\1', $dn); $this->dn = "k=kolab,".$config->current['BASE']; @@ -56,10 +51,18 @@ class servkolab extends plugin { } } + /* Toggle relayhost */ + $this->postfix_mxrelayenabled= preg_match('/^\[/', $this->postfix_relayhost); + $this->postfix_relayhost = preg_replace("/[\[\]]/","",$this->postfix_relayhost); + /* Is this Server a member of the Kolab extension or not ?*/ - if(isset($this->attrs['kolabHost']) && in_array($this->hostname, $this->attrs['kolabHost'])) { + if(isset($this->attrs['kolabHost'])) { + $this->kolabHost= $this->attrs['kolabHost']; + unset($this->kolabHost['count']); + } + if(in_array($this->hostname, $this->kolabHost)) { $this->is_account=true; - } else { + } else { $this->is_account=false; } } @@ -71,77 +74,14 @@ class servkolab extends plugin { $smarty = get_smarty(); $display = ""; - $this->changed =true; - - /* Lets get all Host that are member of the Kolab extension, but don't catch count */ - if(is_array($this->attrs['kolabHost'])) - { - unset($this->attrs['kolabHost']['count']); - $this->kolabHost = $this->attrs['kolabHost']; - } - else - { - $this->attrs['kolabHost']=array(); - $this->kolabHost = $this->attrs['kolabHost']; - } - - /* Tell the script the dn, we are using */ - $this->kolabdn = "k=kolab,".$this->config->current['BASE']; - /* The Ldap link is needed to ask ldap some questions */ $ldap = $this->config->get_ldap_link(); /* Do we need to flip is_account state? */ if (isset($_POST['modify_state'])) { $this->is_account = !$this->is_account; - - - /*if we flip to true, we'll have to create a new account, so lets do that*/ - if($this->is_account==true) - { - /* Only add the given Hostname to the existing hosts*/ - $this->kolabHost[]=$this->hostname; - $this->attrs['kolabHost'][]=$this->hostname; - } - else - { - /* First we have to find the Host we want to delete, take the index and delete em*/ - foreach($this->kolabHost as $key=>$host) - { - /* Delete only if the Host is the in the array*/ - if($host == $this->hostname) - { - unset($this->kolabHost[$key]); - unset($this->attrs['kolabHost'][$key]); - } - } - /* We deletet an Entry so we must reorder the index of the array */ - $tmp = $this->kolabHost; - $this->kolabHost=array(); - $this->attrs['kolabHost']=array(); - - /* reorder reorder ...*/ - foreach($tmp as $host){ - $this->kolabHost[]=$host; - $this->attrs['kolabHost'][]=$host; - } - /* Tell Save that we want to delete someone*/ - $this->remove = true; - } - } - /* Check Relayhost and if we have MX lookup enabled*/ - if(isset($this->postfix_relayhost[0]) && $this->postfix_relayhost[0]=="[") - { - $this->postfix_mxrelayenabled=false; - $this->postfix_relayhost = str_replace("[","",$this->postfix_relayhost); - $this->postfix_relayhost = str_replace("]","",$this->postfix_relayhost); - } - if($this->postfix_mxrelayenabled) { - $smarty->assign("RelayMxSupportCheck"," checked "); - } else { - $smarty->assign("RelayMxSupportCheck",""); - } + /* Show tab dialog headers */ if ($this->is_account) { /* call Add Acoount to add account */ @@ -152,16 +92,25 @@ class servkolab extends plugin { return ($display); } + /* Set relayhost and if we have MX lookup enabled*/ + if($this->postfix_mxrelayenabled) { + $smarty->assign("RelayMxSupportCheck"," checked "); + } else { + $smarty->assign("RelayMxSupportCheck",""); + } + /* Initialize all attributes, that were submitted */ foreach($this->attributes as $val) { $smarty->assign($val."ACL",chkacl($this->acl,str_replace("_","-",$val))); + /* Tell smarty which variables we are useing */ $smarty->assign($val, $this->$val); - if (($this->$val != "FALSE") && (!empty($this->$val))) + if (($this->$val != "FALSE") && !empty($this->$val)){ $smarty->assign($val."Check", "checked"); - else + } else { $smarty->assign($val."Check", ""); + } } /* Assemble free/busy string */ @@ -183,18 +132,62 @@ class servkolab extends plugin { function remove_from_parent() { + $ldap= $this->config->get_ldap_link(); + $this->dn = "k=kolab,".$this->config->current['BASE']; + + /* Are we alone? Remove complete entry... */ + if (count($this->kolabHost) == 1){ + + /* Remove complete entry */ + $ldap->rmdir ($this->dn); + show_ldap_error($ldap->get_error()); + + } else { + + /* Only modify kolabHost */ + $hosts= array(); + foreach ($this->kolabHost as $host){ + if ($host != $this->cn){ + $hosts[]= $host; + } + } + $attrs= array('kolabHost' => $hosts); + $ldap->cd($this->dn); + $ldap->modify($attrs); + show_ldap_error($ldap->get_error()); + } + + /* Optionally execute a command after we're done */ + $this->handle_post_events("remove"); } function save_object() { - plugin::save_object(); + if (isset($_POST['kolabtab'])){ + plugin::save_object(); + + /* Save checkboxes */ + foreach (array( "postfix_enable_virus_scan", "postfix_allow_unauthenticated", + "cyrus_admins", "cyrus_imap", "cyrus_pop3", "cyrus_imaps", + "cyrus_pop3s", "cyrus_sieve", "apache_allow_unauthenticated_fb", + "proftpd_ftp", "apache_http") as $cb){ + if (isset($_POST[$cb])){ + $this->$cb= "TRUE"; + } else { + $this->$cb= "FALSE"; + } + } + + /* Toggle relay check */ + $this->postfix_mxrelayenabled= isset($_POST['RelayMxSupport']); + } + } function check() { - error_reporting(E_ALL); $message = array(); if(($this->kolabFreeBusyFuture=="")) { $message[] = _("Future days in Free/Busy settings must be set."); @@ -210,17 +203,14 @@ class servkolab extends plugin { $message[] = _("Future days must be a value."); } - if(empty($this->postfix_mynetworks)) - { + if(empty($this->postfix_mynetworks)) { $message[] = _("No SMTP privileged networks set."); } - if(empty($this->postfix_relayhost)) - { + if(empty($this->postfix_relayhost)) { $message[] = _("No SMTP smarthost/relayhost set."); } - return ($message); } @@ -228,170 +218,50 @@ class servkolab extends plugin { /* Save to LDAP */ function save() { - if(!$this->changed) return; - /* Set ldap connection */ $ldap = $this->config->get_ldap_link(); /* Open current dn*/ - $ldap->cd($this->dn); - + $this->dn = "k=kolab,".$this->config->current['BASE']; - /* Setup Attributes to save */ - $newattrs = array(); - - /* Set vars with correct - _ - */ - foreach($this->attributes as $key) { - $key2 = str_replace("_", "-", $key); - $newattrs[$key2] = $this->$key; + /* Adapt relayhost */ + $this->postfix_relayhost= preg_replace('/[\[\]]/', '', $this->postfix_relayhost); + if (!$this->postfix_mxrelayenabled && $this->postfix_relayhost != ""){ + $this->postfix_relayhost= "[".$this->postfix_relayhost."]"; } - - - - /* Set bool vars */ - if ($newattrs['postfix-enable-virus-scan'] == 0) - $newattrs['postfix-enable-virus-scan'] = "FALSE"; - else - $newattrs['postfix-enable-virus-scan'] = "TRUE"; - if ($newattrs['cyrus-imap'] == 0) - $newattrs['cyrus-imap'] = "FALSE"; - else - $newattrs['cyrus-imap'] = "TRUE"; - if ($newattrs['cyrus-imaps'] == 0) - $newattrs['cyrus-imaps'] = "FALSE"; - else - $newattrs['cyrus-imaps'] = "TRUE"; - if ($newattrs['cyrus-pop3'] == 0) - $newattrs['cyrus-pop3'] = "FALSE"; - else - $newattrs['cyrus-pop3'] = "TRUE"; - if ($newattrs['cyrus-pop3s'] == 0) - $newattrs['cyrus-pop3s'] = "FALSE"; - else - $newattrs['cyrus-pop3s'] = "TRUE"; - if ($newattrs['cyrus-sieve'] == 0) - $newattrs['cyrus-sieve'] = "FALSE"; - else - $newattrs['cyrus-sieve'] = "TRUE"; - if ($newattrs['proftpd-ftp'] == 0) - $newattrs['proftpd-ftp'] = "FALSE"; - else - $newattrs['proftpd-ftp'] = "TRUE"; - if ($newattrs['apache-http'] == 0) - $newattrs['apache-http'] = "FALSE"; - else - $newattrs['apache-http'] = "TRUE"; - if ($newattrs['postfix-allow-unauthenticated'] == 0) - $newattrs['postfix-allow-unauthenticated'] = "FALSE"; - else - $newattrs['postfix-allow-unauthenticated'] = "TRUE"; - if ($newattrs['apache-allow-unauthenticated-fb'] == 0) - $newattrs['apache-allow-unauthenticated-fb'] = "FALSE"; - else - $newattrs['apache-allow-unauthenticated-fb'] = "TRUE"; - - - /* Reorder Host array, to get constant increasing index */ - $newattrs['kolabHost'] = array(); - - /* Check Relayhost and if we have MX lookup enabled*/ - if(isset($_POST['RelayMxSupport'])) - $this->postfix_mxrelayenabled = true ; - else - $this->postfix_mxrelayenabled = false; - if(!$this->postfix_mxrelayenabled) - { - $newattrs['postfix-relayhost']="[".$this->postfix_relayhost."]"; - } - - /* If we want to add someone or do only changes on the settings ...*/ - if(!$this->remove) - { - /* Get all Host known, that are member of the Kolab extension */ - $this->kolabHost = $this->attrs['kolabHost']; - - /* So, the Host is already member of the extension, so get all and do nothing */ - if(in_array($this->hostname,$this->kolabHost)) - { - $newattrs['kolabHost']=$this->kolabHost; - } - /* So this is the first entry */ - elseif(empty($this->kolabHost)) - { - /* Create an array an add the Host */ - $newattrs['kolabHost']=array(); - $newattrs['kolabHost'][]=$this->hostname; - } - /* Theres already an entry, but only in a string, */ - elseif(is_string($this->kolabHost)) - { - $tmp = $this->kolabHost; - $newattrs['kolabHost']=array(); - $newattrs['kolabHost'][]=$tmp; - $newattrs['kolabHost'][]=$this->hostname; - } - /* Here we have already some entries */ - elseif(is_array($newattrs['kolabHost'])) - { - /* Insert the new one*/ - foreach($this->kolabHost as $key=>$val) { - if (is_int($key)) { - $newattrs['kolabHost'][] = $val; - } - } - $newattrs['kolabHost'][]= $this->hostname; - } - } - else - { - /* Here we want to delete an entry*/ - $newattrs['kolabHost']= $this->attrs['kolabHost']; - } - /* Save as following object ! */ - $this->kolabdn = "k=kolab,".$this->config->current['BASE']; - - /* If we already have an object like this one, - we only need to modify the entry - */ - /* is this an empty extension, no host defined for it, than delet it */ - if(count($newattrs['kolabHost'])==0) - { - /* Delete the entry*/ - $ldap->cd ("k=kolab,".$this->config->current['BASE']); - $ldap->rmdir("k=kolab,".$this->config->current['BASE']); + /* Add ourselves to the list of kolabHost's if needed */ + if (!in_array($this->cn, $this->kolabHost)){ + $this->kolabHost[]= $this->cn; + } + /* Call parents save to prepare $this->attrs */ + plugin::save(); - }elseif ($ldap->dn_exists($this->kolabdn)) { - /* Ok there is already an extension, so we only need to add the changes and the new Host, (if it was a new host)*/ - gosa_log("Modifying"); - - /* unset all attributes we won't change*/ - unset($newattrs['cyrus-admins']); - unset($newattrs['postfix-mydomain']); - unset($newattrs['postfix-mydestination']); - - /* Update changes */ - $ldap->cd($this->kolabdn); - $ldap->modify($newattrs); + /* Save or modify? */ + $ldap->cat($this->dn); + if (!$ldap->fetch()){ + $mode= "add"; } else { + $mode= "modify"; + } - /* We must create a new Entry */ - $newattrs['k'] = "kolab"; - $newattrs['uid'] = "freebusy"; - $newattrs['postfix-mydomain'] = "gonicus.de"; - $newattrs['postfix-mydestination'] = "\$mydomain"; - $newattrs['userPassword'] = "tester"; - $newattrs['objectClass'] = $this->objectclasses; - - /* For better reading / Objectclass was added at last */ - $newattrs = array_reverse ($newattrs); - - /* And add the entry*/ - $ldap->cd($this->kolabdn); - $ldap->add($newattrs); + /* Do attribute conversion */ + foreach ($this->attrs as $key => $value){ + if (preg_match('/_/', $key)){ + $old_key= $key; + $key= preg_replace('/_/', '-', $key); + $this->attrs[$key]= $value; + unset($this->attrs[$old_key]); + } } - /* show any errors */ + + /* Add kolab hosts */ + $this->attrs['kolabHost']= $this->kolabHost; + + /* Perform LDAP action */ + $ldap->cd($this->dn); + $ldap->$mode($this->attrs); show_ldap_error($ldap->get_error()); /* Optionally execute a command after we're done */ diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc index 22fb7ba96..bff759aab 100644 --- a/plugins/admin/systems/class_servService.inc +++ b/plugins/admin/systems/class_servService.inc @@ -7,7 +7,6 @@ class servservice extends plugin var $cli_description= "Some longer text\nfor help"; var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); - var $goExportEntry = array(); var $goTimeSource = array(); var $goLdapBase= ""; @@ -19,8 +18,8 @@ class servservice extends plugin var $goSyslogServer=""; var $goCupsServer=""; - /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes = array("goExportEntry","goTimeSource","goLdapBase","goXdmcpIsEnabled","goFontPath" ); var $objectclasses = array("top","goServer"); var $additionaloc = array( diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index d66d04314..7962a9db1 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -390,7 +390,7 @@ class systems extends plugin if (isset($_POST['edit_finish'])){ /* Check tabs, will feed message array */ - $message= $this->systab->check(TRUE); + $message= $this->systab->check(); /* Save, or display error message? */ if (count($message) == 0){ diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index bff08ac14..99b11ba7e 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -37,6 +37,7 @@ class termgeneric extends plugin var $modes= array(); /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes= array("gotoMode", "gotoTerminalPath", "macAddress", "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer", "gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule", diff --git a/plugins/admin/systems/class_terminalInfo.inc b/plugins/admin/systems/class_terminalInfo.inc index 82d7c0a0f..4b41bfbfd 100644 --- a/plugins/admin/systems/class_terminalInfo.inc +++ b/plugins/admin/systems/class_terminalInfo.inc @@ -26,6 +26,7 @@ class terminfo extends plugin var $cn= ""; /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes= array("cn", "gotoMode", "gotoTerminalPath", "gotoFloppyEnable", "gotoCdromEnable", "ghInventoryNumber", "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer", diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index 45fe6603e..0d5b0b851 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -31,6 +31,7 @@ class termservice extends plugin var $goFonHardware= "automatic"; /* Needed values and lists */ + var $ignore_account= TRUE; var $base= ""; var $cn= ""; var $orig_dn= ""; diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index ed905e093..5c7ae2aa8 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -24,7 +24,7 @@ class termstartup extends plugin /* Helper */ var $customParameters= ""; var $orig_dn= ""; - + var $ignore_account= TRUE; function termstartup ($config, $dn= NULL) { diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index 849f42587..cc0852f4f 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -37,15 +37,9 @@ class wingeneric extends plugin var $sambaNTPassword=""; var $sambaPwdLastSet=""; var $sambaAcctFlags=""; - - - - - - - /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes = array("cn", "description", "macAddress", "ipHostNumber","shadowLastChange", "uidNumber","gidNumber","loginShell","gecos","shadowMin","shadowWarning", "shadowInactive","uid","cn","sn","givenName","homeDirectory","sambaSID", @@ -54,12 +48,6 @@ class wingeneric extends plugin var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount","top", "device", "ipHost", "ieee802Device"); -// These are insertet !!! -//"posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount" - -//$attrs2("shadowLastChange","uidNumber","gidNumber","loginShell","gecos","shadowMin","shadowWarning","shadowInactive","uid","cn","sn","givenName","homeDirectory","sambaSID","sambaPrimaryGroupSID","displayName","sambaPwdCanChange2","sambaPwdMustChange","sambaNTPassword","sambaPwdLastSet","sambaAcctFlags"); - - function wingeneric ($config, $dn= NULL) { plugin::plugin ($config, $dn); diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index cf4ce53b9..cf9c8b9d2 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -28,7 +28,6 @@ class workgeneric extends plugin var $ghSoundAdapter= "-"; var $gotoLastUser= "-"; - /* Needed values and lists */ var $base= ""; var $cn= ""; @@ -38,6 +37,7 @@ class workgeneric extends plugin var $modes= array(); /* attribute list for save action */ + var $ignore_account= TRUE; var $attributes= array("gotoMode", "gotoTerminalPath", "macAddress", "gotoSwapServer", "gotoSyslogServer", "gotoNtpServer", "gotoFloppyEnable", "gotoCdromEnable", "cn", "gotoSndModule", diff --git a/plugins/admin/systems/servkolab.tpl b/plugins/admin/systems/servkolab.tpl index df206561c..20ec7e40d 100644 --- a/plugins/admin/systems/servkolab.tpl +++ b/plugins/admin/systems/servkolab.tpl @@ -173,3 +173,5 @@ + + diff --git a/plugins/admin/systems/tabs_server.inc b/plugins/admin/systems/tabs_server.inc index 4d4a4f425..12441a37e 100644 --- a/plugins/admin/systems/tabs_server.inc +++ b/plugins/admin/systems/tabs_server.inc @@ -23,9 +23,10 @@ class servtabs extends tabs foreach ($this->by_object as $key => $obj){ $this->by_object[$key]->dn= $this->dn; + $this->by_object[$key]->cn= $baseobject->cn; } - tabs::save(TRUE); + tabs::save(FALSE); /* Reload server settings after saving */ $config= $_SESSION['config'];