PMC-1165 The application is using two different paths for the Laravel cache files
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Foundation\Exceptions\Handler;
|
|||||||
use Illuminate\Foundation\Http\Kernel as Kernel3;
|
use Illuminate\Foundation\Http\Kernel as Kernel3;
|
||||||
use Monolog\Formatter\LineFormatter;
|
use Monolog\Formatter\LineFormatter;
|
||||||
use Monolog\Handler\RotatingFileHandler;
|
use Monolog\Handler\RotatingFileHandler;
|
||||||
|
use ProcessMaker\Core\System;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -50,6 +51,8 @@ $app->singleton(
|
|||||||
Handler::class
|
Handler::class
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$app->useStoragePath(System::getPathsInstalled()->pathData);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Return The Application
|
| Return The Application
|
||||||
|
|||||||
@@ -1655,5 +1655,30 @@ class System
|
|||||||
app()->make(Kernel::class)->bootstrap();
|
app()->make(Kernel::class)->bootstrap();
|
||||||
restore_error_handler();
|
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user