echo $template->render(); } exit(); } else { contact_export_js_labels(); $template = new OBM_Template('main'); if(!$current['addressbook']) $current['addressbook'] = $addressbooks->getMyContacts()->id; if(!$contacts) $contacts = $addressbooks->searchContacts("addressbookId:$current[addressbook] -is:archive"); $template->set('searchpattern', $params['searchpattern']); $template->set('contactfilter', $params['contactfilter']); $template->set('contacts', $contacts); $template->set('contact', $contact); $template->set('addressbooks', $addressbooks); $template->set('current', $current); $template->set('searchfields', OBM_Contact::fieldsMap()); $template->set('customFields', OBM_Contact::getUserCategory()); //FIXME : Already set in some actions $template->set('fields', get_display_pref($GLOBALS['obm']['uid'], 'contact')); $template->set('template', $subTemplate); $display['detail'] = $template->render(); } } /////////////////////////////////////////////////////////////////////////////// // Display /////////////////////////////////////////////////////////////////////////////// $display['head'] = display_head($l_contact); $display['end'] = display_end(); if (! $params['popup']) { update_contact_action();