Merged in bugfix/PMCORE-1335 (pull request #7332)
PMCORE-1335 ProcessMaker core should be use the native Laravel log mechanism Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
5e8d0a8f02
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use ProcessMaker\Core\AppEvent;
|
||||
use ProcessMaker\Core\JobsManager;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
@@ -827,13 +828,22 @@ if (substr(SYS_COLLECTION, 0, 8) === 'gulliver') {
|
||||
$isWebEntry = \ProcessMaker\BusinessModel\WebEntry::isWebEntry(SYS_COLLECTION, $phpFile);
|
||||
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && !$isWebEntry) {
|
||||
$message = \G::LoadTranslation('ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpExecution', 550, $message, $phpFile);
|
||||
$context = [
|
||||
'filename' => $phpFile,
|
||||
'url' => $_SERVER["REQUEST_URI"] ?? ''
|
||||
];
|
||||
Log::channel(':phpExecution')->alert($message, \Bootstrap::context($context));
|
||||
echo $message;
|
||||
die();
|
||||
} else {
|
||||
//Backward compatibility: Preload PmDynaform for old generated webentry files.
|
||||
class_exists('PmDynaform');
|
||||
\Bootstrap::registerMonologPhpUploadExecution('phpExecution', 200, 'Php Execution', $phpFile);
|
||||
$message = 'Php Execution';
|
||||
$context = [
|
||||
'filename' => $phpFile,
|
||||
'url' => $_SERVER["REQUEST_URI"] ?? ''
|
||||
];
|
||||
Log::channel(':phpExecution')->info($message, \Bootstrap::context($context));
|
||||
}
|
||||
|
||||
$avoidChangedWorkspaceValidation = true;
|
||||
|
||||
Reference in New Issue
Block a user