fix for reading template from correct dir.

This commit is contained in:
Richard Neese 2014-10-24 18:24:16 +00:00
parent 17fd595b64
commit be7ba59b6e
1 changed files with 5 additions and 1 deletions

View File

@ -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);