diff --git a/plugins/admin/systems/class_goSpamServer.inc b/plugins/admin/systems/class_goSpamServer.inc
index b0a61d6fa767b712a9ea431aa099eb815f82488c..1d47712203a724b0c2a3380daa0d805a23dc0923 100644 (file)
var $ui = NULL;
var $acl = NULL;
- function gospamserver($config,$dn)
+ function gospamserver($config,$dn, $parent= NULL)
{
/* Init class */
- plugin::plugin($config,$dn);
+ plugin::plugin($config,$dn, $parent);
$this->DisplayName = _("Spamassassin");
/* Get userinfo & acls */
function AddTrust($post)
{
if(!empty($post)){
- $this->TrustedNetworks[$post] = $post;
+ if(is_ip($post) || is_domain($post) || (is_ip_with_subnetmask($post))){
+ $this->TrustedNetworks[$post] = $post;
+ }else{
+ print_red(_("Specified value is not a valid 'trusted network' value."));
+ }
}
}
/* 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"));
plugin::save();
/* Create Flags */
- $this->attrs['saFlags'] = "";
+ $this->attrs['saFlags'] = array();
foreach($this->Flags as $flag){
$var = "saFlags".$flag;
if($this->$var){