X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Fdefault%2Faddressbook_list.tpl;h=dbbbce05f5ae23a54a70f118cce529922fa7170b;hp=456164712c4be15483d204c907076381214444dd;hb=caa596b29982636a056f813f41b43d1ec036d6a2;hpb=a71b394eb2e5ebd2c2229458d2242088807c5728
diff --git a/templates/default/addressbook_list.tpl b/templates/default/addressbook_list.tpl
index 45616471..dbbbce05 100644
--- a/templates/default/addressbook_list.tpl
+++ b/templates/default/addressbook_list.tpl
@@ -8,27 +8,32 @@
* $current_backend - integer containing backend currently displayed.
* $abook_select - string containing HTML to display the address book
* selection drop down
+ * $abook_has_extra_field - boolean TRUE if the address book contains an
+ * additional field. FALSE otherwise.
* $backends - array containing all available backends for selection.
* This will be empty if only 1 backend is available!
- * $addresses - array of addresses in the address book. Each element
+ * $addresses - array of backends in the address book. Each element
* is an array containing the following fields:
- * $el['BackendID'] - integer unique identifier for each source of
- * addresses in the book
- * $el['BackendSource'] - description of each source of addresses
- * $el['BackendWritable'] - boolean TRUE if the address book can be
- * modified. FALSE otherwise.
- * $el['Addresses'] - array containing address from this source.
- * Each array element contains the following:
- * $el['FirstName'] - The entry's first name
- * $el['LastName'] - The entry's last name (surname)
- * $el['FullName'] - The entry's full name (first + last)
- * $el['NickName'] - The entry's nickname
- * $el['Email'] - duh
- * $el['FullAddress'] - Email with full name or nick name
- * optionally prepended.
- * $el['Info'] - Additional info about this contact
- * $el['Extra'] - Additional field, if provided. NULL if this
- * field is not provided by the book.
+ * ['BackendID'] - integer unique identifier for each source of
+ * addresses in the book. this should also be
+ * the same as the array key for this value
+ * ['BackendSource'] - description of each source of addresses
+ * ['BackendWritable'] - boolean TRUE if the address book can be
+ * modified. FALSE otherwise.
+ * ['Addresses'] - array containing address from this source.
+ * Each array element contains the following:
+ * ['FirstName'] - The entry's first name
+ * ['LastName'] - The entry's last name (surname)
+ * ['FullName'] - The entry's full name (first + last)
+ * ['NickName'] - The entry's nickname
+ * ['Email'] - duh
+ * ['FullAddress'] - Email with full name or nick name
+ * optionally prepended.
+ * ['Info'] - Additional info about this contact
+ * ['Extra'] - Additional field, if provided. NULL if
+ * this field is not provided by the book.
+ * ['JSEmail'] - email address scrubbed for use with
+ * javascript functions.
*
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -38,15 +43,13 @@
*/
/** add required includes **/
-include_once(SM_PATH . 'templates/util_addressbook.php');
+include_once(SM_PATH . 'functions/template/abook_util.php');
/** extract template variables **/
extract($t);
-#echo dump_array($addresses).'
';
/** Begin template **/
$source = $addresses[$current_backend];
-$abook_has_extra_field = isset($source['Addresses'][0]) && !is_null($source['Addresses'][0]['Extra']);
$colspan = $abook_has_extra_field ? 6 : 5;
?>