소스 검색

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