summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5af02c1)
raw | patch | inline | side by side (parent: 5af02c1)
author | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Oct 2010 11:20:12 +0000 (11:20 +0000) | ||
committer | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Oct 2010 11:20:12 +0000 (11:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20024 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_Groupware.inc | patch | blob | history | |
gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc
index d1305cf515e5879e1ffe206658f9e73475bc0ce1..b402619ef8bac0bfbff19738725ebf0a034ce86a 100644 (file)
return($smarty->fetch(get_template_path("generic.tpl",TRUE,dirname(__FILE__))));
}
-
/****************
Filter editor
****************/
// Display dialog to select a local fowarder
if (isset($_POST['addLocalForwardingAddress'])){
$this->mailAddressSelectDialog= new mailAddressSelect($this->config, get_userinfo());
+
$this->dialog= TRUE;
}
+
// Close dialogs, action was canceled
if (isset($_POST['mailAddressSelect_cancel'])){
}
}
}
-
+
// Get posted flag changes
$flagAttrs = array("localDeliveryOnly","dropOwnMails");
foreach($flagAttrs as $attr){
function addForwarder($address)
{
if(empty($address)) return;
- if($this->acl_is_writeable("forwardingAddresses")){
- $this->forwardingAddresses[]= $address;
- $this->forwardingAddresses= array_unique ($this->forwardingAddresses);
- sort ($this->forwardingAddresses);
- reset ($this->forwardingAddresses);
- $this->is_modified= TRUE;
+ if($this->acl_is_writeable("forwardingAddresses")){
+ //Check if the address is a valid address on the Groupwareserver
+
+ $isMailAvailabel = $this->rpcExec("gwMailAddressExists", $address);
+ if(empty($isMailAvailabel)){
+ msg_dialog::display(_("Permission error"), _("This email address is not available as forwarding recipient in your groupware."), ERROR_DIALOG);
+ }
+ else{
+ $this->forwardingAddresses[]= $address;
+ $this->forwardingAddresses= array_unique ($this->forwardingAddresses);
+ sort ($this->forwardingAddresses);
+ reset ($this->forwardingAddresses);
+ $this->is_modified= TRUE;
+ }
}else{
msg_dialog::display(_("Permission error"), _("You have no permission to modify these addresses!"), ERROR_DIALOG);
}
*/
function delForwarder($addresses)
{
+ print_a(array("Del forwarder"));
if($this->acl_is_writeable("forwardingAddresses")){
$this->forwardingAddresses= array_remove_entries ($addresses, $this->forwardingAddresses);
$this->is_modified= TRUE;
}
}
-
-
$this->groupwareDao->saveFoldersAndAcls($this->uid, $this->mailFolder);
// Save the primary Email Address.
if(isset($this->forwardingAddresses) && is_array($this->forwardingAddresses)){
foreach($this->forwardingAddresses as $fAddress){
if(!tests::is_email ($fAddress)){
- $messages[] = msgPool::invalid(_("Alternate address"),$fAddress, "",
+ $messages[] = msgPool::invalid(_("Forwarding address"),$fAddress, "",
"user@exdom.intranet.gonicus.de");
}
+ //Check if the address is a valid address on the Groupwareserver
+ $isMailAvailabel = $this->rpcExec("gwMailAddressExists", $fAddress);
+ if(empty($isMailAvailabel)){
+ $messages[] = _("This email address is not available as forwarding recipient in your groupware.");
+ }
if($fAddress == $this->mailAddress){
- $messages[] = _("The primary address cannot be used as alternative address!");
+ $messages[] = _("The primary address cannot be used as forwarding address!");
}
}
}
if(isset($this->alternateAddresses) && is_array($this->alternateAddresses)){
+
foreach($this->alternateAddresses as $fAddress){
if(!tests::is_email ($fAddress)){
- $messages[] = msgPool::invalid(_("Forward address"),$fAddress, "", "user@excom.intranet.gonicus.de");
+ $messages[] = msgPool::invalid(_("Alternate address"),$fAddress, "", "user@excom.intranet.gonicus.de");
}
if($fAddress == $this->mailAddress){
- $messages[] = _("The primary address cannot be used as forward address!");
+ $messages[] = _("The primary address cannot be used as alternate address!");
}
}
}
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc
index 64dc67a848f98d41f85d6595dfed7dc306eedc11..287baff8bb60b83b4a3c3017e5f7a0f5b0864f3a 100644 (file)
//Folder Id from the User ...
//user/$id/
//$resultArr["mailFolder"] = $this->get("mailFolder", array("user/".$uid."/"));
+ //print_a($resultArr["mailFolder"]);
/*
"RIGHTS_NONE", 0);
"RIGHTS_READ", LOOKUP | READ | STATUS);