Changeset 4692

Show
Ignore:
Timestamp:
08/05/07 00:09:12 (6 years ago)
Author:
p_lindheimer
Message:

#2049 - allow leading 0s in speeddial. Previous behavior also had bug that a speeddial of 0 would get stored as blank. This fix will render any existing speeddials of 0 un-operational. (if someone really likes this functionality, they can write a conversion routine in the install script for those cases

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/speeddial/functions.inc.php

    r4041 r4692  
    2323      } 
    2424 
    25       // [macro-speeddial-clean] 
    26       // clean the 0's off of the variable named passed in ARG1 
    27       $ext->add('macro-speeddial-clean', 's', '', new ext_noop('Cleaing (stripping leading 0s from ${${ARG1}}) in var ${ARG1}')); 
    28       // while ( substr($$arg1,0,1) = '0') { 
    29       $ext->add('macro-speeddial-clean', 's', 'start', new ext_gotoif('$[${${ARG1}:0:1}=0]','strip','clean')); 
    30       //   $$arg1 = substr($$arg1,1); 
    31       $ext->add('macro-speeddial-clean', 's', 'strip', new ext_set('${ARG1}','${${ARG1}:1}')); 
    32       // } 
    33       $ext->add('macro-speeddial-clean', 's', '', new ext_goto('start')); 
    34       $ext->add('macro-speeddial-clean', 's', 'clean', new ext_noop('${ARG1} cleaned to ${${ARG1}}')); 
    35        
    36        
    3725      // [macro-speeddial-lookup] 
    3826      // arg1 is speed dial location,  arg2 (optional) is user caller ID 
     
    5341        $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_macro('user-callerid','')); 
    5442        $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_set('SPEEDDIALLOCATION','${EXTEN:'.(strlen($callcode)).'}')); 
    55         $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_macro('speeddial-clean','SPEEDDIALLOCATION')); 
    5643        $ext->add('app-speeddial', '_'.$callcode.'.', 'lookup', new ext_macro('speeddial-lookup','${SPEEDDIALLOCATION},${AMPUSER}')); 
    5744        $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_gotoif('$["${SPEEDDIALNUMBER}"=""]','failed')); 
     
    7259      // "enter speed dial location number" 
    7360      $ext->add('app-speeddial-set', 's', 'setloc', new ext_read('newlocation','speed-enterlocation')); 
    74       $ext->add('app-speeddial-set', 's', '', new ext_macro('speeddial-clean','newlocation')); 
    7561      $ext->add('app-speeddial-set', 's', 'lookup', new ext_macro('speeddial-lookup','${newlocation},${AMPUSER}')); 
    7662      $ext->add('app-speeddial-set', 's', 'lookup', new ext_gotoif('$["${SPEEDDIALNUMBER}"!=""]', 'conflicts')); 
     
    8369      // "speed dial location " 
    8470      $ext->add('app-speeddial-set', 's', '', new ext_playback('speed-dial')); 
    85       $ext->add('app-speeddial-set', 's', '', new ext_saynumber('${newlocation}')); 
     71      $ext->add('app-speeddial-set', 's', '', new ext_saydigits('${newlocation}')); 
    8672      // "is set to " 
    8773      $ext->add('app-speeddial-set', 's', '', new ext_playback('is-set-to')); 
     
    9379      // "speed dial location" 
    9480      $ext->add('app-speeddial-set', 's', 'conflicts', new ext_playback('speed-dial')); 
    95       $ext->add('app-speeddial-set', 's', '', new ext_saynumber('${newlocation}')); 
     81      $ext->add('app-speeddial-set', 's', '', new ext_saydigits('${newlocation}')); 
    9682      // "is already set." 
    9783      $ext->add('app-speeddial-set', 's', '', new ext_playback('is-in-use')); 
     
    10187      // "speed dial location" 
    10288      $ext->add('app-speeddial-set', '1', '', new ext_playback('speed-dial')); 
    103       $ext->add('app-speeddial-set', '1', '', new ext_saynumber('${newlocation}')); 
     89      $ext->add('app-speeddial-set', '1', '', new ext_saydigits('${newlocation}')); 
    10490      // "is set to " 
    10591      $ext->add('app-speeddial-set', '1', '', new ext_playback('is-set-to')); 
  • modules/branches/2.3/speeddial/module.xml

    r4049 r4692  
    22  <rawname>speeddial</rawname> 
    33  <name>Speed dial functions</name> 
    4   <version>1.0.3</version> 
     4  <version>1.0.4</version> 
    55  <changelog> 
     6  *1.0.4* #2049 remove use of speedial-clean, allow leading 0s 
    67  *1.0.3* changed ${CALLERID(number)} to ${AMPUSER} to accomodate CID number masquerading 
    78  *1.0.2* No comment