diff --git a/addressbook/view.php b/addressbook/view.php index 5ee45cd478..1331240edd 100755 --- a/addressbook/view.php +++ b/addressbook/view.php @@ -42,6 +42,19 @@ $colname[$column[0]] = $column[1]; } } + + // No prefs? + if (!$columns_to_display ) { + $columns_to_display = array( + "n_given" => "n_given", + "n_family" => "n_family", + "org_name" => "org_name" + ); + while ($column = each($columns_to_display)) { + $colname[$column[0]] = $column[1]; + } + } + // merge in extra fields $extrafields = array ( "pager" => "pager", @@ -57,6 +70,7 @@ $view_header = "

 " . lang("Address book - view") . "


"; $view_header .= ''; + reset($columns_to_display); while ($column = each($columns_to_display)) { // each entry column $columns_html .= ""; $ref=$data="";
" . display_name($colname[$column[0]]) . ":