From 19d01c6b200dfd6317e4a933325d903ba2901726 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Thu, 5 Aug 2004 08:29:27 +0000 Subject: [PATCH 1/1] Uneditable address book entries no longer have checkboxes next to them on addresses page (Thanks to Rolan Yang for patch) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7826 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + src/addressbook.php | 28 ++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6140c064..e418e125 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,6 +83,7 @@ Version 1.5.1 -- CVS - Make SquirrelSpell work with safe_mode enabled, if using PHP >=4.3.0. Patch by Ray Ferguson. - Make IP-address in Message-ID RFC822 compliant. + - Uneditable address book entries no longer have checkboxes on addresses page Version 1.5.0 -------------------- diff --git a/src/addressbook.php b/src/addressbook.php index 294eab7f..7c3ae718 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -420,23 +420,35 @@ if ($showaddrlist) { } if ($squirrelmail_language == 'ja_JP') { - echo html_tag( 'tr', '', '', $tr_bgcolor) . - html_tag( 'td', + echo html_tag( 'tr', '', '', $tr_bgcolor); + if ($abook->backends[$row['backend']]->writeable) { + echo html_tag( 'td', '' . addCheckBox('sel[]', $selected, $row['backend'].':'.$row['nickname']). '' , - 'center', '', 'valign="top" width="1%"' ) . - html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . + 'center', '', 'valign="top" width="1%"' ); + } else { + echo html_tag( 'td', + ' ' , + 'center', '', 'valign="top" width="1%"' ); + } + echo html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', ' ' . $row['lastname'] . ' ' . $row['firstname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' '; } else { - echo html_tag( 'tr', '', '', $tr_bgcolor) . - html_tag( 'td', + echo html_tag( 'tr', '', '', $tr_bgcolor); + if ($abook->backends[$row['backend']]->writeable) { + echo html_tag( 'td', '' . '' , - 'center', '', 'valign="top" width="1%"' ) . - html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . + 'center', '', 'valign="top" width="1%"' ); + } else { + echo html_tag( 'td', + ' ' , + 'center', '', 'valign="top" width="1%"' ); + } + echo html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', ' ' . $row['name'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' '; } -- 2.25.1