save the file when the context session has a value
This commit is contained in:
parent
9d790de024
commit
7f8289737a
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -68,9 +68,11 @@
|
|||
$file_path = $_SESSION['switch']['conf']['dir'].'/dialplan/'.$_SESSION['context'].'.xml';
|
||||
|
||||
//write the default dialplan
|
||||
$fh = fopen($file_path,'w') or die('Unable to write to '.$file_path.'. Make sure the path exists and permissions are set correctly.');
|
||||
fwrite($fh, $file_default_contents);
|
||||
fclose($fh);
|
||||
if (strlen($_SESSION['context']) > 0) {
|
||||
$fh = fopen($file_path,'w') or die('Unable to write to '.$file_path.'. Make sure the path exists and permissions are set correctly.');
|
||||
fwrite($fh, $file_default_contents);
|
||||
fclose($fh);
|
||||
}
|
||||
}
|
||||
|
||||
//get the $apps array from the installed apps from the core and mod directories
|
||||
|
|
|
|||
Loading…
Reference in New Issue