index 544e0cb04b39aa1fc36bb0806abd5da8c2c3ed76..f7744376383a24247d20379ec9bb82c810835ec2 100644 (file)
}
/* Update quota values */
}
/* Update quota values */
- $this->quotaUsage= $quota['quotaUsage'];
- $this->gosaMailQuota= $quota['gosaMailQuota'];
+ if ($quota['gosaMailQuota'] == 2147483647){
+ $this->quotaUsage= "";
+ $this->gosaMailQuota= "";
+ } else {
+ $this->quotaUsage= $quota['quotaUsage'];
+ $this->gosaMailQuota= $quota['gosaMailQuota'];
+ }
$method->disconnect();
}
}
$method->disconnect();
}
}
+ /* Adapt attributes if needed */
+ $method->fixAttributesOnLoad($this);
}
/* Get global filter config */
}
/* Get global filter config */
function execute()
{
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Load templating engine */
$smarty= get_smarty();
if ($_SESSION['js']==FALSE){
/* Load templating engine */
$smarty= get_smarty();
if ($_SESSION['js']==FALSE){
/* Show dialog */
$smarty->assign("search_image", get_template_path('images/search.png'));
/* Show dialog */
$smarty->assign("search_image", get_template_path('images/search.png'));
+ $smarty->assign("usearch_image", get_template_path('images/search_user.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("infoimage", get_template_path('images/info.png'));
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("infoimage", get_template_path('images/info.png'));
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
}
if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){
$smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
}
if (is_numeric($this->gosaMailQuota) && $this->gosaMailQuota != 0){
- $smarty->assign("quotausage", progressbar(($this->quotaUsage * 100)/ $this->gosaMailQuota,100,15,true));
+ $smarty->assign("quotausage", progressbar(round(($this->quotaUsage * 100)/ $this->gosaMailQuota,100,15,true)));
$smarty->assign("quotadefined", "true");
} else {
$smarty->assign("quotadefined", "false");
$smarty->assign("quotadefined", "true");
} else {
$smarty->assign("quotadefined", "false");
$method->deleteMailbox($this->uid);
$method->disconnect();
}
$method->deleteMailbox($this->uid);
$method->disconnect();
}
+ $method->fixAttributesOnRemove($this);
}
/* Optionally execute a command after we're done */
}
/* Optionally execute a command after we're done */
/* Only do IMAP actions if we are not a template */
if (!$this->is_template){
$method= new $this->method($this->config);
/* Only do IMAP actions if we are not a template */
if (!$this->is_template){
$method= new $this->method($this->config);
+ $method->fixAttributesOnStore($this);
if ($method->connect($this->gosaMailServer)){
$method->updateMailbox($this->uid);
$method->setQuota($this->uid, $this->gosaMailQuota);
if ($method->connect($this->gosaMailServer)){
$method->updateMailbox($this->uid);
$method->setQuota($this->uid, $this->gosaMailQuota);
$message[]= _("Please enter a valid email addres in 'Primary address' field.");
}
$ldap->cd($this->config->current['BASE']);
$message[]= _("Please enter a valid email addres in 'Primary address' field.");
}
$ldap->cd($this->config->current['BASE']);
- $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=".
+ $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=".
$this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))");
if ($ldap->count() != 0){
$message[]= _("The primary address you've entered is already in use.");
$this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))");
if ($ldap->count() != 0){
$message[]= _("The primary address you've entered is already in use.");
}
if(empty($this->gosaMailServer)){
}
if(empty($this->gosaMailServer)){
- $message[] = _("Please Select a valid Mailserver.");
+ $message[] = _("Please select a valid mail server.");
}
return ($message);
}
return ($message);