Changeset 8680 for modules/branches

Show
Ignore:
Timestamp:
01/25/10 11:20:59 (3 years ago)
Author:
p_lindheimer
Message:

recert some of changes that broke in r8679 and change defemail to that used in migration script re #4007

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.7/fax/functions.inc.php

    r8679 r8680  
    116116    global $amp_conf; 
    117117    $dests=fax_get_destinations(); 
     118    $sender_address=sql('SELECT value FROM fax_details WHERE `key` = \'sender_address\'','getRow'); 
    118119    if($dests){ 
    119       $sender_address=sql('SELECT value FROM fax_details WHERE `key` = \'sender_address\'','getRow'); 
    120120      $context='ext-fax'; 
    121121      foreach ($dests as $row) { 
     
    132132    fax_write_conf(); 
    133133  } 
    134   // Now check if any legacy destinations. If so, then generate proper receive fax context 
    135   $routes = sql('SELECT extension, cidnum FROM fax_incoming WHERE legacy_email IS NOT NULL ','getAll', DB_FETCHMODE_ASSOC); 
    136   if(count($routes)){ 
    137     $context='ext-fax-legacy'; 
    138     $exten = 's'; 
    139     $ext->add($context, $exten, '', new ext_noop('Reciving Fax for Fax Recipient: ${FAX_RX_EMAIL} , From: ${CALLERID(all)}')); 
    140     $ext->add($context, $exten, 'receivefax', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); //recive fax, then email it on 
    141     $ext->add($context, 'h', '', new ext_execif('$["${FAX_RX_EMAIL}" != ""]','system','\'${ASTVARLIBDIR}/bin/fax-process.pl --to ${FAX_RX_EMAIL} --from "'.$sender_address['0'].'" --dest "${FROM_DID}" --subject "New fax from ${URIENCODE(${CALLERID(all)})}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${ASTSPOOLDIR}/fax/${UNIQUEID}.tif\'')); 
    142   } 
     134  // generate ext-fax-legacy used for both legacy mode and app-fax feature code 
     135  // 
     136  $context='ext-fax-legacy'; 
     137  $exten = 's'; 
     138  $ext->add($context, $exten, '', new ext_noop('Reciving Fax for Fax Recipient: ${FAX_RX_EMAIL} , From: ${CALLERID(all)}')); 
     139  $ext->add($context, $exten, 'receivefax', new ext_receivefax('${ASTSPOOLDIR}/fax/${UNIQUEID}.tif')); //recive fax, then email it on 
     140  $ext->add($context, 'h', '', new ext_execif('$["${FAX_RX_EMAIL}" != ""]','system','\'${ASTVARLIBDIR}/bin/fax-process.pl --to ${FAX_RX_EMAIL} --from "'.$sender_address['0'].'" --dest "${FROM_DID}" --subject "New fax from ${URIENCODE(${CALLERID(all)})}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${ASTSPOOLDIR}/fax/${UNIQUEID}.tif\'')); 
     141 
    143142  $modulename = 'fax'; 
    144143  $fcc = new featurecode($modulename, 'simu_fax'); 
     
    147146 
    148147  if ($fc_simu_fax != '') { 
    149     $default_address = sql('SELECT value FROM fax_details WHERE `key` = \'defemail\'','getRow'); 
     148    $default_address = sql('SELECT value FROM fax_details WHERE `key` = \'FAX_RX_EMAIL\'','getRow'); 
    150149    $ext->addInclude('from-internal-additional', 'app-fax'); // Add the include from from-internal 
    151150    $ext->add('app-fax', $fc_simu_fax, '', new ext_setvar('FAX_RX_EMAIL', $default_address[0])); 
  • modules/branches/2.7/fax/page.fax.php

    r8679 r8680  
    1818if (isset($_REQUEST['action']) &&  $_REQUEST['action'] == 'edit'){ 
    1919  needreload(); 
    20   $options=array("headerinfo", "localstationid", "ecm", "maxrate", "minrate", "modem", "sender_address", "defemail"); 
     20  $options=array("headerinfo", "localstationid", "ecm", "maxrate", "minrate", "modem", "sender_address", "FAX_RX_EMAIL"); 
    2121  foreach($options as $option){ 
    2222    isset($_REQUEST[$option])?$fax[$option]=$_REQUEST[$option]:$fax[$option]=''; 
     
    4747      <tr> 
    4848        <td><a class="info" href="#"><?php echo _("Default Email address:")?><span><?php echo _("Email address that faxes are sent to if no other email address. This used for Simulate Incoming Fax and in some rare legacy migration cases")?></span></a></td> 
    49         <td><input type="text" size="30" name="defemail" value="<?php  echo htmlspecialchars($fax['defemail'])?>" tabindex="<?php echo ++$tabindex;?>"/></td> 
     49        <td><input type="text" size="30" name="FAX_RX_EMAIL" value="<?php  echo htmlspecialchars($fax['FAX_RX_EMAIL'])?>" tabindex="<?php echo ++$tabindex;?>"/></td> 
    5050      </tr>      
    5151