summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d09596)
raw | patch | inline | side by side (parent: 2d09596)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 13 May 2005 12:35:24 +0000 (12:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 13 May 2005 12:35:24 +0000 (12:35 +0000) |
plugins/admin/systems/class_servDB.inc | patch | blob | history | |
plugins/admin/systems/class_servService.inc | patch | blob | history |
index dfa0f784fbbb2260a9edd3577c684bfe814bebe0..7518cdcf60d047f3f9aa99c09fd1c3531068e0c4 100644 (file)
plugin::save();
/* Remove objectclasses */
- unset ($this->attrs['objectClass']);
+ foreach(array_merge($this->objectclasses, $this->additionaloc) as $oc){
+ foreach ($this->attrs['objectClass'] as $key => $value){
+ if ($value == $oc){
+ unset ($this->attrs['objectClass'][$key]);
+ }
+ }
+ }
foreach($this->objectclasses as $oc){
$this->attrs['objectClass'][]= $oc;
}
diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc
index df8f12ec6a35e9c0234bfe015e910d5f862a1ce3..6cace375b388c0cb07d80cf4c2bfc94bef5ffedb 100644 (file)
/* attribute list for save action */
- var $attributes = array("goExportEntry","goTimeSource","goLdapBase","goXdmcpIsEnabled","goFontPath");
+ var $attributes = array("goExportEntry","goTimeSource","goLdapBase","goXdmcpIsEnabled","goFontPath" );
var $objectclasses = array("top","goServer");
var $additionaloc = array(
"goNtpServer" => array("goTimeSource"),
"goLdapServer" => array("goLdapBase"),
"goTerminalServer"=> array("goXdmcpIsEnabled", "goFontPath"),
- "goSyslogServer" => array(""),
- "goCupsServer" => array("")
+ "goSyslogServer" => array(),
+ "goCupsServer" => array()
);
{
plugin::plugin ($config, $dn);
- /* Always is account... */
-
foreach ($this->additionaloc as $oc => $dummy){
if (isset($this->attrs['objectClass']) && in_array($oc, $this->attrs['objectClass'])){
$this->objectclasses[$oc]= $oc;
plugin::save();
/* Remove objectclasses */
- unset ($this->attrs['objectClass']);
+ foreach(array_merge($this->objectclasses, $this->additionaloc) as $oc){
+ foreach ($this->attrs['objectClass'] as $key => $value){
+ if ($value == $oc){
+ unset ($this->attrs['objectClass'][$key]);
+ }
+ }
+ }
+ $this->attrs['objectClass']=array();
foreach($this->objectclasses as $oc){
$this->attrs['objectClass'][]= $oc;
}
+
/* Adapt sieve server if needed */
if (in_array('goImapServer', $this->objectclasses)){
$this->attrs['goImapSieveServer']= preg_replace('/:.*$/', '',
}
}
}
-
+
+ print_a($this->attrs);
+
/* Write to LDAP */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);