diff --git a/app/phrases/app_defaults.php b/app/phrases/app_defaults.php
index 449d167adc..638afb500c 100644
--- a/app/phrases/app_defaults.php
+++ b/app/phrases/app_defaults.php
@@ -98,6 +98,56 @@ if ($domains_processed == 1) {
} //if
} //if
+ //if base64, convert existing incompatible phrases
+ if ($_SESSION['recordings']['storage_type']['text'] == 'base64') {
+ $sql = "select phrase_detail_uuid, phrase_detail_data ";
+ $sql .= "from v_phrase_details where phrase_detail_function = 'play-file' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ if (count($result) > 0) {
+ foreach ($result as &$row) {
+ $phrase_detail_uuid = $row['phrase_detail_uuid'];
+ $phrase_detail_data = $row['phrase_detail_data'];
+ //update function and data to be base64 compatible
+ $phrase_detail_data = "lua(streamfile.lua ".$phrase_detail_data.")";
+ $sql = "update v_phrase_details set ";
+ $sql .= "phrase_detail_function = 'execute', ";
+ $sql .= "phrase_detail_data = '".$phrase_detail_data."' ";
+ $sql .= "where phrase_detail_uuid = '".$phrase_detail_uuid."' ";
+ $db->exec(check_sql($sql));
+ unset($sql);
+ }
+ }
+ unset($sql, $prep_statement, $result, $row);
+ }
+ //if not base64, revert base64 phrases to standard method
+ else if ($_SESSION['recordings']['storage_type']['text'] != 'base64') {
+ $sql = "select phrase_detail_uuid, phrase_detail_data ";
+ $sql .= "from v_phrase_details where ";
+ $sql .= "phrase_detail_function = 'execute' ";
+ $sql .= "and phrase_detail_data like 'lua(streamfile.lua %)' ";
+ $prep_statement = $db->prepare(check_sql($sql));
+ $prep_statement->execute();
+ $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
+ if (count($result) > 0) {
+ foreach ($result as &$row) {
+ $phrase_detail_uuid = $row['phrase_detail_uuid'];
+ $phrase_detail_data = $row['phrase_detail_data'];
+ //update function and data to use standard method
+ $phrase_detail_data = str_replace('lua(streamfile.lua ', '', $phrase_detail_data);
+ $phrase_detail_data = str_replace(')', '', $phrase_detail_data);
+ $sql = "update v_phrase_details set ";
+ $sql .= "phrase_detail_function = 'play-file', ";
+ $sql .= "phrase_detail_data = '".$phrase_detail_data."' ";
+ $sql .= "where phrase_detail_uuid = '".$phrase_detail_uuid."' ";
+ $db->exec(check_sql($sql));
+ unset($sql);
+ }
+ }
+ unset($sql, $prep_statement, $result, $row);
+ }
+
}
?>
\ No newline at end of file
diff --git a/app/phrases/app_languages.php b/app/phrases/app_languages.php
index e601e67394..93c576f4a0 100644
--- a/app/phrases/app_languages.php
+++ b/app/phrases/app_languages.php
@@ -70,6 +70,14 @@ $text['label-structure']['fr-fr'] = "Structure";
$text['label-structure']['pt-br'] = "Estrutura";
$text['label-structure']['pl'] = "Struktura";
+$text['label-sounds']['en-us'] = "Sounds";
+$text['label-sounds']['es-cl'] = "Sonidos";
+$text['label-sounds']['pt-pt'] = "Sons";
+$text['label-sounds']['fr-fr'] = "Sons";
+$text['label-sounds']['pt-br'] = "Áudios";
+$text['label-sounds']['pl'] = "Dzwięki";
+$text['label-sounds']['sv-se'] = "Ljud";
+
$text['label-say']['en-us'] = "Say";
$text['label-say']['es-cl'] = "Decir";
$text['label-say']['pt-pt'] = "Dizer";
@@ -77,6 +85,13 @@ $text['label-say']['fr-fr'] = "Dire";
$text['label-say']['pt-br'] = "Dizer";
$text['label-say']['pl'] = "Powiedz";
+$text['label-recordings']['en-us'] = "Recordings";
+$text['label-recordings']['es-cl'] = "Grabaciones";
+$text['label-recordings']['pt-pt'] = "Gravações";
+$text['label-recordings']['fr-fr'] = "Guides Vocaux";
+$text['label-recordings']['pt-br'] = "Configurações da Conta";
+$text['label-recordings']['pl'] = "Ustawienia konta";
+
$text['label-play']['en-us'] = "Play";
$text['label-play']['es-cl'] = "Reproducir";
$text['label-play']['pt-pt'] = "Tocar";
diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php
index 53f57500e5..b048515d99 100644
--- a/app/phrases/phrase_edit.php
+++ b/app/phrases/phrase_edit.php
@@ -138,14 +138,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'".$phrase_detail_uuid."', ";
$sql .= "'".$phrase_uuid."', ";
$sql .= "'".$domain_uuid."', ";
- $sql .= "'".$_POST['phrase_detail_order']."', ";
- $sql .= "'".$_POST['phrase_detail_tag']."', ";
- $sql .= "'".$_POST['phrase_detail_pattern']."', ";
- $sql .= "'".$_POST['phrase_detail_function']."', ";
- $sql .= "'".$_POST['phrase_detail_data']."', ";
- $sql .= "'".$_POST['phrase_detail_method']."', ";
- $sql .= "'".$_POST['phrase_detail_type']."', ";
- $sql .= "'".$_POST['phrase_detail_group']."' ";
+ $sql .= "'".check_str($_POST['phrase_detail_order'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_tag'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_pattern'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_function'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_data'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_method'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_type'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_group'])."' ";
$sql .= ") ";
//echo $sql."
";
$db->exec(check_sql($sql));
@@ -206,14 +206,14 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'".$phrase_detail_uuid."', ";
$sql .= "'".$phrase_uuid."', ";
$sql .= "'".$domain_uuid."', ";
- $sql .= "'".$_POST['phrase_detail_order']."', ";
- $sql .= "'".$_POST['phrase_detail_tag']."', ";
- $sql .= "'".$_POST['phrase_detail_pattern']."', ";
- $sql .= "'".$_POST['phrase_detail_function']."', ";
- $sql .= "'".$_POST['phrase_detail_data']."', ";
- $sql .= "'".$_POST['phrase_detail_method']."', ";
- $sql .= "'".$_POST['phrase_detail_type']."', ";
- $sql .= "'".$_POST['phrase_detail_group']."' ";
+ $sql .= "'".check_str($_POST['phrase_detail_order'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_tag'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_pattern'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_function'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_data'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_method'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_type'])."', ";
+ $sql .= "'".check_str($_POST['phrase_detail_group'])."' ";
$sql .= ") ";
//echo $sql."
";
$db->exec(check_sql($sql));
@@ -244,7 +244,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//pre-populate the form
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
- $phrase_uuid = $_GET["id"];
+ $phrase_uuid = check_str($_GET["id"]);
$sql = "select * from v_phrases ";
$sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "and phrase_uuid = '".$phrase_uuid."' ";
@@ -266,6 +266,136 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == 'add') { $document['title'] = $text['title-add_phrase']; }
if ($action == 'update') { $document['title'] = $text['title-edit_phrase']; }
+//js to control action form input
+ echo "\n";
+
//show the content
echo "