Update scripts dir session variable as it was not set in the install
This would break the install and prevent the scripts getting copied to the right location. That had a chain reaction of breaking multiple additional things.
This commit is contained in:
parent
67e77560a6
commit
c6e3fd381b
|
|
@ -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-2020
|
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -85,8 +85,13 @@ if (!class_exists('scripts')) {
|
||||||
* Copy the switch scripts from the web directory to the switch directory
|
* Copy the switch scripts from the web directory to the switch directory
|
||||||
*/
|
*/
|
||||||
public function copy_files() {
|
public function copy_files() {
|
||||||
if (!empty($_SESSION['switch']['scripts'])) {
|
|
||||||
$destination_directory = $_SESSION['switch']['scripts']['dir'];
|
//read the config.conf settings
|
||||||
|
$config_glob = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
|
||||||
|
$conf = parse_ini_file($config_glob[0]);
|
||||||
|
|
||||||
|
if (!empty($conf['switch.scripts.dir'])) {
|
||||||
|
$destination_directory = $conf['switch.scripts.dir'];
|
||||||
if ($destination_directory != '' && file_exists($destination_directory)) {
|
if ($destination_directory != '' && file_exists($destination_directory)) {
|
||||||
//get the source directory
|
//get the source directory
|
||||||
if (file_exists('/usr/share/examples/fusionpbx/scripts')) {
|
if (file_exists('/usr/share/examples/fusionpbx/scripts')) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue