Check to see if that features app_config.php file exists before adding it to the switch_select_destination list.
This commit is contained in:
parent
a035c697b6
commit
f5adb254f1
|
|
@ -453,6 +453,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo " <option></option>\n";
|
||||
|
||||
//list call center queues
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/call_center/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_call_center_queues ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -494,8 +495,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
}
|
||||
|
||||
//list call flows
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/call_flows/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_call_flows ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -529,8 +532,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
unset ($prep_statement, $call_flow_extension);
|
||||
}
|
||||
}
|
||||
|
||||
//list call groups
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/extensions/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select distinct(call_group) from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -576,8 +581,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
}
|
||||
|
||||
//list conference centers
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/conference_centers/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_conference_centers ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -619,8 +626,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
unset ($prep_statement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//list conferences
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/conferences/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_conferences ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -662,9 +671,11 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
unset ($prep_statement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//list destinations
|
||||
/*
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/destinations/app_config.php")) {
|
||||
$sql = "select * from v_destinations ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and destination_enabled = 'true' ";
|
||||
|
|
@ -704,9 +715,11 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
*/
|
||||
|
||||
//list extensions
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/extensions/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact") {
|
||||
$sql = "select * from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -747,8 +760,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
unset ($prep_statement, $extension);
|
||||
}
|
||||
}
|
||||
|
||||
//list fax extensions
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/fax/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_fax ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -781,8 +796,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
unset ($prep_statement, $extension);
|
||||
}
|
||||
}
|
||||
|
||||
//list fifo queues
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/dialplans/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -851,8 +868,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
}
|
||||
|
||||
//gateways
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/conference_centers/app_config.php")) {
|
||||
if (if_group("superadmin")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact" || $select_type == "bridge") {
|
||||
echo "<optgroup label='Gateways'>\n";
|
||||
|
|
@ -912,10 +931,11 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//list hunt groups
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/hunt_groups/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_hunt_groups ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= "and hunt_group_enabled = 'true' ";
|
||||
|
|
@ -960,6 +980,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
|
||||
//list ivr menus
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/ivr_menus/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_ivr_menus ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -1002,6 +1023,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
unset ($prep_statement, $extension);
|
||||
}
|
||||
}
|
||||
|
||||
//list ivr menus
|
||||
/*
|
||||
|
|
@ -1211,6 +1233,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
|
||||
//recordings
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/recordings/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
||||
$tmp_selected = false;
|
||||
|
|
@ -1246,8 +1269,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ring groups
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/ring_groups/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_ring_groups ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -1285,8 +1310,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//list time conditions
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/dialplans/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_dialplan_details ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -1386,8 +1413,10 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
}
|
||||
unset ($prep_statement);
|
||||
}
|
||||
}
|
||||
|
||||
//list voicemail
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/voicemails/app_config.php")) {
|
||||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
$sql = "select * from v_voicemails ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -1424,6 +1453,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
echo "</optgroup>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//other
|
||||
if ($select_type == "dialplan" || $select_type == "ivr" || $select_type == "call_center_contact") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue