mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Merge pull request #1127 from moteus/status_of_valid_profile
Fix. Display only profiles which related to specific FS.
This commit is contained in:
@@ -100,9 +100,18 @@ if ($_GET['a'] == "download") {
|
||||
$gateways = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
if ($fp) {
|
||||
$hostname = trim(event_socket_request($fp, 'api switchname'));
|
||||
}
|
||||
|
||||
//get the sip profiles
|
||||
$sql = "select sip_profile_name from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_enabled = 'true' ";
|
||||
if ($hostname) {
|
||||
$sql .= "and (sip_profile_hostname = '" . check_str($hostname) . "' ";
|
||||
$sql .= "or sip_profile_hostname = '' ";
|
||||
$sql .= "or sip_profile_hostname is null ) ";
|
||||
}
|
||||
$sql .= "order by sip_profile_name asc ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
|
||||
Reference in New Issue
Block a user