Changeset 12215

Show
Ignore:
Timestamp:
06/06/11 10:56:21 (2 years ago)
Author:
mbrevda
Message:

merge to 2.9 re #5127, #5054, #5049, #5140, #5142

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/directory/agi-bin/directory.agi

    r12214 r12215  
    9999        break; 
    100100      } 
    101            
    102     } 
    103  
     101    } 
    104102    //wait for a responce before restarting loop 
    105     if (!isset($ret) || !$ret || $ret['result'] == '0') { 
     103    if (!isset($ret) || !$ret) { 
    106104      $ret = $dir->agi->wait_for_digit(10000); 
    107105      if (trim($ret['result'])) { 
     
    110108    }  
    111109 
     110 
     111    debug("got result: ".$ret['result']); 
    112112    if(trim($ret['result'])){ 
    113113      call($matches[$ret['result']-1]); 
     
    136136  if($dir->dir['callid_prefix'] != ''){ 
    137137    $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); 
    139139  } 
    140140  $dir->agi->set_variable('DIR_DIAL',$contact['dial']); 
  • modules/branches/2.9/directory/functions.inc.php

    r12214 r12215  
    22 
    33function directory_configpageload() { 
    4   global $currentcomponent, $display; 
     4  global $currentcomponent,$display; 
    55  if ($display == 'directory' && (isset($_REQUEST['action']) && $_REQUEST['action']=='add'|| isset($_REQUEST['id']) && $_REQUEST['id']!='')) {  
    66    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add') { 
     
    2929    } else { 
    3030      $dir        = directory_get_dir_details($_REQUEST['id']); 
     31 
    3132      $label        = sprintf(_("Edit Directory: %s"), $dir['dirname'] ? $dir['dirname'] : 'ID '.$dir['id']); 
    3233      $def_dir = directory_get_default_dir(); 
     
    5051    //delete link, dont show if we dont have an id (i.e. directory wasnt created yet) 
    5152    $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.'))); 
    5657     
    5758    $section = _('Directory Options (DTMF)'); 
     
    266267 
    267268  //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){ 
    269271    $newuser .= '<option value="'.$user[0].'|'.$user[1].'">('.$user[0].') '.$user[1]."</option>\n"; 
    270272  }