Fix a bug where spaces can cause problems with the IVR Menu. Remove the space and replace it with a dash. When displaying back to the user replace the dash with a space to make it look nicer.
This commit is contained in:
@@ -119,8 +119,9 @@ require_once "includes/paging.php";
|
|||||||
|
|
||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
|
$ivr_menu_name = str_replace("-", " ", $row['ivr_menu_name']);
|
||||||
echo "<tr >\n";
|
echo "<tr >\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_name']."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$ivr_menu_name."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_extension']." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_extension']." </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_direct_dial']."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_direct_dial']."</td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_enabled']."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ivr_menu_enabled']."</td>\n";
|
||||||
|
|||||||
@@ -166,6 +166,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//replace the space with a dash
|
||||||
|
$ivr_menu_name = str_replace(" ", "-", $ivr_menu_name);
|
||||||
|
|
||||||
//add or update the database
|
//add or update the database
|
||||||
if ($_POST["persistformvar"] != "true") {
|
if ($_POST["persistformvar"] != "true") {
|
||||||
//prepare the object
|
//prepare the object
|
||||||
@@ -273,10 +276,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
$ivr_menu_enabled = $row["ivr_menu_enabled"];
|
$ivr_menu_enabled = $row["ivr_menu_enabled"];
|
||||||
$ivr_menu_description = $row["ivr_menu_description"];
|
$ivr_menu_description = $row["ivr_menu_description"];
|
||||||
|
|
||||||
|
//replace the dash with a space
|
||||||
|
$ivr_menu_name = str_replace("-", " ", $ivr_menu_name);
|
||||||
|
|
||||||
if (strlen($ivr_menu_exit_app) > 0) {
|
if (strlen($ivr_menu_exit_app) > 0) {
|
||||||
$ivr_menu_exit_action = $ivr_menu_exit_app.":".$ivr_menu_exit_data;
|
$ivr_menu_exit_action = $ivr_menu_exit_app.":".$ivr_menu_exit_data;
|
||||||
}
|
}
|
||||||
break; //limit to 1 row
|
|
||||||
}
|
}
|
||||||
unset ($prep_statement);
|
unset ($prep_statement);
|
||||||
}
|
}
|
||||||
@@ -526,22 +531,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
}
|
}
|
||||||
//sounds
|
//sounds
|
||||||
//$dir_path = $_SESSION['switch']['sounds']['dir'];
|
$dir_path = $_SESSION['switch']['sounds']['dir'];
|
||||||
//recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
recur_sounds_dir($_SESSION['switch']['sounds']['dir']);
|
||||||
//echo "<optgroup label='sounds'>\n";
|
echo "<optgroup label='sounds'>\n";
|
||||||
//foreach ($dir_array as $key => $value) {
|
foreach ($dir_array as $key => $value) {
|
||||||
// if (strlen($value) > 0) {
|
if (strlen($value) > 0) {
|
||||||
// $tmp_dir = "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}";
|
$tmp_dir = "\$\${sounds_dir}/\${default_language}/\${default_dialect}/\${default_voice}";
|
||||||
// if ($ivr_menu_greet_short == $tmp_dir.'/'.$key) {
|
if ($ivr_menu_greet_short == $tmp_dir.'/'.$key) {
|
||||||
// $tmp_selected = true;
|
$tmp_selected = true;
|
||||||
// echo " <option value='$tmp_dir/$key' selected>$key</option>\n";
|
echo " <option value='$tmp_dir/$key' selected>$key</option>\n";
|
||||||
// }
|
}
|
||||||
// else {
|
else {
|
||||||
// echo " <option value='$tmp_dir/$key'>$key</option>\n";
|
echo " <option value='$tmp_dir/$key'>$key</option>\n";
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
//echo "</optgroup>\n";
|
echo "</optgroup>\n";
|
||||||
//select
|
//select
|
||||||
if (if_group("superadmin")) {
|
if (if_group("superadmin")) {
|
||||||
if (!$tmp_selected) {
|
if (!$tmp_selected) {
|
||||||
|
|||||||
Reference in New Issue
Block a user