Changeset 12215
- Timestamp:
- 06/06/11 10:56:21 (2 years ago)
- Files:
-
- modules/branches/2.9/directory/agi-bin/directory.agi (modified) (3 diffs)
- modules/branches/2.9/directory/functions.inc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.9/directory/agi-bin/directory.agi
r12214 r12215 99 99 break; 100 100 } 101 102 } 103 101 } 104 102 //wait for a responce before restarting loop 105 if (!isset($ret) || !$ret || $ret['result'] == '0') {103 if (!isset($ret) || !$ret) { 106 104 $ret = $dir->agi->wait_for_digit(10000); 107 105 if (trim($ret['result'])) { … … 110 108 } 111 109 110 111 debug("got result: ".$ret['result']); 112 112 if(trim($ret['result'])){ 113 113 call($matches[$ret['result']-1]); … … 136 136 if($dir->dir['callid_prefix'] != ''){ 137 137 $callid_name = $dir->agi->get_variable('CALLERID(name)'); 138 $dir->agi->set_variable('CALLERID(name)',$dir->dir['callid_prefix'].$callid_name ['data']);138 $dir->agi->set_variable('CALLERID(name)',$dir->dir['callid_prefix'].$callid_name); 139 139 } 140 140 $dir->agi->set_variable('DIR_DIAL',$contact['dial']); modules/branches/2.9/directory/functions.inc.php
r12214 r12215 2 2 3 3 function directory_configpageload() { 4 global $currentcomponent, $display;4 global $currentcomponent,$display; 5 5 if ($display == 'directory' && (isset($_REQUEST['action']) && $_REQUEST['action']=='add'|| isset($_REQUEST['id']) && $_REQUEST['id']!='')) { 6 6 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add') { … … 29 29 } else { 30 30 $dir = directory_get_dir_details($_REQUEST['id']); 31 31 32 $label = sprintf(_("Edit Directory: %s"), $dir['dirname'] ? $dir['dirname'] : 'ID '.$dir['id']); 32 33 $def_dir = directory_get_default_dir(); … … 50 51 //delete link, dont show if we dont have an id (i.e. directory wasnt created yet) 51 52 $gen_section = _('Directory General Options'); 52 $currentcomponent->addguielem($gen_section, new gui_textbox('dirname', stripslashes($dir['dirname']), _('Directory Name'), _('Name of this directory.')));53 $currentcomponent->addguielem($gen_section, new gui_textbox('description', stripslashes($dir['description']), _('Directory Description'), _('Description of this directory.')));54 $currentcomponent->addguielem($gen_section, new gui_textbox('callid_prefix', stripslashes($dir['callid_prefix']), _('CallerID Name Prefix'), _('Prefix to be appended to current CallerID Name.')));55 $currentcomponent->addguielem($gen_section, new gui_textbox('alert_info', stripslashes($dir['alert_info']), _('Alert Info'), _('ALERT_INFO to be sent when called from this Directory. Can be used for distinctive ring for SIP devices.')));53 $currentcomponent->addguielem($gen_section, new gui_textbox('dirname', $dir['dirname'], _('Directory Name'), _('Name of this directory.'))); 54 $currentcomponent->addguielem($gen_section, new gui_textbox('description', $dir['description'], _('Directory Description'), _('Description of this directory.'))); 55 $currentcomponent->addguielem($gen_section, new gui_textbox('callid_prefix', $dir['callid_prefix'], _('CallerID Name Prefix'), _('Prefix to be appended to current CallerID Name.'))); 56 $currentcomponent->addguielem($gen_section, new gui_textbox('alert_info', $dir['alert_info'], _('Alert Info'), _('ALERT_INFO to be sent when called from this Directory. Can be used for distinctive ring for SIP devices.'))); 56 57 57 58 $section = _('Directory Options (DTMF)'); … … 266 267 267 268 //TODO: could this cause a problem with the '|' separator if a name has a '|' in it? (probably not check for comment where parsed 268 foreach((array) core_users_list() as $user){ 269 // 270 foreach(core_users_list() as $user){ 269 271 $newuser .= '<option value="'.$user[0].'|'.$user[1].'">('.$user[0].') '.$user[1]."</option>\n"; 270 272 }
