diff --git a/app/voicemail_greetings/app_config.php b/app/voicemail_greetings/app_config.php index 9314724748..7a5320a779 100644 --- a/app/voicemail_greetings/app_config.php +++ b/app/voicemail_greetings/app_config.php @@ -102,6 +102,11 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "greeting_voice"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['search'] = 'true'; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "greeting_message"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['search'] = 'true'; @@ -142,5 +147,3 @@ $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - -?> \ No newline at end of file diff --git a/app/voicemail_greetings/voicemail_greeting_edit.php b/app/voicemail_greetings/voicemail_greeting_edit.php index e70036fd73..80ac9ca895 100644 --- a/app/voicemail_greetings/voicemail_greeting_edit.php +++ b/app/voicemail_greetings/voicemail_greeting_edit.php @@ -65,6 +65,14 @@ //$translate_enabled = $speech->get_translate_enabled(); //$language_enabled = $speech->get_language_enabled(); //$languages = $speech->get_languages(); + + // Determine the aray type single, or multi + $voices_array_type = array_type($voices); + + // Sort the array by language code keys alphabetically + if ($voices_array_type == 'multi') { + ksort($voices); + } } //add the transcribe object and get the languages arrays @@ -234,6 +242,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { $array['voicemail_greetings'][0]['voicemail_id'] = $voicemail_id; $array['voicemail_greetings'][0]['greeting_id'] = $greeting_id; $array['voicemail_greetings'][0]['greeting_name'] = $greeting_name; + $array['voicemail_greetings'][0]['greeting_voice'] = $greeting_voice; $array['voicemail_greetings'][0]['greeting_message'] = $greeting_message; $array['voicemail_greetings'][0]['greeting_filename'] = $greeting_filename; $array['voicemail_greetings'][0]['greeting_base64'] = $greeting_base64; @@ -268,6 +277,7 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { if (is_array($row) && @sizeof($row) != 0) { $greeting_id = $row["greeting_id"]; $greeting_name = $row["greeting_name"]; + $greeting_voice = $row["greeting_voice"]; $greeting_message = $row["greeting_message"]; $greeting_description = $row["greeting_description"]; } @@ -345,12 +355,43 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) { echo "\n"; echo "