From 0fb9fadea73ef068d2ce16936c5d507b8d04c242 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 30 Jun 2016 00:40:01 -0600 Subject: [PATCH] Update switch_music_on_hold.php Fix the alias on the moh sql select string. --- .../resources/classes/switch_music_on_hold.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index ac84bd77a0..4cef6eaab6 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -50,8 +50,6 @@ include "root.php"; } } - //it is NOT recommended to use this function if you want to include ringback you should be using the ringback class - //see app/ring_groups/ring_group_edit.php for example public function select($name, $selected, $options) { //add multi-lingual support $language = new text; @@ -108,8 +106,8 @@ include "root.php"; //get moh records, build array $sql = "select "; - $sql .= "(select domain_name from v_domains as d where domain_uuid = m.domain_uuid) as domain_name, * "; - $sql .= "from v_music_on_hold "; + $sql .= "(select domain_name from v_domains as d where domain_uuid = s.domain_uuid) as domain_name, * "; + $sql .= "from v_music_on_hold as s "; $sql .= "where domain_uuid = '".$this->domain_uuid."' "; if (permission_exists('music_on_hold_global_view')) { $sql .= "or domain_uuid is null ";