summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce95ac1)
raw | patch | inline | side by side (parent: ce95ac1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 20 Jun 2005 10:45:37 +0000 (10:45 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 20 Jun 2005 10:45:37 +0000 (10:45 +0000) |
plugins/admin/systems/class_servDB.inc | patch | blob | history | |
plugins/admin/systems/class_servService.inc | patch | blob | history |
index 260097ab20ed07c72e140dfbf458708b31249460..316089bd9d94ff7422a17f901a80c8398cb7dcd5 100644 (file)
}
$this->attrs = array_reverse($this->attrs);
-
-
/* Write to LDAP */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc
index 444df8cf0ae3410562407ef4ab59a24a81847c20..9189fad0d9706526080d866a05c94018d00b9af4 100644 (file)
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("goLdapBase","goXdmcpIsEnabled","goFontPath");
+ var $possible_objectclasses= array( "goNfsServer", "goNtpServer", "goServer", "goLdapServer",
+ "goTerminalServer", "goSyslogServer", "goCupsServer");
var $objectclasses = array("top","goServer");
var $additionaloc = array( "goNfsServer" => array("goExportEntry"),
"goNtpServer" => array("goTimeSource"),
plugin::save();
- /* Normalize objectclasses */
- $this->attrs['objectClass']= $this->objectclasses;
+ $tmp= array();
+
+ /* Remove all from this plugin */
+ foreach($this->attrs['objectClass'] as $oc){
+ if (!in_array_ics($oc, $this->possible_objectclasses)){
+ $tmp[]= $oc;
+ }
+ }
+
+ /* Merge our current objectclasses */
+ foreach($this->objectclasses as $oc){
+ if (!in_array_ics($oc, $tmp)){
+ $tmp[]= $oc;
+ }
+ }
+
+ /* Reassign cleaned value */
+ $this->attrs['objectClass']= $tmp;
/* Remove illegal attributes */
foreach ($this->additionaloc as $oc => $attrs){