diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index a796cc7288..caae179336 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -722,7 +722,7 @@ if (!empty($ivr_menus)) { foreach($ivr_menus as $field) { if ($field['ivr_menu_uuid'] != $ivr_menu_uuid) { - if ($ivr_menu_parent_uuid == $field['ivr_menu_uuid']) { + if (!empty($ivr_menu_parent_uuid) && $ivr_menu_parent_uuid == $field['ivr_menu_uuid']) { echo "\n"; } else { @@ -827,11 +827,11 @@ foreach ($recordings as &$row) { $recording_name = $row["recording_name"]; $recording_filename = $row["recording_filename"]; - if ($ivr_menu_greet_long == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && !empty($ivr_menu_greet_long)) { + if (!empty($ivr_menu_greet_long) && $ivr_menu_greet_long == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename) { $tmp_selected = true; echo " \n"; } - else if ($ivr_menu_greet_long == $recording_filename && !empty($ivr_menu_greet_long)) { + else if (!empty($ivr_menu_greet_long) && $ivr_menu_greet_long == $recording_filename) { $tmp_selected = true; echo " \n"; } @@ -845,7 +845,7 @@ if (!empty($phrases)) { echo "\n"; foreach ($phrases as &$row) { - if ($ivr_menu_greet_long == "phrase:".$row["phrase_uuid"]) { + if (!empty($ivr_menu_greet_long) && $ivr_menu_greet_long == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; echo " \n"; } @@ -968,11 +968,11 @@ foreach ($recordings as &$row) { $recording_name = $row["recording_name"]; $recording_filename = $row["recording_filename"]; - if ($ivr_menu_greet_short == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($recording_filename) && !empty($ivr_menu_greet_short)) { + if (!empty($ivr_menu_greet_short) && $ivr_menu_greet_short == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".escape($recording_filename)) { $tmp_selected = true; echo " \n"; } - else if ($ivr_menu_greet_short == $recording_filename && !empty($ivr_menu_greet_short)) { + else if (!empty($ivr_menu_greet_short) && $ivr_menu_greet_short == $recording_filename) { $tmp_selected = true; echo " \n"; } @@ -986,7 +986,7 @@ if (!empty($phrases)) { echo "\n"; foreach ($phrases as &$row) { - if ($ivr_menu_greet_short == "phrase:".$row["phrase_uuid"]) { + if (!empty($ivr_menu_greet_short) && $ivr_menu_greet_short == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; echo " \n"; } @@ -1391,11 +1391,11 @@ foreach ($recordings as &$row) { $recording_name = $row["recording_name"]; $recording_filename = $row["recording_filename"]; - if ($ivr_menu_exit_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && !empty($ivr_menu_exit_sound)) { + if (!empty($ivr_menu_exit_sound) && $ivr_menu_exit_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename) { $tmp_selected = true; echo " \n"; } - else if ($ivr_menu_exit_sound == $recording_filename && !empty($ivr_menu_exit_sound)) { + else if (!empty($ivr_menu_exit_sound) && $ivr_menu_exit_sound == $recording_filename) { $tmp_selected = true; echo " \n"; } @@ -1409,7 +1409,7 @@ if (!empty($phrases)) { echo "\n"; foreach ($phrases as &$row) { - if ($ivr_menu_exit_sound == "phrase:".$row["phrase_uuid"]) { + if (!empty($ivr_menu_exit_sound) && $ivr_menu_exit_sound == "phrase:".$row["phrase_uuid"]) { $tmp_selected = true; echo " \n"; } @@ -1424,10 +1424,10 @@ echo "\n"; foreach ($sound_files as $value) { if (!empty($value)) { - if (substr($ivr_menu_exit_sound, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") { + if (!empty($ivr_menu_exit_sound) && substr($ivr_menu_exit_sound, 0, 71) == "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}/") { $ivr_menu_exit_sound = substr($ivr_menu_exit_sound, 71); } - if ($ivr_menu_exit_sound == $value) { + if (!empty($ivr_menu_exit_sound) && $ivr_menu_exit_sound == $value) { $tmp_selected = true; echo " \n"; } @@ -1463,7 +1463,7 @@ echo " ".$text['label-pin_number']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-pin_number']."\n"; echo "\n"; @@ -1474,7 +1474,7 @@ echo " ".$text['label-comfirm_macro']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-comfirm_macro']."\n"; echo "\n"; @@ -1485,7 +1485,7 @@ echo " ".$text['label-comfirm_key']."\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; echo $text['description-comfirm_key']."\n"; echo "\n";