summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64de644)
raw | patch | inline | side by side (parent: 64de644)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Jun 2011 11:21:32 +0000 (11:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Jun 2011 11:21:32 +0000 (11:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20915 594d385d-05f5-0310-b6e9-bd551577e9d8
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-list.xml b/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-list.xml
index 77e8649f0605ff69d75e8c6d30e7eeb42fc0369e..f869fd9b3a30ac5207842a71ee5855965ecb2260 100644 (file)
<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>