summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab134f5)
raw | patch | inline | side by side (parent: ab134f5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2011 09:02:21 +0000 (09:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2011 09:02:21 +0000 (09:02 +0000) |
-Fixed problem with selecting forward addresses in mailAccount plugin
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@21001 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@21001 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc
index f75e0e0061ec00873a7f18c634e26574b0f55d10..18f2ccfd2995b90e1fed150892377c8f005c5f00 100644 (file)
return(" "._("Unlimited"));
}else{
$usage =round(($use/$quota) * 100);
- return("<img src='progress.php?x=100&y=17&p=$usage'>");
+ return(progressbar($usage,100,15,true));
}
}
diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc
index ba6b720d023d41a59b628b335367aa6e545eca87..1d3993a1dca3468f42cd1e203e80e3ace9dc3d26 100644 (file)
/* Initialize configured values
*/
- if($this->is_account){
+ if($this->is_account && !$this->is_template){
if($this->mailMethod->connect() && $this->mailMethod->account_exists()){
$list = $this->mailAddressSelect->save();
foreach ($list as $entry){
$val = $entry['mail'][0];
- if (!in_array ($val, $this->gosaMailAlternateAddress) && $val != $this->mail){
+ if (!in_array_strict($val, $this->gosaMailAlternateAddress) && $val != $this->mail){
$this->addForwarder($val);
$this->is_modified= TRUE;
}
return($this->mailAddressSelect->execute());
}
- if (isset($_POST['add_forwarder'])){
- if ($_POST['forward_address'] != ""){
+ if (isset($_POST['add_forwarder']) && isset($_POST['forward_address'])){
+ if (!empty($_POST['forward_address'])){
$address= get_post('forward_address');
$valid= FALSE;
if (!tests::is_email($address)){
}
}
}
- if (isset($_POST['delete_forwarder'])){
+ if (isset($_POST['delete_forwarder']) && isset($_POST['forwarder_list'])){
$this->delForwarder ($_POST['forwarder_list']);
}
if ($this->mailAddressSelect instanceOf mailAddressSelect){
*/
$smarty->assign("spamlevel", $this->SpamLevels);
$smarty->assign("spambox" , $this->MailBoxes);
-
+ $smarty->assign("is_template", $this->is_template);
$smarty->assign("multiple_support",$this->multiple_support_active);
return($display.$smarty->fetch(get_template_path("generic.tpl",TRUE,dirname(__FILE__))));
}
$server = $this->gosaMailServer;
plugin::save_object();
- if(!$this->mailMethod->isModifyableServer() && $this->initially_was_account){
+ if(!$this->mailMethod->isModifyableServer() && $this->initially_was_account && !$this->is_template){
$this->gosaMailServer = $server;
}
- if(!$this->mailMethod->isModifyableMail() && $this->initially_was_account){
+ if(!$this->mailMethod->isModifyableMail() && $this->initially_was_account && !$this->is_template){
$this->mail = $mail;
}else{
diff --git a/gosa-plugins/mail/personal/mail/generic.tpl b/gosa-plugins/mail/personal/mail/generic.tpl
index 82724c1f1391757e1f4b226e3f4dc2e207cbf912..423a9aae53e3c03f42e0dbae35bc1e7a05711360 100644 (file)
<tr>
<td><label for="mail">{t}Primary address{/t}</label>{$must}</td>
<td>
- {if !$isModifyableMail && $initially_was_account}
+ {if !$isModifyableMail && $initially_was_account && !$is_template}
<input type='text' disabled size=30 value="{$mail}">
{else}
{if $domainSelectionEnabled}
<tr>
<td><label for="gosaMailServer">{t}Server{/t}</label></td>
<td>
- {if !$isModifyableServer && $initially_was_account}
+ {if !$isModifyableServer && $initially_was_account && !$is_template}
<input type='text' disabled size=30 value="{$gosaMailServer}">
{else}
diff --git a/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc b/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc
index 849276a49755336378354a6692119d7c16cc0a06..f46159aadf4b6b332503f622175f1df0055a90b9 100644 (file)
// Build headpage
$headpage = new listing(get_template_path("selectMailAddress-list.xml", true, dirname(__FILE__)));
$headpage->setFilter($filter);
+ $headpage->registerElementFilter("objectName", "mailAddressSelect::objectNameFilter");
parent::__construct($config, $ui, "mail", $headpage);
}
+ static function objectNameFilter($id,$dn,$cn,$sn=NULL,$givenName=NULL)
+ {
+ if($sn){
+ return("{$sn[0]}, {$givenName[0]}");
+ }else{
+ return("{$cn[0]}");
+ }
+ }
+
function save()
{
$act = $this->detectPostActions();
diff --git a/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-filter.xml b/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-filter.xml
index 05501beb96686fb2c808b02b94f82836833ded6a..647adfe6647512738d41751e867779471ed644ba 100644 (file)
<tag>default</tag>
<label>Default filter</label>
<query>
- <backend>LDAPBlacklist</backend>
+ <backend>NOACL</backend>
<filter>(&(objectClass=gosaMailAccount)(mail=$))</filter>
</query>
<autocomplete>
diff --git a/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-list.xml b/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-list.xml
index 1527f056931f24acc5c235ebb9806f325421eef6..f869fd9b3a30ac5207842a71ee5855965ecb2260 100644 (file)
<template>../plugins/personal/mail/mailAddressSelect/selectMailAddress-list.tpl</template>
<label>Please select the desired entries</label>
<defaultSortColumn>1</defaultSortColumn>
+ <noAclChecks>true</noAclChecks>
<objectType>
<label>User</label>
<label>Name</label>
<sortAttribute>cn</sortAttribute>
<sortType>string</sortType>
- <value>%{cn}</value>
+ <value>%{filter:objectName(row,dn,cn,sn,givenName)}</value>
<export>true</export>
</column>