// Form data are not valid } else { $display['msg'] = display_warn_msg($l_invalid_data . ' : ' . $err['msg']); $display['detail'] = dis_company_form($action, $params); } } elseif ($action == 'update') { /////////////////////////////////////////////////////////////////////////////// if (check_user_defined_rules() && check_company_data_form($params['company_id'], $params)) { $retour = run_query_company_update($params['company_id'], $params); if ($retour) { $addressbooks = OBM_AddressBook::search(); $contacts = $addressbooks->searchContacts("companyId:$params[company_id]"); foreach($contacts as $contact) { OBM_Contact::solrStore($contact); } OBM_IndexingService::commit('contact'); $display['msg'] .= display_ok_msg("$l_company : $l_update_ok"); } else { $display['msg'] .= display_err_msg("$l_company : $l_update_error"); } $display['detail'] = dis_company_consult($params); } else { $display['msg'] .= display_warn_msg($l_invalid_data . ' : ' . $err['msg']); $display['detail'] = dis_company_form($action, $params); } } elseif ($action == 'check_delete') { /////////////////////////////////////////////////////////////////////////////// if (check_can_delete_company($params['company_id'])) {