PMC-1165 The application is using two different paths for the Laravel cache files

This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-09-06 09:02:45 -04:00
parent bfdd996c23
commit f13bc50aea
2 changed files with 29 additions and 1 deletions

View File

@@ -1655,5 +1655,30 @@ class System
app()->make(Kernel::class)->bootstrap();
restore_error_handler();
}
/**
* If the installation file exists it returns the defined values.
* @return object
*/
public static function getPathsInstalled()
{
//default values
$result = [
'pathData' => getcwd() . '/shared',
'pathCompiled' => getcwd() . '/shared/compiled',
];
$pathsInstalled = getcwd() . "/workflow/engine/config/paths_installed.php";
if (file_exists($pathsInstalled)) {
$script = "require_once '{$pathsInstalled}';"
. "return ["
. "'pathData' => PATH_DATA,"
. "'pathCompiled' => PATH_C,"
. "'hashInstallation' => HASH_INSTALLATION,"
. "'systemHash' => SYSTEM_HASH,"
. "];";
$result = eval($script);
}
return (object) $result;
}
}
// end System class