Added callmonitor.module refresh buttom

If new calls are recorded while someone is logged onto the callmonitor.module page the audio files are not listed when the page is reloaded due to caching of the file names.

I added a refresh button to clear the cache so the play button(s) will show

Here is the patch

45a46,49

if (isset($args[‘refresh’])&&$args[‘refresh’]&&isset($_SESSION[‘ari_user’])&&is_array($_SESSION[‘ari_user’])) {
unset($_SESSION[‘ari_user’][‘recordings_files’]);
}

101d104
<
104a108,110

if (isset($args[‘refresh’])&&$args[‘refresh’]&&isset($_SESSION[‘ari_user’])&&is_array($_SESSION[‘ari_user’])) {
unset($_SESSION[‘ari_user’][‘recordings_files’]);
}
166c172,173
< ";


  </button>

<button class=‘infobar’ type=‘submit’ onclick="document.callmonitor_form.refresh.value = ‘1’">“._(“Refresh”) .”“;
317,321c324,329
<
<
<
<
< ”;


      <input type=hidden name=refresh value=''>
      <input type=hidden name=q value=\"" . urlencode($q) . "\">
      <input type=hidden name=start value=\"" . $start . "\">
      <input type=hidden name=span value=\"" . $span . "\">
      <input type=hidden name=order value=\"" . $order . "\">
      <input type=hidden name=sort value=\"" . $sort . "\">";

408a417,419

function display1 ($args) {
}
438c449
< if (isset($_SESSION[‘ari_user’][‘recordings_files’])) {


  if (isset($_SESSION['ari_user']['recordings_files'])&&is_array($_SESSION['ari_user']['recordings_files'])) {
45a46,49 > if (isset($args['refresh'])&&$args['refresh']&&isset($_SESSION['ari_user'])&&is_array($_SESSION['ari_user'])) { > unset($_SESSION['ari_user']['recordings_files']); > } > 101d104 < 104a108,110 > if (isset($args['refresh'])&&$args['refresh']&&isset($_SESSION['ari_user'])&&is_array($_SESSION['ari_user'])) { > unset($_SESSION['ari_user']['recordings_files']); > } 166c172,173 < "; --- > > "._("Refresh") .""; 317,321c324,329 < < < < < "; --- > > > > > > "; 408a417,419 > > function display1 ($args) { > } 438c449 < if (isset($_SESSION['ari_user']['recordings_files'])) { --- > if (isset($_SESSION['ari_user']['recordings_files'])&&is_array($_SESSION['ari_user']['recordings_files'])) {

robertv,
Feel free to open a trac feature request for this at http://freepbx.org/trac. Please note that attachments are broke in trac for the moment, however we will be transitioning to JIRA soon, so feel free to add the patch in the description or comment for now.