summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fde185)
raw | patch | inline | side by side (parent: 6fde185)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 07:28:55 +0000 (07:28 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 07:28:55 +0000 (07:28 +0000) |
Fixed service removement for virus/spam
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4355 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4355 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_goSpamServer.inc b/plugins/admin/systems/class_goSpamServer.inc
index b0a61d6fa767b712a9ea431aa099eb815f82488c..24884965fc4c74251e9361ed3e29a5c12943dbdc 100644 (file)
/* remove this extension */
function remove_from_parent()
{
+
if(!$this->is_account && $this->initially_was_account){
+
plugin::remove_from_parent();
+ /* Remove status flag, it is not a memeber of
+ this->attributes, so ensure that it is deleted too */
+ if(!empty($this->StatusFlag)){
+ $this->attrs[$this->StatusFlag] = array();
+ }
+
/* Check if this is a new entry ... add/modify */
$ldap = $this->config->get_ldap_link();
$ldap->cat($this->dn,array("objectClass"));
diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc
index 7b334597b420f49bbddb411a4b5b686d183cd898..7a1dde535f0174ca6160849cb0f9c957d28d4406 100644 (file)
function remove_from_parent()
{
if(!$this->is_account && $this->initially_was_account){
+
plugin::remove_from_parent();
+ /* Remove status flag, it is not a memeber of
+ this->attributes, so ensure that it is deleted too */
+ if(!empty($this->StatusFlag)){
+ $this->attrs[$this->StatusFlag] = array();
+ }
+
/* Check if this is a new entry ... add/modify */
$ldap = $this->config->get_ldap_link();
$ldap->cat($this->dn,array("objectClass"));
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 03083da98dbe8b05358f155df8c89d7c74d66fa4..09d5d80eb05befd181d165536295324d02babae6 100644 (file)
foreach($this->attrs[$attr] as $mem){
if(preg_match("/Group/",$type)){
$ldap->search("(&(objectClass=posixGroup)(cn=".$mem."))",array("cn","description"));
- $entry = $ldap->fetch();
- $this->member[$type][$entry['cn'][0]]=$entry;
+ if($ldap->count()){
+ $entry = $ldap->fetch();
+ if(isset($entry['cn'])){
+ $this->member[$type][$entry['cn'][0]]=$entry;
+ }
+ }
}else{
$ldap->search("(&(objectClass=person)(objectClass=inetOrgPerson)(uid=".$mem."))",array("cn","uid"));
- $entry = $ldap->fetch();
- if(isset($entry['uid'])){
- $this->member[$type][$entry['uid'][0]]=$entry;
+ if($ldap->count()){
+ $entry = $ldap->fetch();
+ if(isset($entry['uid'])){
+ $this->member[$type][$entry['uid'][0]]=$entry;
+ }
}
}
}