From 24ed7060875ea06f4e20031f196f4f031ae56ff8 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Fri, 17 Apr 2015 19:30:06 +0000 Subject: [PATCH] Recordings / Voicemail Messages: Hide file size column if storing as base64 in db. --- app/recordings/recordings.php | 26 ++++++++++++++++---------- app/voicemails/voicemail_messages.php | 13 +++++++++---- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php index 615e9cac11..08176b2b0e 100644 --- a/app/recordings/recordings.php +++ b/app/recordings/recordings.php @@ -147,7 +147,7 @@ require_once "resources/check_auth.php"; require_once "resources/header.php"; //begin the content - echo "\n"; + echo "
\n"; echo " \n"; echo " \n"; echo th_order_by('recording_name', $text['label-recording_name'], $order_by, $order); echo th_order_by('recording_filename', $text['label-file_name'], $order_by, $order); - echo "\n"; - echo "\n"; + echo "\n"; + if ($_SESSION['recordings']['storage_type']['text'] != 'base64') { + echo "\n"; + } echo th_order_by('recording_description', $text['label-description'], $order_by, $order); echo "\n"; echo "\n"; if ($result_count > 0) { foreach($result as $row) { - $tmp_filesize = filesize($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename']); - $tmp_filesize = byte_convert($tmp_filesize); + if ($_SESSION['recordings']['storage_type']['text'] != 'base64') { + $tmp_filesize = filesize($_SESSION['switch']['recordings']['dir'].'/'.$row['recording_filename']); + $tmp_filesize = byte_convert($tmp_filesize); + } //playback progress bar echo "\n"; @@ -249,7 +253,9 @@ require_once "resources/check_auth.php"; echo " "; } echo " \n"; - echo " \n"; + if ($_SESSION['recordings']['storage_type']['text'] != 'base64') { + echo " \n"; + } echo " \n"; echo " \n"; $table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order, null, "style='text-align: right;'"); - $table_header .= "\n"; + if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') { + $table_header .= "\n"; + } $table_header .= ""; $table_header .= "\n"; @@ -121,14 +123,15 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"] echo " \n"; - echo " \n"; + echo "

"; + echo " \n"; echo " \n"; echo "\n"; if (count($field['messages']) > 0) { @@ -161,7 +164,9 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"] echo "".$v_link_label_download.""; echo " \n"; echo " \n"; - echo " \n"; + if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') { + echo " \n"; + } echo "
\n"; echo " ".$text['title'].""; @@ -162,11 +162,11 @@ require_once "resources/check_auth.php"; if (permission_exists('recording_upload')) { echo "".$text['header'].""; echo "

"; - echo "
\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "".$text['label-upload']."\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "
"; echo "

\n"; } @@ -206,16 +206,20 @@ require_once "resources/check_auth.php"; echo "
".$text['label-tools']."".$text['label-file-size']."".$text['label-tools']."".$text['label-file-size']." 
".$tmp_filesize."".$tmp_filesize."".$row['recording_description']." "; if (permission_exists('recording_edit')) { diff --git a/app/voicemails/voicemail_messages.php b/app/voicemails/voicemail_messages.php index a5bf8cae47..8b965e2150 100644 --- a/app/voicemails/voicemail_messages.php +++ b/app/voicemails/voicemail_messages.php @@ -107,7 +107,9 @@ if (!(check_str($_REQUEST["action"]) == "download" && check_str($_REQUEST["src"] $table_header .= th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order); $table_header .= "".$text['label-tools']."".$text['label-message_size']."".$text['label-message_size']." 
\n"; echo " ".$text['label-mailbox'].": ".$field['voicemail_id']."
 \n"; echo "
\n"; + echo " \n"; if (permission_exists('voicemail_greeting_view')) { echo " \n"; } if (permission_exists('voicemail_edit')) { echo " \n"; } - echo "

 
".$row['message_length_label']." ".$row['file_size_label']."".$row['file_size_label'].""; if (permission_exists('voicemail_message_delete')) { echo "$v_link_label_delete";