Merge branch 'develop' of https://bitbucket.org/colosa/processmaker into feature/PMCORE-1444

This commit is contained in:
Henry Jordan
2020-06-17 16:49:16 +00:00
2 changed files with 8 additions and 42 deletions

View File

@@ -686,8 +686,6 @@ class PmDynaform
$json->dataGridEnvironment = "onDataGridEnvironment"; $json->dataGridEnvironment = "onDataGridEnvironment";
if (isset($this->fields["APP_DATA"])) { if (isset($this->fields["APP_DATA"])) {
$dataGridEnvironment = $this->fields["APP_DATA"]; $dataGridEnvironment = $this->fields["APP_DATA"];
//Grids only access the global variables of 'ProcessMaker', other variables are removed.
$this->fields["APP_DATA"] = Cases::getGlobalVariables($this->fields["APP_DATA"]);
//restore AppData with dataVariable definition, only for columns control //restore AppData with dataVariable definition, only for columns control
foreach ($columnsDataVariable as $dge) { foreach ($columnsDataVariable as $dge) {
if (isset($dataGridEnvironment[$dge])) { if (isset($dataGridEnvironment[$dge])) {

View File

@@ -6,6 +6,7 @@ use Bootstrap;
use G; use G;
use Illuminate\Filesystem\Filesystem; use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
use Monolog\Logger;
use ProcessMaker\Core\System; use ProcessMaker\Core\System;
use ProcessMaker\Services\OAuth2\Server; use ProcessMaker\Services\OAuth2\Server;
use ProcessMaker\Util\PhpShorthandByte; use ProcessMaker\Util\PhpShorthandByte;
@@ -301,7 +302,7 @@ class ValidationUploadedFiles
*/ */
public function runRulesForPostFilesOfNote($file) public function runRulesForPostFilesOfNote($file)
{ {
$validator = new Validator(); $validator = $this->runRules($file);
//rule: file exists //rule: file exists
$rule = $validator->addRule(); $rule = $validator->addRule();
@@ -314,20 +315,9 @@ class ValidationUploadedFiles
} }
return self::VALID; return self::VALID;
}) })
->status(400) ->status(Logger::ERROR)
->log(function($rule) { ->log(function($rule) {
/** Bootstrap::registerMonologPhpUploadExecution('phpUpload', Logger::ERROR, $rule->getMessage(), $rule->getData()->filename);
* Levels supported by MonologProvider is:
* 100 "DEBUG"
* 200 "INFO"
* 250 "NOTICE"
* 300 "WARNING"
* 400 "ERROR"
* 500 "CRITICAL"
* 550 "ALERT"
* 600 "EMERGENCY"
*/
Bootstrap::registerMonologPhpUploadExecution('phpUpload', $rule->getStatus(), $rule->getMessage(), $rule->getData()->filename);
}); });
//rule: extensions //rule: extensions
@@ -344,20 +334,9 @@ class ValidationUploadedFiles
} }
return self::VALID; return self::VALID;
}) })
->status(400) ->status(Logger::ERROR)
->log(function($rule) { ->log(function($rule) {
/** Bootstrap::registerMonologPhpUploadExecution('phpUpload', Logger::ERROR, $rule->getMessage(), $rule->getData()->filename);
* Levels supported by MonologProvider is:
* 100 "DEBUG"
* 200 "INFO"
* 250 "NOTICE"
* 300 "WARNING"
* 400 "ERROR"
* 500 "CRITICAL"
* 550 "ALERT"
* 600 "EMERGENCY"
*/
Bootstrap::registerMonologPhpUploadExecution('phpUpload', $rule->getStatus(), $rule->getMessage(), $rule->getData()->filename);
}); });
//rule: file size //rule: file size
@@ -375,20 +354,9 @@ class ValidationUploadedFiles
} }
return self::VALID; return self::VALID;
}) })
->status(400) ->status(Logger::ERROR)
->log(function($rule) { ->log(function($rule) {
/** Bootstrap::registerMonologPhpUploadExecution('phpUpload', Logger::ERROR, $rule->getMessage(), $rule->getData()->filename);
* Levels supported by MonologProvider is:
* 100 "DEBUG"
* 200 "INFO"
* 250 "NOTICE"
* 300 "WARNING"
* 400 "ERROR"
* 500 "CRITICAL"
* 550 "ALERT"
* 600 "EMERGENCY"
*/
Bootstrap::registerMonologPhpUploadExecution('phpUpload', $rule->getStatus(), $rule->getMessage(), $rule->getData()->filename);
}); });
return $validator->validate(); return $validator->validate();