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