mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-08 04:33:49 +00:00
add caveat when the config.lua is inside scripts\resources
due to app_defaults running before install_switch create_config_lua cannot create it's config if the detected folder is scripts\resources\ this solves this by adding a caveat to create it's parent folder when it is called resources
This commit is contained in:
@@ -278,6 +278,14 @@ include "root.php";
|
||||
|
||||
public function create_config_lua() {
|
||||
$this->write_progress("\tCreating " . $this->config_lua);
|
||||
$dirs = array_pop(explode("/", normalize_path($config_path)));
|
||||
$path = normalize_path_to_os(join("/", $dirs));
|
||||
if($dirs[(sizeof($dirs)-1)] == 'resources' and !file_exists($path)){
|
||||
if (!mkdir($path, 0755, true)) {
|
||||
throw new Exception("Failed to create the missing resources directory '$path'");
|
||||
}
|
||||
}
|
||||
|
||||
global $db;
|
||||
//get the odbc information
|
||||
$sql = "select count(*) as num_rows from v_databases ";
|
||||
|
||||
Reference in New Issue
Block a user