mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-02 02:03:48 +00:00
made it possible to find phrases
fixed string replace not taking out spaces aswell
This commit is contained in:
@@ -644,14 +644,28 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$ivr_menu_option_param = $field['ivr_menu_option_action'];
|
||||
}
|
||||
$ivr_menu_option_param = str_replace("menu-", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("XML", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("transfer", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("bridge", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("XML ", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("transfer ", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("bridge ", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace($_SESSION['domain_name'], "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("\${domain_name}", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("\${domain}", "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace(".".$_SESSION['domain_uuid'], "", $ivr_menu_option_param);
|
||||
$ivr_menu_option_param = str_replace("//", "/", $ivr_menu_option_param);
|
||||
if (preg_match( "/^phrase /", $ivr_menu_option_param )) {
|
||||
// parse out phrase uuid
|
||||
$phrase_uuid = str_replace("phrase ", "", $ivr_menu_option_param);
|
||||
// retrieve phrase name from db
|
||||
$sql = "select phrase_name from v_phrases where phrase_uuid = '$phrase_uuid' limit 1";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($result) > 0) {
|
||||
$phrase_name = $result[0]['phrase_name'];
|
||||
$ivr_menu_option_param = "<b>phrase:</b> $phrase_name";
|
||||
}
|
||||
unset ($prep_statement, $sql, $phrase_uuid, $phrase_name);
|
||||
}
|
||||
//$ivr_menu_option_param = ucfirst(trim($ivr_menu_option_param));
|
||||
echo " <tr>\n";
|
||||
echo " <td class='vtable'>\n";
|
||||
|
||||
Reference in New Issue
Block a user