X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Faddressbook.php;h=2099ec479293ec9f8a0c1c906964797fbb1c6568;hb=472e7acbb50c8496ec9ae730bb82d785add1ed96;hp=0e2a44aa421c83bed06383cc2c56cbaab2d19cca;hpb=e7c6d43c6674bcf174c3d9cabf71f5f4f39be111;p=squirrelmail.git diff --git a/functions/addressbook.php b/functions/addressbook.php index 0e2a44aa..2099ec47 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -3,7 +3,7 @@ /** * addressbook.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Functions and classes for the addressbook system. @@ -24,25 +24,25 @@ The global addressbook is unmodifiable by anyone. You must actually use a shell script or whatnot to modify the contents. - global $data_dir; + global $data_dir, $address_book_global_filename; $address_book_global_filename = "$data_dir/global.abook"; Include backends here. */ -require_once('../functions/abook_local_file.php'); -require_once('../functions/abook_ldap_server.php'); +require_once(SM_PATH . 'functions/abook_local_file.php'); +require_once(SM_PATH . 'functions/abook_ldap_server.php'); global $addrbook_dsn; /* Use this if you wanna have a global address book */ if (isset($address_book_global_filename)) { - include_once('../functions/abook_global_file.php'); + include_once(SM_PATH . 'functions/abook_global_file.php'); } /* Only load database backend if database is configured */ if(isset($addrbook_dsn) && !empty($addrbook_dsn)) { - include_once('../functions/abook_database.php'); + include_once(SM_PATH . 'functions/abook_database.php'); } /* @@ -208,9 +208,9 @@ class AddressBook { */ function full_address($row) { - global $addrsrch_fullname, $datadir, $user; + global $addrsrch_fullname, $data_dir, $username; - if (($prefix = getPref($datadir, $user, 'addrsrch_fullname') or + if (($prefix = getPref($data_dir, $username, 'addrsrch_fullname') or isset($addrsrch_fullname) and $prefix = $addrsrch_fullname) and $prefix !== 'noprefix') { $name = ($prefix === 'nickname') ? $row['nickname']