Changeset 4294

Show
Ignore:
Timestamp:
07/02/07 01:08:58 (6 years ago)
Author:
p_lindheimer
Message:

Merged revisions 4227 via svnmerge from
https://amportal.svn.sourceforge.net/svnroot/amportal/modules/branches/2.3

........

r4227 | p_lindheimer | 2007-06-26 16:22:35 -0700 (Tue, 26 Jun 2007) | 1 line


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.2

    • Property svnmerge-integrated changed from /modules/branches/2.1:1-2166,2289,2414,2419,2424,2430,2449,2458,2462,2476 /modules/branches/2.3:1-3256,4102,4232,4251 to /modules/branches/2.1:1-2166,2289,2414,2419,2424,2430,2449,2458,2462,2476 /modules/branches/2.3:1-3256,4102,4227,4232,4251
  • modules/branches/2.2/recordings/module.xml

    r4255 r4294  
    22  <rawname>recordings</rawname> 
    33  <name>Recordings</name> 
    4   <version>3.3.3</version> 
     4  <version>3.3.4</version> 
    55  <type>setup</type> 
    66  <category>Internal Options &amp; Configuration</category> 
    77  <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description> 
    88  <changelog> 
     9  *3.3.4* fixed bug not able to save recorded message from *77 featurecode, backported for FreePBX 2.3 
    910  *3.3.3* #2032 remove recordings as a destination, no purpose (use annoucement module) 
    1011  *3.3.2* Fix mp3 upload bug (#1764) 
  • modules/branches/2.2/recordings/page.recordings.php

    r3773 r4294  
    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-"; 
     
    4852    break; 
    4953  case "newsysrec": 
    50     $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk'; 
    51     $astsnd .= "/sounds/"; 
    5254    $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1); 
    5355    if (recordings_add($sysrecs[$sysrec], $sysrecs[$sysrec])) { 
     
    6365    // Clean up the filename, take out any nasty characters 
    6466    $filename = escapeshellcmd(strtr($rname, '/ ', '__')); 
    65     if (!file_exists($recordings_astsnd_path."custom")) { 
    66       if (!mkdir($recordings_astsnd_path."custom", 0775)) { 
    67         echo '<div class="content"><h5>'._("Failed to create").' '.$recordings_astsnd_path.'custom'.'</h5>';       
     67    if (!file_exists($astsnd."custom")) { 
     68      if (!mkdir($astsnd."custom", 0775)) { 
     69        echo '<div class="content"><h5>'._("Failed to create").' '.$astsnd.'custom'.'</h5>';       
    6870      }    
    6971    } else { 
    7072      // can't rename a file from one partition to another, must use mv or cp 
    7173      // rename($recordings_save_path."{$dest}ivrrecording.wav",$recordings_astsnd_path."custom/{$filename}.wav"); 
    72       exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $recordings_astsnd_path."custom/{$filename}.$suffix"); 
     74      exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $astsnd."custom/{$filename}.$suffix"); 
    7375      $isok = recordings_add($rname, "custom/{$filename}.$suffix"); 
    7476