Changeset 14272

Show
Ignore:
Timestamp:
07/23/12 21:05:55 (10 months ago)
Author:
escape2mtns
Message:

more support for 1.8 string quoting

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/smartroutes/functions.inc.php

    r14271 r14272  
    912912              $ext->add($context, $extension, '', new ext_gotoif('$["${'.$smartroute_queries[$main_query]['adv_varname1'].'}" '.$matchtype.' "'.$dest['matchkey'].'"]',"destination".$index)); 
    913913              } 
     914              else if($matchtype == "=" && version_compare($version, "1.6", "gt")) {   
     915              // values as strings 
     916              // asterisk 1.8 doesn't like the null values when no db match found so set var as "(nullstring)" before comparison 
     917              $ext->add($context, $extension, '', new ext_execif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'}=""]','Set',$smartroute_queries[$main_query]['adv_varname1'].'="NULL"'));               
     918              $ext->add($context, $extension, '', new ext_gotoif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'} '.$matchtype.' "'.$dest['matchkey'].'"]',"destination".$index));                 
     919                } 
    914920            else { 
    915921              // values as integers OR in version 1.8 never double quote values 
     922              // asterisk 1.8 doesn't like the null values when no db match found so set var as "(nullstring)" before comparison 
     923              $ext->add($context, $extension, '', new ext_execif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'}=""]','Set',$smartroute_queries[$main_query]['adv_varname1'].'="NULL"'));               
    916924              $ext->add($context, $extension, '', new ext_gotoif('$[${'.$smartroute_queries[$main_query]['adv_varname1'].'} '.$matchtype.' '.$dest['matchkey'].']',"destination".$index)); 
    917925              }