From: hickert Date: Fri, 24 Jun 2011 11:21:32 +0000 (+0000) Subject: iSorted mail forward adresses by their sn not cn in case of users. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aa3076caf22c8765888182ffcc44ee7b35e8d08f;p=gosa.git iSorted mail forward adresses by their sn not cn in case of users. 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 849276a49..f46159aad 100644 --- a/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc +++ b/gosa-plugins/mail/personal/mail/mailAddressSelect/class_mailAddressSelect.inc @@ -47,9 +47,19 @@ class mailAddressSelect extends management // 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 77e8649f0..f869fd9b3 100644 --- a/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-list.xml +++ b/gosa-plugins/mail/personal/mail/mailAddressSelect/selectMailAddress-list.xml @@ -49,7 +49,7 @@ cn string - %{cn} + %{filter:objectName(row,dn,cn,sn,givenName)} true