index 533347ddaf66b0cdf6caa000702d85475da0ed65..cf71b3b6629fbd132ca492cdaf64d0022e329efe 100644 (file)
$method= new $this->method($this->config);
if ($method->connect($this->attrs["gosaMailServer"][0])){
-
- /* get Quota
- */
- $quota= $method->getQuota($this->uid);
+
/* Maybe the entry is not saved in new style, get
permissions from IMAP and convert them to acl attributes */
}
} // ENDE ! isset ($this->attrs['acl'])
+
+ /* Adapt attributes if needed */
+ $method->fixAttributesOnLoad($this);
+
+ /* get Quota */
+ $quota= $method->getQuota($this->uid);
/* Update quota values */
- if ($quota['gosaMailQuota'] == 2147483647){
- $this->quotaUsage= "";
- $this->gosaMailQuota= "";
- } else {
- $this->quotaUsage= $quota['quotaUsage'];
- $this->gosaMailQuota= $quota['gosaMailQuota'];
+ if(is_array($quota)){
+ if ($quota['gosaMailQuota'] == 2147483647){
+ $this->quotaUsage= "";
+ $this->gosaMailQuota= "";
+ } else {
+ $this->quotaUsage= $quota['quotaUsage'];
+ $this->gosaMailQuota= $quota['gosaMailQuota'];
+ }
+ }else{
+ $this->quotaUsage = "";
+ $this->gosaMailQuota = "";
+ print_red(sprintf(_("Can't get quota information for '%s'."),$this->uid));
}
$method->disconnect();
} // ENDE $method->connect($this->attrs["gosaMailServer"][0])){
- /* Adapt attributes if needed */
- $method->fixAttributesOnLoad($this);
-
} // ENDE gosaMailServer
} // ENDE dn != "new"
}
$acl= array($this->config->current['BASE'] => ":all");
- $res= get_list($acl, "(&(objectClass=gosaMailAccount)$filter)", TRUE, $gmailfilter['depselect'], array("sn", "mail", "givenName"), TRUE);
+ $res= get_list("(&(objectClass=gosaMailAccount)$filter)", $acl, $gmailfilter['depselect'],
+ array("sn", "mail", "givenName"), GL_SUBSEARCH | GL_SIZELIMIT);
$ldap->cd($gmailfilter['depselect']);
$ldap->search ("(&(objectClass=gosaMailAccount)$filter)", array("sn", "mail", "givenName"));
error_reporting (0);
$ldap->cd($this->dn);
$ldap->modify ($this->attrs);
-
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing group mail settings failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events("remove");
/* Save arrays */
$this->attrs['gosaMailAlternateAddress'] = $this->gosaMailAlternateAddress;
$this->attrs['gosaMailForwardingAddress'] = $this->gosaMailForwardingAddress;
-
- /* Save shared folder target */
- $this->attrs['gosaSharedFolderTarget']= "share+".$this->uid;
+ $this->attrs['gosaSharedFolderTarget'] = "share+".$this->uid;
if(preg_match("/kolab/i",$this->mmethod)){
/* Save acl's */
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
-
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving group mail settings failed"));
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
{
$ldap= $this->config->get_ldap_link();
- $message= array();
+ /* Call common method to give check the hook */
+ $message= plugin::check();
+
if(!$this->is_account) return array();
//$message[] = $str;
$smarty->assign("gosaMailForwardingAddress",$this->gosaMailForwardingAddress);
$smarty->assign("mail",$this->mail);
$display= $smarty->fetch (get_template_path('paste_mail.tpl', TRUE));
- return($display);
+ $ret = array();
+ $ret['string'] = $display;
+ $ret['status'] = "";
+ return($ret);
}
function saveCopyDialog()