HOR-3626
Moved laravel boot after ProcessMaker loads its evironment constants. (PATH_DATA for shared folder)
This commit is contained in:
@@ -15,9 +15,6 @@ $app = new Illuminate\Foundation\Application(
|
||||
realpath(__DIR__ . '/../')
|
||||
);
|
||||
|
||||
// Change storage path
|
||||
$app->useStoragePath(realpath(__DIR__.'/../shared/'));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bind Important Interfaces
|
||||
|
||||
@@ -56,8 +56,13 @@ return [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
/**
|
||||
* Memcached options, example:
|
||||
* Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
*
|
||||
* @link http://php.net/manual/en/memcached.constants.php
|
||||
*/
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -5,6 +5,7 @@ use Maveriks\Util;
|
||||
use ProcessMaker\Services;
|
||||
use ProcessMaker\Services\Api;
|
||||
use Luracast\Restler\RestException;
|
||||
use Illuminate\Foundation\Http\Kernel;
|
||||
|
||||
/**
|
||||
* Web application bootstrap
|
||||
@@ -476,6 +477,10 @@ class WebApplication
|
||||
define("PATH_TEMPORAL", PATH_C . "dynEditor/");
|
||||
define("PATH_DB", PATH_DATA . "sites" . PATH_SEP);
|
||||
|
||||
// Change storage path
|
||||
app()->useStoragePath(realpath(PATH_DATA));
|
||||
app()->make(Kernel::class)->bootstrap();
|
||||
|
||||
\Bootstrap::setLanguage();
|
||||
|
||||
\Bootstrap::LoadTranslationObject((defined("SYS_LANG"))? SYS_LANG : "en");
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Tests;
|
||||
namespace tests;
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
|
||||
trait CreatesApplication
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
namespace Tests;
|
||||
namespace tests;
|
||||
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
|
||||
@@ -202,7 +202,7 @@ class workspaceTools
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Update framework paths...\n");
|
||||
$this->updatingFrameworkPaths($workSpace);
|
||||
$this->updateFrameworkPaths($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Update framework paths took " . ($stop - $start) . " seconds.\n");
|
||||
}
|
||||
@@ -3909,7 +3909,7 @@ class workspaceTools
|
||||
* Updating framework directory structure
|
||||
*
|
||||
*/
|
||||
private function updatingFrameworkPaths($workSpace = SYS_SYS)
|
||||
private function updateFrameworkPaths($workSpace = SYS_SYS)
|
||||
{
|
||||
$paths = [
|
||||
PATH_DATA.'framework' => 0770,
|
||||
|
||||
@@ -285,7 +285,7 @@ class Translation extends BaseTranslation
|
||||
/* Load strings from plugin translation.php.
|
||||
* @parameter $languageId (es|en|...).
|
||||
*/
|
||||
public function generateFileTranslationPlugin ($plugin, $languageId = '')
|
||||
public static function generateFileTranslationPlugin ($plugin, $languageId = '')
|
||||
{
|
||||
if (!file_exists(PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . 'translations.php')) {
|
||||
return;
|
||||
|
||||
@@ -5,7 +5,6 @@ use Illuminate\Foundation\Http\Kernel;
|
||||
require_once __DIR__ . '/../../gulliver/system/class.g.php';
|
||||
require_once __DIR__ . '/../../bootstrap/autoload.php';
|
||||
require_once __DIR__ . '/../../bootstrap/app.php';
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
|
||||
|
||||
register_shutdown_function(
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel;
|
||||
|
||||
/**
|
||||
* bootstrap - ProcessMaker Bootstrap
|
||||
* this file is used initialize main variables, redirect and dispatch all requests
|
||||
@@ -546,6 +548,18 @@ if (! defined( 'PATH_DATA' ) || ! file_exists( PATH_DATA )) {
|
||||
die();
|
||||
}
|
||||
|
||||
app()->useStoragePath(realpath(PATH_DATA));
|
||||
app()->make(Kernel::class)->bootstrap();
|
||||
//Overwrite with the Processmaker env.ini configuration used in production environments
|
||||
//@todo: move env.ini configuration to .env
|
||||
ini_set( 'display_errors', $config['display_errors']);
|
||||
ini_set( 'error_reporting', $config['error_reporting']);
|
||||
ini_set( 'short_open_tag', 'On' );
|
||||
ini_set( 'default_charset', "UTF-8" );
|
||||
ini_set( 'memory_limit', $config['memory_limit'] );
|
||||
ini_set( 'soap.wsdl_cache_enabled', $config['wsdl_cache'] );
|
||||
ini_set('date.timezone', $config['time_zone']); //Set Time Zone
|
||||
|
||||
// Load Language Translation
|
||||
Bootstrap::LoadTranslationObject( defined( 'SYS_LANG' ) ? SYS_LANG : "en" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user