Using phrase uuid instead of the phrase name reason is this prevents the phrase from breaking when the phrase name is changed.

This commit is contained in:
markjcrane
2016-01-04 17:16:14 -07:00
parent 724afd7c17
commit 5daf58be72
2 changed files with 4 additions and 4 deletions

View File

@@ -462,12 +462,12 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if (count($result) > 0) {
echo "<optgroup label='Phrases'>\n";
foreach ($result as &$row) {
if ($ivr_menu_greet_long == "phrase:".$row["phrase_name"].".".$domain_uuid) {
if ($ivr_menu_greet_long == "phrase:".$row["phrase_uuid"]) {
$tmp_selected = true;
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."' selected='selected'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."' selected='selected'>".$row["phrase_name"]."</option>\n";
}
else {
echo " <option value='phrase:".$row["phrase_name"].".".$domain_uuid."'>".$row["phrase_name"]."</option>\n";
echo " <option value='phrase:".$row["phrase_uuid"]."'>".$row["phrase_name"]."</option>\n";
}
}
unset ($prep_statement);

View File

@@ -127,7 +127,7 @@
table.insert(xml, [[ </input>]]);
table.insert(xml, [[ </macro>]]);;
end
table.insert(xml, [[ <macro name="]]..row.phrase_name..[[.]]..row.domain_uuid..[[">]]);
table.insert(xml, [[ <macro name="]]..row.phrase_uuid..[[">]]);
table.insert(xml, [[ <input pattern=\"(.*)\">]]);
table.insert(xml, [[ <match>]]);
match_open_tag = true