Revision: 12718
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12718&view=rev
Author: pdontthink
Date: 2007-10-01 12:37:52 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
Enabled user selection of address format when adding from address book during
message composition
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/functions/addressbook.php
branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php
branches/SM-1_4-STABLE/squirrelmail/include/options/display.php
Modified: branches/SM-1_4-STABLE/squirrelmail/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2007-10-01 10:22:35 UTC
(rev 12717)
+++ branches/SM-1_4-STABLE/squirrelmail/ChangeLog 2007-10-01 19:37:52 UTC
(rev 12718)
@@ -4,6 +4,8 @@
Version 1.4.12 - SVN
--------------------
+ - Enabled user selection of address format when adding from address
+ book during message composition.
Version 1.4.11 - 29 September 2007
----------------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/addressbook.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/addressbook.php
2007-10-01 10:22:35 UTC (rev 12717)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/addressbook.php
2007-10-01 19:37:52 UTC (rev 12718)
@@ -350,15 +350,14 @@
*/
function full_address($row) {
- global $addrsrch_fullname, $data_dir, $username;
- $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 {
+ global $data_dir, $username;
+ $addrsrch_fullname = getPref($data_dir, $username,
'addrsrch_fullname');
+ if ($addrsrch_fullname == 'fullname')
+ return $row['name'] . ' <' . trim($row['email']) . '>';
+ else if ($addrsrch_fullname == 'nickname')
+ return $row['nickname'] . ' <' . trim($row['email']) . '>';
+ else // "noprefix"
return trim($row['email']);
- }
}
/*
@@ -696,4 +695,4 @@
* @since 1.5.1 and 1.4.5
*/
do_hook('abook_add_class');
-?>
\ No newline at end of file
+?>
Modified: branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php 2007-10-01
10:22:35 UTC (rev 12717)
+++ branches/SM-1_4-STABLE/squirrelmail/include/load_prefs.php 2007-10-01
19:37:52 UTC (rev 12718)
@@ -220,6 +220,9 @@
$show_html_default =
getPref($data_dir, $username, 'show_html_default', SMPREF_OFF);
+$addrsrch_fullname =
+ getPref($data_dir, $username, 'addrsrch_fullname', SMPREF_OFF);
+
$enable_forward_as_attachment =
getPref($data_dir, $username, 'enable_forward_as_attachment', SMPREF_ON);
Modified: branches/SM-1_4-STABLE/squirrelmail/include/options/display.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/include/options/display.php
2007-10-01 10:22:35 UTC (rev 12717)
+++ branches/SM-1_4-STABLE/squirrelmail/include/options/display.php
2007-10-01 19:37:52 UTC (rev 12718)
@@ -231,7 +231,7 @@
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'use_javascript_addr_book',
- 'caption' => _("Addressbook Display Format"),
+ 'caption' => _("Address Book Display Format"),
'type' => SMOPT_TYPE_STRLIST,
'refresh' => SMOPT_REFRESH_NONE,
'posvals' => array('1' => _("Javascript"),
@@ -239,6 +239,16 @@
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'addrsrch_fullname',
+ 'caption' => _("Format of Addresses Added From Address Book"),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'posvals' => array('noprefix' => _("No prefix/Address only"),
+ 'nickname' => _("Nickname and address"),
+ 'fullname' => _("Full name and address"))
+ );
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'show_html_default',
'caption' => _("Show HTML Version by Default"),
'type' => SMOPT_TYPE_BOOLEAN,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
|