Index: addressbook.php
===================================================================
--- addressbook.php (revision 12451)
+++ addressbook.php (working copy)
@@ -362,9 +362,12 @@
echo html_tag( 'p', '' . _("Add address") . '', 'center' ) . "\n";
+ /*added by select_range patch*/
+ do_hook('addressbook_before_list');
+
/* List addresses */
if (count($alist) > 0) {
- echo addForm($form_url, 'post');
+ echo addForm($form_url, 'post', 'FormAddrsAbook');
if ($abook->add_extra_field) {
$abook_fields = 6;
} else {
@@ -375,6 +378,7 @@
/* New table header for each backend */
if($prevbackend != $row['backend']) {
if($prevbackend < 0) {
+ /*
echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td',
@@ -386,6 +390,7 @@
html_tag( 'td', '
', 'center', '', 'colspan="5"' )
),
'center' );
+ */
}
echo html_tag( 'table',
@@ -405,9 +410,11 @@
html_tag( 'th', _("E-mail").
show_abook_sort_button($abook_sort_order, _("sort by email"), 4, 5),
'left', '', 'width="1%"' ) .
+ /*
html_tag( 'th', _("Info").
show_abook_sort_button($abook_sort_order, _("sort by info"), 6, 7),
'left', '', 'width="1%"' ) .
+ */
($abook->add_extra_field ? html_tag( 'th', ' ','left', '', 'width="1%"'): ''),
'', $color[9] ) . "\n";
@@ -443,7 +450,7 @@
html_tag( 'td', ' ' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) .
html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' ';
} else {
- echo html_tag( 'tr', '', '', $tr_bgcolor);
+ echo html_tag( 'tr', '', '', $tr_bgcolor, addressbook_ui_enhancements_row_tag($row));
if ($abook->backends[$row['backend']]->writeable) {
echo html_tag( 'td',
'' .
@@ -455,15 +462,19 @@
' ' ,
'center', '', 'valign="top" width="1%"' );
}
- echo html_tag( 'td', ' ' . htmlspecialchars($row['nickname']) . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['name']) . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) .
+ echo html_tag( 'td', ' ' . htmlspecialchars($row['nickname']) . ' ', 'left', '', 'valign="top" width="1%" nowrap'.addressbook_ui_enhancements_name_col($row) ) .
+ html_tag( 'td', ' ' . htmlspecialchars($row['name']) . ' ', 'left', '', 'valign="top" width="1%" nowrap'. addressbook_ui_enhancements_name_col($row) ) .
html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' ';
}
$email = $abook->full_address($row);
- echo makeComposeLink('src/compose.php?send_to='.rawurlencode($email),
- htmlspecialchars($row['email'])).
- ' '."\n".
+ if(!empty($email)) {
+ echo makeComposeLink('src/compose.php?send_to='.rawurlencode($email),
+ htmlspecialchars($row['email']));
+ }
+ /*
+ echo ' '."\n".
html_tag( 'td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'valign="top" width="1%"' );
+ */
// add extra column if third party backend needs it
if ($abook->add_extra_field) {
@@ -473,6 +484,7 @@
}
echo "\n";
+ do_hook('addressbook_after_row', $row);
$line++;
}