diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index ea1a355f61..28d492564c 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -125,7 +125,7 @@ if (!class_exists('destinations')) { if ($this->destinations !== null && is_array($this->destinations)) { $x = 0; foreach ($this->destinations as $row) { - if ($row['type'] = 'sql') { + if ($row['type'] === 'sql') { $table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']); if (isset($row['sql'])) { if (is_array($row['sql'])) { @@ -160,6 +160,9 @@ if (!class_exists('destinations')) { $this->destinations[$x]['result']['sql'] = $sql; $this->destinations[$x]['result']['data'] = $result; } + if ($row['type'] === 'array') { + $this->destinations[$x] = $row; + } $x++; } } @@ -268,7 +271,7 @@ if (!class_exists('destinations')) { $select_label = $row['select_label']; foreach ($row['field'] as $key => $value) { if ($key == 'destination' and is_array($value)){ - if ($value['type'] == 'csv') { + if ($value['type'] === 'csv') { $array = explode($value['delimiter'], $data[$key]); $select_value = str_replace("\${destination}", $array[0], $select_value); $select_label = str_replace("\${destination}", $array[0], $select_label); @@ -384,7 +387,7 @@ if (!class_exists('destinations')) { //add the sql and data to the array $x = 0; foreach ($this->destinations as $row) { - if ($row['type'] = 'sql') { + if ($row['type'] === 'sql') { $table_name = preg_replace('#[^a-zA-Z0-9_]#', '', $row['name']); if (isset($row['sql'])) { if (is_array($row['sql'])) { @@ -419,6 +422,9 @@ if (!class_exists('destinations')) { $this->destinations[$x]['result']['sql'] = $sql; $this->destinations[$x]['result']['data'] = $result; } + if ($row['type'] === 'array') { + $this->destinations[$x] = $row; + } $x++; } $this->destinations[$x]['type'] = 'array'; diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index 1a50e39f3c..cca6fed5d9 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -42,21 +42,33 @@ $apps[$x]['destinations'][$y]['select_value']['dialplan'] = "transfer:\${destination} XML \${context}"; $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-exec-app:transfer \${destination} XML \${context}"; $apps[$x]['destinations'][$y]['select_label'] = "\${destination} \${name}"; - //if ($_SESSION['ivr_menu']['application']['text'] != "lua") { - // $y++; - // $apps[$x]['destinations'][$y]['type'] = "sql"; - // $apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub"; - // $apps[$x]['destinations'][$y]['name'] = "ivr_menus"; - // $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' "; - // $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc"; - // $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name"; - // $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid"; - // //$apps[$x]['destinations'][$y]['select_value']['dialplan'] = "ivr:\${ivr_menu_uuid}"; - // $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}"; - // $apps[$x]['destinations'][$y]['select_label'] = "\${name}"; - //} - //menu-top - //menu-exit + + $y++; + $apps[$x]['destinations'][$y]['type'] = "sql"; + $apps[$x]['destinations'][$y]['label'] = "ivr_menus_sub"; + $apps[$x]['destinations'][$y]['name'] = "ivr_menus"; + $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' "; + $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc"; + $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name"; + $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid"; + $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}"; + $apps[$x]['destinations'][$y]['select_label'] = "\${name}"; + + $y++; + $apps[$x]['destinations'][$y]['type'] = 'array'; + $apps[$x]['destinations'][$y]['label'] = 'ivr_menus_other'; + $apps[$x]['destinations'][$y]['name'] = 'ivr_menus'; + $apps[$x]['destinations'][$y]['field']['name'] = 'name'; + $apps[$x]['destinations'][$y]['field']['destination'] = 'destination'; + $apps[$x]['destinations'][$y]['select_value']['ivr'] = "\${name}:"; + $apps[$x]['destinations'][$y]['select_label'] = "\${name}"; + $z=0; + $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'top'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-top'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['application'] = 'menu-top'; + $z++; + $apps[$x]['destinations'][$y]['result']['data'][$z]['label'] = 'exit'; + $apps[$x]['destinations'][$y]['result']['data'][$z]['name'] = 'menu-exit'; //menu-say-phrase //menu-play-sound diff --git a/app/ivr_menus/app_languages.php b/app/ivr_menus/app_languages.php index 6b9dd4408d..f8dc93c149 100644 --- a/app/ivr_menus/app_languages.php +++ b/app/ivr_menus/app_languages.php @@ -106,6 +106,69 @@ $text['title-ivr_menus_sub']['ru-ru'] = "Суб-опции Голосового $text['title-ivr_menus_sub']['sv-se'] = "IVR Menyer - Sub"; $text['title-ivr_menus_sub']['uk-ua'] = ""; +$text['title-ivr_menus_other']['en-us'] = "IVR Menus - Other"; +$text['title-ivr_menus_other']['en-gb'] = "IVR Menus - Other"; +$text['title-ivr_menus_other']['ar-eg'] = ""; +$text['title-ivr_menus_other']['de-at'] = "Automatische Vermittlungen - Other"; //copied from de-de +$text['title-ivr_menus_other']['de-ch'] = "Automatische Vermittlungen - Other"; //copied from de-de +$text['title-ivr_menus_other']['de-de'] = "Automatische Vermittlungen - Other"; +$text['title-ivr_menus_other']['es-cl'] = "Menus IVR - Other"; +$text['title-ivr_menus_other']['es-mx'] = "Menus IVR - Other"; //copied from es-cl +$text['title-ivr_menus_other']['fr-ca'] = "Menus SVI - Other"; //copied from fr-fr +$text['title-ivr_menus_other']['fr-fr'] = "Menus SVI - Other"; +$text['title-ivr_menus_other']['he-il'] = ""; +$text['title-ivr_menus_other']['it-it'] = "Menu IVR - Other"; +$text['title-ivr_menus_other']['nl-nl'] = "IVR Sub - menu"; +$text['title-ivr_menus_other']['pl-pl'] = "Menu zapowiedzi głosowych (IVR) - Other"; +$text['title-ivr_menus_other']['pt-br'] = "Menus de IVR - Other"; //copied from pt-pt +$text['title-ivr_menus_other']['pt-pt'] = "Menus de IVR - Other"; +$text['title-ivr_menus_other']['ro-ro'] = ""; +$text['title-ivr_menus_other']['ru-ru'] = "Суб-опции Голосового Меню (IVR)"; +$text['title-ivr_menus_other']['sv-se'] = "IVR Menyer - Other"; +$text['title-ivr_menus_other']['uk-ua'] = ""; + +$text['option-exit']['en-us'] = "Exit"; +$text['option-exit']['en-gb'] = ""; +$text['option-exit']['ar-eg'] = ""; +$text['option-exit']['de-at'] = ""; //copied from de-de +$text['option-exit']['de-ch'] = ""; //copied from de-de +$text['option-exit']['de-de'] = ""; +$text['option-exit']['es-cl'] = ""; +$text['option-exit']['es-mx'] = ""; //copied from es-cl +$text['option-exit']['fr-ca'] = ""; //copied from fr-fr +$text['option-exit']['fr-fr'] = ""; +$text['option-exit']['he-il'] = ""; +$text['option-exit']['it-it'] = ""; +$text['option-exit']['nl-nl'] = ""; +$text['option-exit']['pl-pl'] = ""; +$text['option-exit']['pt-br'] = ""; //copied from pt-pt +$text['option-exit']['pt-pt'] = ""; +$text['option-exit']['ro-ro'] = ""; +$text['option-exit']['ru-ru'] = ""; +$text['option-exit']['sv-se'] = ""; +$text['option-exit']['uk-ua'] = ""; + +$text['option-top']['en-us'] = "Top"; +$text['option-top']['en-gb'] = ""; +$text['option-top']['ar-eg'] = ""; +$text['option-top']['de-at'] = ""; //copied from de-de +$text['option-top']['de-ch'] = ""; //copied from de-de +$text['option-top']['de-de'] = ""; +$text['option-top']['es-cl'] = ""; +$text['option-top']['es-mx'] = ""; //copied from es-cl +$text['option-top']['fr-ca'] = ""; //copied from fr-fr +$text['option-top']['fr-fr'] = ""; +$text['option-top']['he-il'] = ""; +$text['option-top']['it-it'] = ""; +$text['option-top']['nl-nl'] = ""; +$text['option-top']['pl-pl'] = ""; +$text['option-top']['pt-br'] = ""; //copied from pt-pt +$text['option-top']['pt-pt'] = ""; +$text['option-top']['ro-ro'] = ""; +$text['option-top']['ru-ru'] = ""; +$text['option-top']['sv-se'] = ""; +$text['option-top']['uk-ua'] = ""; + $text['message-maximum_ivr_menus']['en-us'] = "Maximum IVR Menus:"; $text['message-maximum_ivr_menus']['en-gb'] = "Maximum IVR Menus:"; $text['message-maximum_ivr_menus']['ar-eg'] = "";