From be7ba59b6ebf8f9ecbc13ce778b745e3e64db3a4 Mon Sep 17 00:00:00 2001 From: Richard Neese Date: Fri, 24 Oct 2014 18:24:16 +0000 Subject: [PATCH] fix for reading template from correct dir. --- .../resources/classes/switch_music_on_hold.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ce59d72863..66535d6ecf 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 @@ -181,8 +181,12 @@ include "root.php"; public function save() { //get the contents of the template + if (file_exists('/usr/share/examples/fusionpbx')) { + $file_contents = file_get_contents("/usr/share/examples/fusionpbx/resources/templates/conf/autoload_configs/local_stream.conf.xml"); + else $file_contents = file_get_contents($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/conf/autoload_configs/local_stream.conf.xml"); - + fi + } //replace the variable $file_contents = str_replace("{v_moh_categories}", $this->xml, $file_contents);