X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Futil_addressbook.php;h=7ff054346ccb5243251a7ea2a59787be4be664b3;hp=92c1b2fe031c075ab83fa9864067191d22ba8d4d;hb=821d1f1424ce74d60ae3b6e357a148658f17424e;hpb=caa596b29982636a056f813f41b43d1ec036d6a2 diff --git a/templates/util_addressbook.php b/templates/util_addressbook.php index 92c1b2fe..7ff05434 100644 --- a/templates/util_addressbook.php +++ b/templates/util_addressbook.php @@ -4,7 +4,7 @@ * * Functions to make working with address books easier * - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2012 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -21,8 +21,8 @@ */ function composeLink ($row) { return makeComposeLink('src/compose.php?send_to=' . - rawurlencode($row['FullAddress']), - htmlspecialchars($row['Email'])); + rawurlencode($row['RawFullAddress']), + sm_encode_html_special_chars($row['Email'])); } /** @@ -41,16 +41,17 @@ function formatAddressList ($addresses) { $contacts = array(); while(list($undef,$row) = each($addresses)) { $contact = array ( - 'FirstName' => htmlspecialchars($row['firstname']), - 'LastName' => htmlspecialchars($row['lastname']), - 'FullName' => htmlspecialchars($row['name']), - 'NickName' => htmlspecialchars($row['nickname']), - 'Email' => htmlspecialchars($row['email']), - 'FullAddress' => htmlspecialchars(AddressBook::full_address($row)), - 'Info' => htmlspecialchars($row['label']), - 'Extra' => (isset($row['extra']) ? $row['extra'] : NULL), - 'Source' => htmlspecialchars($row['source']), - 'JSEmail' => htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES), + 'FirstName' => sm_encode_html_special_chars($row['firstname']), + 'LastName' => sm_encode_html_special_chars($row['lastname']), + 'FullName' => sm_encode_html_special_chars($row['name']), + 'NickName' => sm_encode_html_special_chars($row['nickname']), + 'Email' => sm_encode_html_special_chars($row['email']), + 'FullAddress' => sm_encode_html_special_chars(AddressBook::full_address($row)), + 'RawFullAddress' => AddressBook::full_address($row), + 'Info' => sm_encode_html_special_chars($row['label']), + 'Extra' => (isset($row['extra']) ? $row['extra'] : NULL), + 'Source' => sm_encode_html_special_chars($row['source']), + 'JSEmail' => sm_encode_html_special_chars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES), ); $contacts[] = $contact; } @@ -122,6 +123,16 @@ function insert_javascript() { } } + function CheckAll(ch) { + var chkObj = ""; + for (var i = 0; i < document.addressbook.elements.length; i++) { + chkObj = document.addressbook.elements[i]; + if (chkObj.type == "checkbox" && chkObj.name.substr(0,16) == "send_to_search[" + ch) { + chkObj.checked = !(chkObj.checked); + } + } + } + // -->