Changeset 4502 for sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
- Timestamp:
- 05/25/11 12:08:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
r4500 r4502 2029 2029 $data['contact_in_list'] = $new_tdata[1]; 2030 2030 $data['id_group'] = $new_tdata[2]; 2031 $data['old_contacts_in_list'] = $new_tdata[3]; 2031 2032 2032 $contactWOemail = false; 2033 2034 foreach ($data['contact_in_list'] as $id_connection) 2035 { 2036 $boConn = CreateObject('contactcenter.bo_connection'); 2037 $type = $boConn->get_connection_type_by_conn_id($id_connection); 2038 if ($type != 1) 2039 { 2040 $contactWOemail = true; 2041 break; 2042 } 2043 } 2044 2045 2033 foreach ($data['old_contacts_in_list'] as $id_connection) 2034 { 2035 $boConn = CreateObject('contactcenter.bo_connection'); 2036 2037 $id_contact = $boConn->get_contact_id_by_connection($id_connection); 2038 $contact = CreateObject('contactcenter.so_contact', $id_contact); 2039 $contact->set_field("last_status", 'U'); 2040 $contact->set_field("last_update",time()."000"); 2041 $contact->commit(); 2042 } 2043 2044 $contactWOemail = false; 2045 2046 foreach ($data['contact_in_list'] as $id_connection) 2047 { 2048 $boConn = CreateObject('contactcenter.bo_connection'); 2049 2050 $id_contact = $boConn->get_contact_id_by_connection($id_connection); 2051 $contact = CreateObject('contactcenter.so_contact', $id_contact); 2052 $contact->set_field("last_status", 'U'); 2053 $contact->set_field("last_update",time()."000"); 2054 $contact->commit(); 2055 2056 if (!$contactWOemail) 2057 { 2058 $type = $boConn->get_connection_type_by_conn_id($id_connection); 2059 if ($type != 1) 2060 { 2061 $contactWOemail = true; 2062 } 2063 } 2064 } 2065 2066 2046 2067 $acumulatedErrors = ''; 2047 2068 … … 2497 2518 if (!is_null($id) and $id !== '') 2498 2519 { 2499 $id = $this->bo->catalog->update_single_info($id, $data); 2520 $old_connections = $this->bo->catalog->get_connections($id); 2521 $id = $this->bo->catalog->update_single_info($id, $data); 2500 2522 $result = array( 2501 2523 'msg' => lang('Updated Successfully!'), … … 2522 2544 else 2523 2545 { 2524 $this->bo->catalog->update_contact_groups($id, $groups); 2546 if (isset($old_connections)) 2547 $this->bo->catalog->update_contact_groups($id, $groups, $old_connections); 2548 else 2549 $this->bo->catalog->update_contact_groups($id, $groups); 2525 2550 } 2526 2551
Note: See TracChangeset
for help on using the changeset viewer.