Ticket #2565: callmonitor.module.patch

File callmonitor.module.patch, 2.0 kB (added by sasargen, 8 months ago)
  • callmonitor.module

    old new  
    9999    global $ASTERISK_CALLMONITOR_PATH; 
    100100    global $CALLMONITOR_ALLOW_DELETE; 
    101101    global $AJAX_PAGE_REFRESH_ENABLE; 
     102    global $ARI_CRYPT_PASSWORD; 
    102103 
    103104    $display = new DisplaySearch(); 
     105    $crypt = new Crypt(); 
    104106 
    105107    // get the search string 
    106108    $m = getArgument($args,'m'); 
     
    205207 
    206208      // recording file 
    207209      $recording = $recordings[$value['uniqueid'] . $value['calldate']]; 
     210      $recordingCrypt = $crypt->encrypt($recording,$ARI_CRYPT_PASSWORD); 
    208211 
    209212      // date and time 
    210213      $buf = split(' ', $value[calldate]); 
     
    213216 
    214217      // recording delete checkbox 
    215218      if ($CALLMONITOR_ALLOW_DELETE) { 
    216         $recording_delete_checkbox = "<td class='checkbox'><input type=checkbox name='selected" . ++$i . "' value=" . $recording . "></td>"; 
     219        $recording_delete_checkbox = "<td class='checkbox'><input type=checkbox name='selected" . ++$i . "' value=" . $recordingCrypt . "></td>"; 
    217220      } 
    218221 
    219222      $recordingLink = ''; 
    220223      if (is_file($recordings[$value['uniqueid'] . $value['calldate']])) { 
    221         $recordingLink = "<a href='#' onClick=\"javascript:popUp('misc/recording_popup.php?recording=" . $recording . "&date=" . $date . "&time=" . $time . "'); return false;\">" . _("play") . "</a>"; 
     224        $recordingLink = "<a href='#' onClick=\"javascript:popUp('misc/recording_popup.php?recording=" . $recordingCrypt . "&date=" . $date . "&time=" . $time . "'); return false;\">" . _("play") . "</a>"; 
    222225      } 
    223226     
    224227      $recording_body .= "<tr> 
     
    525528   */ 
    526529  function deleteRecData($files) { 
    527530 
    528     foreach($files as $key => $file) { 
     531    global $ARI_CRYPT_PASSWORD; 
     532 
     533    $crypt = new Crypt(); 
     534 
     535    foreach($files as $key => $fileCrypt) { 
     536      $file = $crypt->decrypt($fileCrypt,$ARI_CRYPT_PASSWORD); 
    529537      if (is_writable($file)) { 
    530538        unlink($file); 
    531539      } else { 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads