From: Bruce R. <its...@us...> - 2002-07-26 21:14:05
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv25483 Modified Files: addressbook.php Log Message: full_address method added - itsbruce Index: addressbook.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/addressbook.php,v retrieving revision 1.40 retrieving revision 1.41 diff -u -w -r1.40 -r1.41 --- addressbook.php 24 Jun 2002 10:10:20 -0000 1.40 +++ addressbook.php 26 Jul 2002 21:14:02 -0000 1.41 @@ -202,6 +202,24 @@ /* + * This function takes a $row array as returned by the addressbook + * search and returns an e-mail address with the full name or + * nickname optionally prepended. + */ + + function full_address($row) { + global $addrsrch_fullname; + + if ((isset($addrsrch_fullname)) && ($addrsrch_fullname)) { + $name = ($addrsrch_fullname === 'nickname') ? $row['nickname'] + : $row['name']; + return $name . ' <' . trim($row['email']) . '>'; + } else { + return trim($row['email']); + } + } + + /* Return a list of addresses matching expression in all backends of a given type. */ |