From 006400768d9e266a73d03ead064187f974c8a194 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 23 Nov 2007 08:32:08 +0000 Subject: [PATCH] bugfix: if you have custom addressbook types defined, the custom addressbook type selection within the listview will work now. --- addressbook/inc/class.uicontacts.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index b4e25937c2..61f16d7bdb 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -145,6 +145,12 @@ class uicontacts extends bocontacts { $org_view = $content['nm']['org_view']; } + if ($content['nm']['col_filter']['tid']) + { + $typeselection=$content['nm']['col_filter']['tid'] ; + } else { + $typeselection='n'; + } } elseif($_GET['add_list']) { @@ -169,6 +175,7 @@ class uicontacts extends bocontacts $content = array( 'msg' => $msg ? $msg : $_GET['msg'], ); + $content['nm'] = $GLOBALS['egw']->session->appsession($do_email ? 'email' : 'index','addressbook'); if (!is_array($content['nm'])) { @@ -286,12 +293,14 @@ class uicontacts extends bocontacts } else { + $content['nm']['col_filter']['tid'] = ($typeselection ? $typeselection : 'n'); $content['nm']['header_right'] = 'addressbook.index.right'; foreach($this->content_types as $tid => $data) { $sel_options['col_filter[tid]'][$tid] = $data['name']; } } + // get the availible org-views plus the label of the contacts view of one org $sel_options['org_view'] = $this->org_views; if (isset($org_view)) $content['nm']['org_view'] = $org_view;