Changeset 4227 for modules

Show
Ignore:
Timestamp:
06/26/07 19:22:35 (6 years ago)
Author:
p_lindheimer
Message:

fixed but where unable to save after *77 feature code recordning. This module needs some serious cleaning up though - really bad code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.3/recordings/module.xml

    r4186 r4227  
    22  <rawname>recordings</rawname> 
    33  <name>Recordings</name> 
    4   <version>3.3.1.1</version> 
     4  <version>3.3.3</version> 
    55  <candisable>no</candisable> 
    66  <type>setup</type> 
     
    88  <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description> 
    99  <changelog> 
    10   *3.3.1.1* added candisable = no for module admin 
     10  *3.3.3* fixed bug not able to save recorded message from *77 featurecode 
     11  *3.3.2* use urlencode/decode in the crypt functions 
     12  *3.3.1.1* added candisable = no for module admin, and new play button 
    1113  *3.3.1* Fix mp3 upload bug (#1764) 
    1214  *3.3* Stop assuming that files being uploaded are .wav's, also highlight the correct format for files to be uploaded in. 
  • modules/branches/2.3/recordings/page.recordings.php

    r4147 r4227  
    2121$usersnum = isset($_REQUEST['usersnum'])?$_REQUEST['usersnum']:''; 
    2222$sysrec = isset($_REQUEST['sysrec'])?$_REQUEST['sysrec']:''; 
    23 $suffix = isset($_REQUEST['suffix'])?$_REQUEST['suffix']:'wav'; 
     23$suffix = isset($_REQUEST['suffix']) && trim($_REQUEST['suffix'] != "") ? $_REQUEST['suffix'] : 'wav'; 
     24 
     25$astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; 
     26$astsnd .= "/sounds/"; 
     27 
    2428if (empty($usersnum)) { 
    2529  $dest = "unnumbered-"; 
     
    4549    break; 
    4650  case "newsysrec": 
    47     $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; 
    48     $astsnd .= "/sounds/"; 
    4951    $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1); 
    5052    if (recordings_add($sysrecs[$sysrec], $sysrecs[$sysrec])) { 
     
    6062    // Clean up the filename, take out any nasty characters 
    6163    $filename = escapeshellcmd(strtr($rname, '/ ', '__')); 
    62     if (!file_exists($recordings_astsnd_path."custom")) { 
    63       if (!mkdir($recordings_astsnd_path."custom", 0775)) { 
    64         echo '<div class="content"><h5>'._("Failed to create").' '.$recordings_astsnd_path.'custom'.'</h5>';       
     64    if (!file_exists($astsnd."custom")) { 
     65      if (!mkdir($astsnd."custom", 0775)) { 
     66        echo '<div class="content"><h5>'._("Failed to create").' '.$astsnd.'custom'.'</h5>';       
    6567      }    
    6668    } else { 
    6769      // can't rename a file from one partition to another, must use mv or cp 
    6870      // rename($recordings_save_path."{$dest}ivrrecording.wav",$recordings_astsnd_path."custom/{$filename}.wav"); 
    69       exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $recordings_astsnd_path."custom/{$filename}.$suffix"); 
     71      exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $astsnd."custom/{$filename}.$suffix"); 
    7072      $isok = recordings_add($rname, "custom/{$filename}.$suffix"); 
    7173