فهرست منبع

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

Jimmy Conner 21 سال پیش
والد
کامیت
e46abc71b8
1فایلهای تغییر یافته به همراه4 افزوده شده و 6 حذف شده
  1. 4 6
      functions/addressbook.php

+ 4 - 6
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']);