diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php
index 8d62410133..cbd7b7134a 100644
--- a/app/phrases/phrase_edit.php
+++ b/app/phrases/phrase_edit.php
@@ -288,10 +288,10 @@
echo "opt_group.label = \"".$text['label-recordings']."\";\n";
foreach ($recordings as &$row) {
if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
- echo "opt_group.appendChild(new Option(\"".escape($row["recording_name"])."\", \"\${lua streamfile.lua ".escape($row["recording_filename"])."}\"));\n";
+ echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"\${lua streamfile.lua ".$row["recording_filename"]."}\"));\n";
}
else {
- echo "opt_group.appendChild(new Option(\"".escape($row["recording_name"])."\", \"".$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.escape($row["recording_filename"])."\"));\n";
+ echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"".$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row["recording_filename"]."\"));\n";
}
}
echo "obj_action.appendChild(opt_group);\n";
@@ -419,7 +419,7 @@
echo "
";
echo "| ".$text['label-structure']." | ";
echo "";
- echo " \n";
+ echo " \n";
echo " \n";
echo " | ".$text['label-function']." | \n";
echo " ".$text['label-action']." | \n";
diff --git a/app/recordings/app_languages.php b/app/recordings/app_languages.php
index 9e2c358c99..a34c185601 100644
--- a/app/recordings/app_languages.php
+++ b/app/recordings/app_languages.php
@@ -221,25 +221,45 @@ $text['label-file_name']['ru-ru'] = "Имя файла";
$text['label-file_name']['sv-se'] = "Fil-namn";
$text['label-file_name']['uk-ua'] = "Назва файлу";
-$text['label-file-size']['en-us'] = "File Size";
-$text['label-file-size']['ar-eg'] = "";
-$text['label-file-size']['de-at'] = "Dateigröße"; //copied from de-de
-$text['label-file-size']['de-ch'] = "Dateigröße"; //copied from de-de
-$text['label-file-size']['de-de'] = "Dateigröße";
-$text['label-file-size']['es-cl'] = "Tamaño del archivo";
-$text['label-file-size']['es-mx'] = "Tamaño del archivo"; //copied from es-cl
-$text['label-file-size']['fr-ca'] = "Taille de Fichier"; //copied from fr-fr
-$text['label-file-size']['fr-fr'] = "Taille de Fichier";
-$text['label-file-size']['he-il'] = "";
-$text['label-file-size']['it-it'] = "Dimensioni File";
-$text['label-file-size']['nl-nl'] = "";
-$text['label-file-size']['pl-pl'] = "Rozmiar pliku";
-$text['label-file-size']['pt-br'] = "Tamanho do arquivo";
-$text['label-file-size']['pt-pt'] = "Tamanho do Ficheiro";
-$text['label-file-size']['ro-ro'] = "";
-$text['label-file-size']['ru-ru'] = "Размер файла";
-$text['label-file-size']['sv-se'] = "Filstorlek";
-$text['label-file-size']['uk-ua'] = "Розмір файлу";
+$text['label-file_size']['en-us'] = "File Size";
+$text['label-file_size']['ar-eg'] = "";
+$text['label-file_size']['de-at'] = "Dateigröße"; //copied from de-de
+$text['label-file_size']['de-ch'] = "Dateigröße"; //copied from de-de
+$text['label-file_size']['de-de'] = "Dateigröße";
+$text['label-file_size']['es-cl'] = "Tamaño del archivo";
+$text['label-file_size']['es-mx'] = "Tamaño del archivo"; //copied from es-cl
+$text['label-file_size']['fr-ca'] = "Taille de Fichier"; //copied from fr-fr
+$text['label-file_size']['fr-fr'] = "Taille de Fichier";
+$text['label-file_size']['he-il'] = "";
+$text['label-file_size']['it-it'] = "Dimensioni File";
+$text['label-file_size']['nl-nl'] = "";
+$text['label-file_size']['pl-pl'] = "Rozmiar pliku";
+$text['label-file_size']['pt-br'] = "Tamanho do arquivo";
+$text['label-file_size']['pt-pt'] = "Tamanho do Ficheiro";
+$text['label-file_size']['ro-ro'] = "";
+$text['label-file_size']['ru-ru'] = "Размер файла";
+$text['label-file_size']['sv-se'] = "Filstorlek";
+$text['label-file_size']['uk-ua'] = "Розмір файлу";
+
+$text['label-size']['en-us'] = "Size";
+$text['label-size']['ar-eg'] = "";
+$text['label-size']['de-at'] = "Dateigröße"; //copied from de-de
+$text['label-size']['de-ch'] = "Dateigröße"; //copied from de-de
+$text['label-size']['de-de'] = "Dateigröße";
+$text['label-size']['es-cl'] = "Tamaño del archivo";
+$text['label-size']['es-mx'] = "Tamaño del archivo"; //copied from es-cl
+$text['label-size']['fr-ca'] = "Taille de Fichier"; //copied from fr-fr
+$text['label-size']['fr-fr'] = "Taille de Fichier";
+$text['label-size']['he-il'] = "";
+$text['label-size']['it-it'] = "Dimensioni File";
+$text['label-size']['nl-nl'] = "";
+$text['label-size']['pl-pl'] = "Rozmiar pliku";
+$text['label-size']['pt-br'] = "Tamanho do arquivo";
+$text['label-size']['pt-pt'] = "Tamanho do Ficheiro";
+$text['label-size']['ro-ro'] = "";
+$text['label-size']['ru-ru'] = "Размер файла";
+$text['label-size']['sv-se'] = "Filstorlek";
+$text['label-size']['uk-ua'] = "Розмір файлу";
$text['label-file']['en-us'] = "Filename (Download)";
$text['label-file']['ar-eg'] = "";
diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php
index ea317ebab5..e202a5629c 100644
--- a/app/recordings/recordings.php
+++ b/app/recordings/recordings.php
@@ -285,7 +285,13 @@
$offset = $rows_per_page * $page;
//get the recordings from the database
- $sql = str_replace('count(*)', 'recording_uuid, domain_uuid, recording_filename, recording_name, recording_description', $sql);
+ if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
+ switch ($db_type) {
+ case 'pgsql': $sql_file_size = "length(decode(recording_base64,'base64')) as recording_size, "; break;
+ case 'mysql': $sql_file_size = "length(from_base64(recording_base64)) as recording_size, "; break;
+ }
+ }
+ $sql = str_replace('count(*)', 'recording_uuid, domain_uuid, recording_filename, '.$sql_file_size.' recording_name, recording_description', $sql);
$sql .= order_by($order_by, $order);
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
@@ -298,7 +304,7 @@
$row_style["1"] = "row_style1";
//include the header
- $document['title'] = $text['title'];
+ $document['title'] = $text['title-recordings'];
require_once "resources/header.php";
//begin the content
@@ -323,12 +329,14 @@
echo "\n";
echo "\n";
echo th_order_by('recording_name', $text['label-recording_name'], $order_by, $order);
+ if (permission_exists('recording_play') || permission_exists('recording_download')) {
+ echo "| ".$text['label-tools']." | \n";
+ }
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
echo th_order_by('recording_filename', $text['label-file_name'], $order_by, $order);
}
- echo "".$text['label-tools']." | \n";
+ echo "".($_SESSION['recordings']['storage_type']['text'] == 'base64' ? $text['label-size'] : $text['label-file_size'])." | \n";
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
- echo "".$text['label-file-size']." | \n";
echo "".$text['label-uploaded']." | \n";
}
echo th_order_by('recording_description', $text['label-description'], $order_by, $order);
@@ -336,9 +344,8 @@
echo " \n";
//calculate colspan for progress bar
- $colspan = 6; //max
- if ($_SESSION['recordings']['storage_type']['text'] == 'base64') { $colspan = $colspan - 2; }
- if (!(permission_exists('recording_edit') || permission_exists('recording_delete'))) { $colspan = $colspan - 1; }
+ $colspan = 4; //min
+ if ($_SESSION['recordings']['storage_type']['text'] != 'base64') { $colspan += 2; }
if (is_array($recordings) && @sizeof($recordings) != 0) {
foreach($recordings as $row) {
@@ -349,11 +356,8 @@
$tr_link = (permission_exists('recording_edit')) ? "href='recording_edit.php?id=".escape($row['recording_uuid'])."'" : null;
echo "\n";
echo " | ".escape($row['recording_name'])." | \n";
- if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
- echo " ".str_replace('_', '_', escape($row['recording_filename']))." | \n";
- }
if (permission_exists('recording_play') || permission_exists('recording_download')) {
- echo " ";
+ echo " | ";
if (permission_exists('recording_play')) {
$recording_file_path = $row['recording_filename'];
$recording_file_name = strtolower(pathinfo($recording_file_path, PATHINFO_BASENAME));
@@ -372,6 +376,13 @@
echo " | \n";
}
if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
+ echo " ".str_replace('_', '_', escape($row['recording_filename']))." | \n";
+ }
+ if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
+ $file_size = byte_convert($row['recording_size']);
+ echo " ".$file_size." | \n";
+ }
+ else {
$file_name = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$row['recording_filename'];
if (file_exists($file_name)) {
$file_size = filesize($file_name);
@@ -379,11 +390,9 @@
$file_date = date("M d, Y H:i:s", filemtime($file_name));
}
else {
- $file_size = '';
- $file_date = '';
+ unset($file_size, $file_date);
}
echo " ".$file_size." | \n";
-
echo " ".$file_date." | \n";
}
echo " ".escape($row['recording_description'])." | \n";
|