~ubuntu-branches/ubuntu/quantal/squirrelmail/quantal

« back to all changes in this revision

Viewing changes to functions/addressbook.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2008-09-28 16:33:48 UTC
  • mfrom: (11.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080928163348-hgxf8au2d4zspabg
Tags: 2:1.4.15-3
Cookies sent over HTTPS will now be confined to HTTPS only
(cookie secure flag) and more support for the HTTPOnly cookie
attribute. Patch taken from upstream release.
(CVE-2008-3663, closes: #499942)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Functions require SM_PATH and support of forms.php functions
7
7
 *
8
 
 * @copyright © 1999-2006 The SquirrelMail Project Team
 
8
 * @copyright © 1999-2007 The SquirrelMail Project Team
9
9
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10
 
 * @version $Id: addressbook.php,v 1.47.2.21 2006/10/07 11:58:42 tokul Exp $
 
10
 * @version $Id: addressbook.php 12932 2008-02-10 16:49:47Z kink $
11
11
 * @package squirrelmail
12
12
 * @subpackage addressbook
13
13
 */
350
350
     */
351
351
 
352
352
    function full_address($row) {
353
 
        global $addrsrch_fullname, $data_dir, $username;
354
 
        $prefix = getPref($data_dir, $username, 'addrsrch_fullname');
355
 
        if (($prefix != "" || (isset($addrsrch_fullname) &&
356
 
            $prefix == $addrsrch_fullname)) && $prefix != 'noprefix') {
357
 
            $name = ($prefix == 'nickname' ? $row['nickname'] : $row['name']);
358
 
            return $name . ' <' . trim($row['email']) . '>';
359
 
        } else {
 
353
        global $data_dir, $username;
 
354
        $addrsrch_fullname = getPref($data_dir, $username, 'addrsrch_fullname');
 
355
        if ($addrsrch_fullname == 'fullname')
 
356
            return $row['name'] . ' <' . trim($row['email']) . '>';
 
357
        else if ($addrsrch_fullname == 'nickname')
 
358
            return $row['nickname'] . ' <' . trim($row['email']) . '>';
 
359
        else // "noprefix"
360
360
            return trim($row['email']);
361
 
        }
362
361
    }
363
362
 
364
363
    /*
696
695
 * @since 1.5.1 and 1.4.5
697
696
 */
698
697
do_hook('abook_add_class');
699
 
?>
 
 
b'\\ No newline at end of file'