Fixed error when deleting moh as user (#5267)

When deleting moh as user the sql statement was corrupt and moh was not deleted.
This commit is contained in:
Antonio Mark 2020-05-19 06:58:16 +02:00 committed by GitHub
parent 448c121433
commit 6cc4e6f9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ if (!class_exists('switch_music_on_hold')) {
//get music on hold details
$sql = "select * from v_music_on_hold ";
$sql .= "where (domain_uuid = :domain_uuid ".(!permission_exists('music_on_hold_domain') ?: "or domain_uuid is null ").") ";
$sql .= "where (domain_uuid = :domain_uuid ".(!permission_exists('music_on_hold_domain') ? "": "or domain_uuid is null ").") ";
$sql .= "and music_on_hold_uuid in ('".implode("','", array_keys($moh))."') ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
@ -377,4 +377,4 @@ if (!class_exists('switch_music_on_hold')) {
//$moh->xml();
//$moh->save();
?>
?>