Changeset 4498 for sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
- Timestamp:
- 05/24/11 17:58:15 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/contactcenter/inc/class.ui_data.inc.php
r4483 r4498 1803 1803 1804 1804 /* Relations */ 1805 1805 1806 /* Groups */ 1807 /* 1808 * Criado uma estrutura no data que conterá os grupos do 1809 * contato. O formato é: 1810 * data['groups'] = array( 1811 * 'id_group' => array( 1812 * 'id_group', 'title', 'short_name' 1813 * ) 1814 * ); 1815 */ 1816 $boGroup = CreateObject('contactcenter.bo_group'); 1817 $groups = $boGroup->get_contact_groups($id); 1818 1819 $i = 0; 1820 $data['groups'] = array(); 1821 foreach($groups as $group) 1822 { 1823 $idGroup = $group['id_group']; 1824 $data['groups'][$idGroup] = array( 1825 'title' => $group['title'], 1826 'id_group' => $idGroup, 1827 'short_name' => $group['short_name'] 1828 ); 1829 $i++; 1830 } 1831 1806 1832 echo serialize($data); 1807 1833 } … … 1822 1848 $predata[] = $boPeopleCatalog -> get_all_countries(); 1823 1849 $predata[] = $boPeopleCatalog -> get_all_connections_types(); 1850 $boGroup = CreateObject('contactcenter.bo_group'); 1851 $predata[] = $boGroup->get_groups_by_user(); 1824 1852 //$predata[] = $this->bo->catalog->get_all_relations_types(); 1825 1853 … … 2444 2472 /* Does nothing... */ 2445 2473 break; 2474 case 'groups': 2475 $groups = $data['groups']; 2476 unset($data['groups']); 2477 break; 2446 2478 2447 2479 default: … … 2478 2510 'status' => 'fail' 2479 2511 ); 2512 } 2513 else 2514 { 2515 $this->bo->catalog->update_contact_groups($id, $groups); 2480 2516 } 2481 2517
Note: See TracChangeset
for help on using the changeset viewer.