From 20ad4fdd31197811bf33a6d835725739e8f3469c Mon Sep 17 00:00:00 2001 From: cigamit Date: Fri, 26 Mar 2004 14:23:07 +0000 Subject: [PATCH] Addressbook Fix. This code was suppose to allow the user to select whether to have the fullname, nickname, ect... returned from the addressbook to the the compose screen, but it was not working at all. Granted we do not have an option for this yet either, but that will follow fairly quickly. Thanks to William Bishop git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6904 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/addressbook.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/functions/addressbook.php b/functions/addressbook.php index ef757cf6..f5e6351e 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -213,12 +213,10 @@ class AddressBook { function full_address($row) { global $addrsrch_fullname, $data_dir, $username; - - if (($prefix = getPref($data_dir, $username, 'addrsrch_fullname') or - isset($addrsrch_fullname) and $prefix = $addrsrch_fullname) - and $prefix !== 'noprefix') { - $name = ($prefix === 'nickname') ? $row['nickname'] - : $row['name']; + $prefix = getPref($data_dir, $username, 'addrsrch_fullname'); + if (($prefix != "" || (isset($addrsrch_fullname) && + $prefix == $addrsrch_fullname)) && $prefix != 'noprefix') { + $name = ($prefix == 'nickname' ? $row['nickname'] : $row['name']); return $name . ' <' . trim($row['email']) . '>'; } else { return trim($row['email']); -- 2.25.1