From a90c785ea3789196d8b96dd8ef771f236a82f124 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 10 Feb 2018 08:46:15 -0700 Subject: [PATCH] Update sounds.php --- resources/classes/sounds.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/resources/classes/sounds.php b/resources/classes/sounds.php index 3a99e84748..d53c3e1312 100644 --- a/resources/classes/sounds.php +++ b/resources/classes/sounds.php @@ -11,6 +11,7 @@ class sounds { * Called when the object is created */ public $db; + public $domain_uuid; /** * Class constructor @@ -44,11 +45,13 @@ class sounds { //miscellaneous $x=0; - $array['miscellaneous'][$x]['name'] = "say"; - $array['miscellaneous'][$x]['value'] = "say:"; - $x++; - $array['miscellaneous'][$x]['name'] = "tone_stream"; - $array['miscellaneous'][$x]['value'] = "tone_stream:"; + if (if_group("superadmin")) { + $array['miscellaneous'][$x]['name'] = "say"; + $array['miscellaneous'][$x]['value'] = "say:"; + $x++; + $array['miscellaneous'][$x]['name'] = "tone_stream"; + $array['miscellaneous'][$x]['value'] = "tone_stream:"; + } //recordings if (file_exists($_SERVER["PROJECT_ROOT"]."/app/phrases/app_config.php")) { $sql = "select recording_name, recording_filename from v_recordings "; @@ -75,7 +78,7 @@ class sounds { $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); if (count($result) > 0) { foreach ($result as &$row) { - $array['phrases'][$x]['name'] = "phrase:".$row["phrase_uuid"]; + $array['phrases'][$x]['name'] = "phrase:".$row["phrase_name"]; $array['phrases'][$x]['value'] = "phrase:".$row["phrase_uuid"]; $x++; }