Uneditable address book entries no longer have checkboxes next to them on addresses...
[squirrelmail.git] / src / addressbook.php
index 294eab7fec8d200125a1e073a509ce9f04b34f3c..7c3ae718ad57ec236ee792cdfe91c993f06f1565 100644 (file)
@@ -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',
                           '<small>' .
                           addCheckBox('sel[]', $selected, $row['backend'].':'.$row['nickname']).
                           '</small>' ,
-                          'center', '', 'valign="top" width="1%"' ) .
-                html_tag( 'td', '&nbsp;' . $row['nickname'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap' ) . 
+                          'center', '', 'valign="top" width="1%"' );
+            } else {
+                echo html_tag( 'td',
+                        '&nbsp;' ,
+                        'center', '', 'valign="top" width="1%"' );
+            }
+            echo html_tag( 'td', '&nbsp;' . $row['nickname'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap' ) . 
                 html_tag( 'td', '&nbsp;' . $row['lastname'] . ' ' . $row['firstname'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap' ) .
                 html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . '&nbsp;';
                 } 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',
                 '<small>' .
                 '<input type=checkbox ' . $selected . ' name="sel[]" value="' .
                 $row['backend'] . ':' . $row['nickname'] . '" /></small>' ,
-                'center', '', 'valign="top" width="1%"' ) .
-            html_tag( 'td', '&nbsp;' . $row['nickname'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap' ) .
+                'center', '', 'valign="top" width="1%"' );
+            } else {
+                echo html_tag( 'td',
+                        '&nbsp;' ,
+                        'center', '', 'valign="top" width="1%"' );
+            }
+            echo html_tag( 'td', '&nbsp;' . $row['nickname'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap' ) .
             html_tag( 'td', '&nbsp;' . $row['name'] . '&nbsp;', 'left', '', 'valign="top" width="1%" nowrap' ) .
             html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . '&nbsp;';
                 }