Merge remote-tracking branch 'origin/feature/HOR-3559' into feature/HOR-3629
This commit is contained in:
@@ -201,6 +201,12 @@ class workspaceTools
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Updating rows in Web Entry table for classic processes took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Update framework paths...\n");
|
||||
$this->updateFrameworkPaths($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Update framework paths took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrating and populating plugin singleton data...\n");
|
||||
$this->migrateSingleton($workSpace);
|
||||
@@ -3927,4 +3933,22 @@ class workspaceTools
|
||||
CLI::logging(CLI::error("Error:" . "Error updating generated class files for PM Tables, proceed to regenerate manually: " . $e));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updating framework directory structure
|
||||
*
|
||||
*/
|
||||
private function updateFrameworkPaths($workSpace = SYS_SYS)
|
||||
{
|
||||
$paths = [
|
||||
PATH_DATA.'framework' => 0770,
|
||||
PATH_DATA.'framework' . DIRECTORY_SEPARATOR . 'cache' => 0770,
|
||||
];
|
||||
foreach ($paths as $path => $permission) {
|
||||
if (!file_exists($path)) {
|
||||
G::mk_dir($path, $permission);
|
||||
}
|
||||
CLI::logging(" $path [" . (file_exists($path) ? 'OK' : 'MISSING') . "]\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -321,10 +321,12 @@ class Installer extends Controller
|
||||
if ($info->pathShared->result) {
|
||||
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
||||
} else {
|
||||
//Verify and create the shared path
|
||||
G::verifyPath( $_REQUEST['pathShared'], true );
|
||||
$info->pathShared->result = G::is_writable_r( $_REQUEST['pathShared'], $noWritableFiles );
|
||||
if ($info->pathShared->result) {
|
||||
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
||||
$info->success = $this->verifySharedFrameworkPaths($_REQUEST['pathShared']);
|
||||
} else {
|
||||
$info->success = false;
|
||||
}
|
||||
@@ -1739,4 +1741,25 @@ class Installer extends Controller
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify/create framework shared directory structure
|
||||
*
|
||||
*/
|
||||
private function verifySharedFrameworkPaths($sharedPath)
|
||||
{
|
||||
$paths = [
|
||||
$sharedPath . 'framework' => 0770,
|
||||
$sharedPath . 'framework' . DIRECTORY_SEPARATOR . 'cache' => 0770,
|
||||
];
|
||||
foreach ($paths as $path => $permission) {
|
||||
if (!file_exists($path)) {
|
||||
G::mk_dir($path, $permission);
|
||||
}
|
||||
if (!file_exists($path)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
require_once(__DIR__ . '/../../bootstrap/autoload.php');
|
||||
use Illuminate\Foundation\Http\Kernel;
|
||||
|
||||
// Because laravel has a __ helper function, it's important we include the class.g file to ensure our __ is used.
|
||||
require_once __DIR__ . '/../../gulliver/system/class.g.php';
|
||||
require_once __DIR__ . '/../../bootstrap/autoload.php';
|
||||
require_once __DIR__ . '/../../bootstrap/app.php';
|
||||
|
||||
|
||||
register_shutdown_function(
|
||||
create_function(
|
||||
"",
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
@@ -548,6 +549,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