Changeset 4477 for sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
- Timestamp:
- 05/20/11 17:03:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
r4289 r4477 1682 1682 1683 1683 $boGroup = CreateObject('contactcenter.bo_group'); 1684 1685 $all_contacts = $boGroup->get_all_contacts('only_email',$shared_from); 1684 1685 $all_contacts = $boGroup->get_all_contacts(false,$shared_from); 1686 1686 1687 1687 1688 $contact_options = ""; 1688 1689 if(count($all_contacts)) { 1689 1690 foreach($all_contacts as $idx => $contact) { 1690 $contact_options .= "<OPTION value='".$contact['id_connection']."'>".$contact['names_ordered']." (".$contact['connection_value'].")</OPTION>"; 1691 $contact_options .= "<OPTION value='".$contact['id_connection']."'>".$contact['names_ordered']; 1692 if (isset($contact['connection_value'])) 1693 $contact_options .= " (".$contact['connection_value'].")</OPTION>"; 1694 else 1695 $contact_options .= " (". $contact['phone'].")</OPTION>"; 1691 1696 } 1692 1697 } … … 1987 1992 $data['contact_in_list'] = $new_tdata[1]; 1988 1993 $data['id_group'] = $new_tdata[2]; 1994 1995 $contactWOemail = false; 1996 1997 foreach ($data['contact_in_list'] as $id_connection) 1998 { 1999 $boConn = CreateObject('contactcenter.bo_connection'); 2000 $type = $boConn->get_connection_type_by_conn_id($id_connection); 2001 if ($type != 1) 2002 { 2003 $contactWOemail = true; 2004 break; 2005 } 2006 } 2007 2008 1989 2009 $acumulatedErrors = ''; 1990 2010 … … 2038 2058 { 2039 2059 $this->page_info['changed'] = true; 2040 2060 2061 if (!$contactWOemail) 2062 echo serialize(array( 2063 'msg' => lang('Entry added with success!'), 2064 'status' => 'ok' 2065 )); 2066 else 2067 echo serialize(array( 2068 'msg' => lang('Entry added with success. But some contacts will not receive or send messages.'), 2069 'status' => 'warning' 2070 )); 2071 } 2072 else 2073 { 2041 2074 echo serialize(array( 2042 'msg' => lang('Entry added with success!'), 2043 'status' => 'ok' 2044 )); 2045 } 2046 else 2047 { 2048 echo serialize(array( 2049 'msg' => lang('Problems on adding your Contact. No Contact added!'). 2050 "\n".$acumulatedErrors, 2075 'msg' => lang('Problems on adding your Contact. No Contact added!'), 2051 2076 'status' => 'error' 2052 2077 ));
Note: See TracChangeset
for help on using the changeset viewer.