Changeset 3729
- Timestamp:
- 02/02/11 15:28:29 (13 years ago)
- Location:
- branches/2.2/workflow
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/workflow/inc/class.WorkflowLDAP.inc.php
r3327 r3729 48 48 * @access public 49 49 */ 50 function WorkflowLDAP( )51 { 52 $this->dataSource =& Factory::getInstance('WorkflowObjects')->getLDAP( );50 function WorkflowLDAP($useCCParams = false) 51 { 52 $this->dataSource =& Factory::getInstance('WorkflowObjects')->getLDAP($useCCParams); 53 53 54 54 /* get the required parameters */ -
branches/2.2/workflow/inc/class.WorkflowObjects.inc.php
r3167 r3729 197 197 /** 198 198 * Retorna um recurso de LDAP 199 * @param bool $useCCParams Indica se deve usar os parâmetros do Contact Center 199 200 * @return resource O recurso LDAP 200 201 * @access public 201 202 */ 202 function &getLDAP( )203 function &getLDAP($useCCParams = false) 203 204 { 204 205 if (!isset($this->cache['ldap'])) … … 207 208 $this->assureEnvironment(); 208 209 209 /* check where the connection parameters are */ 210 $connectionInfo = (isset($GLOBALS['phpgw_info']['server']['ldap_host'])) ? 211 $GLOBALS['phpgw_info']['server'] : 212 $_SESSION['phpgw_info']['workflow']['server']; 213 214 /* load required information */ 215 $ldapConfigValues = galaxia_get_config_values(array('ldap_host' => '', 'ldap_user' => '', 'ldap_password'=> '', 'ldap_follow_referrals' => '')); 216 if (empty($ldapConfigValues['ldap_host'])) 217 $ldapConfigValues['ldap_host'] = $connectionInfo['ldap_host']; 210 if($useCCParams) 211 { 212 /* get the contact center's connection parameters */ 213 $ajaxConfig = &Factory::newInstance('ajax_config', 'contactcenter'); 214 $config = $ajaxConfig->read_repository(); 215 216 $ldapConfigValues['ldap_host'] = $config['cc_ldap_host0']; 217 $ldapConfigValues['ldap_user'] = $config['cc_ldap_browse_dn0']; 218 $ldapConfigValues['ldap_password'] = $config['cc_ldap_pw0']; 219 $ldapConfigValues['ldap_follow_referrals'] = 1; 220 } 221 else 222 { 223 /* check where the connection parameters are */ 224 $connectionInfo = (isset($GLOBALS['phpgw_info']['server']['ldap_host'])) ? 225 $GLOBALS['phpgw_info']['server'] : 226 $_SESSION['phpgw_info']['workflow']['server']; 227 228 /* load required information */ 229 $ldapConfigValues = galaxia_get_config_values(array('ldap_host' => '', 'ldap_user' => '', 'ldap_password'=> '', 'ldap_follow_referrals' => '')); 230 if (empty($ldapConfigValues['ldap_host'])) 231 $ldapConfigValues['ldap_host'] = $connectionInfo['ldap_host']; 232 } 218 233 219 234 /* connect to the LDAP server */ -
branches/2.2/workflow/inc/class.bo_participants.inc.php
r3704 r3729 34 34 function bo_participants() 35 35 { 36 $this->ldap = &Factory::getInstance('WorkflowLDAP'); 36 $useCCParams = (isset($_REQUEST['useCCParams']) && $_REQUEST['useCCParams'] !== 'false') ? (bool)$_REQUEST['useCCParams'] : false; 37 38 $this->ldap = &Factory::getInstance('WorkflowLDAP', $useCCParams); 37 39 } 38 40 -
branches/2.2/workflow/inc/class.ui_participants.inc.php
r3720 r3729 136 136 $smarty->assign('target', $_REQUEST['target_element']); 137 137 $smarty->assign('usePreffix', $usePreffix); 138 $smarty->assign('useCCParams', $_REQUEST['useCCParams']); 138 139 $smarty->assign('hideOrganizations', $hideOrganizations); 139 140 $smarty->assign('hideSectors', $hideSectors); -
branches/2.2/workflow/inc/smarty/wf_plugins/function.wf_select_user.php
r3715 r3729 38 38 'onlyVisibleAccounts' => true, 39 39 'useGlobalSearch' => false, 40 'useCCParams' => false, 40 41 'rows'=> 2); 41 42 $extractParams = array( … … 106 107 else 107 108 $extraParams .= "&useGlobalSearch=true"; 109 if (!empty($params['useCCParams']) && $params['useCCParams'] !== 'false') 110 $extraParams .= "&useCCParams=true"; 108 111 109 112 $image = Factory::getInstance('TemplateServer')->generateImageLink('add_user.png'); -
branches/2.2/workflow/inc/smarty/wf_plugins/function.wf_select_users.php
r3715 r3729 28 28 'onlyVisibleAccounts' => true, 29 29 'useGlobalSearch' => false, 30 'useCCParams' => false, 30 31 'get_email' => false, 31 32 'value' => array()); … … 72 73 else 73 74 $extraParams .= "&useGlobalSearch=true"; 75 if (!empty($params['useCCParams']) && $params['useCCParams'] !== 'false') 76 $extraParams .= "&useCCParams=true"; 74 77 75 78 $output = '<table border="0"><tr><td>'; -
branches/2.2/workflow/js/jscode/participants.js
r3167 r3729 27 27 entities: $F('entities'), 28 28 id: $F('id'), 29 usePreffix: $F('usePreffix') 29 usePreffix: $F('usePreffix'), 30 useCCParams: $F('useCCParams') 30 31 }; 31 32 callAjax('bo_participants', 'getSectors', resultGetSectors, params); … … 39 40 entities: $F('entities'), 40 41 id: $F('id'), 41 usePreffix: $F('usePreffix') 42 usePreffix: $F('usePreffix'), 43 useCCParams: $F('useCCParams') 42 44 }; 43 45 callAjax('bo_participants', 'getEntities', resultGetParticipants, params); … … 356 358 entities: $F('entities'), 357 359 id: $F('id'), 358 usePreffix: $F('usePreffix') 360 usePreffix: $F('usePreffix'), 361 useCCParams: $F('useCCParams') 359 362 }; 360 363 callAjax('bo_participants', 'globalSearch', resultPerformGlobalSearch, params); -
branches/2.2/workflow/templates/default/participants.tpl
r3715 r3729 14 14 <input type="hidden" id="target" value="{$target}"/> 15 15 <input type="hidden" id="usePreffix" value="{$usePreffix}"/> 16 <input type="hidden" id="useCCParams" value="{$useCCParams}"/> 16 17 <table border="0" width="400"> 17 18 {if !($hideOrganizations && $hideSectors)}
Note: See TracChangeset
for help on using the changeset viewer.