This commit is contained in:
Roly Rudy Gutierrez Pinto
2018-12-13 14:42:05 -04:00
parent 85e96ca6dd
commit 4b445afa9f
13 changed files with 13 additions and 13 deletions

View File

@@ -5490,7 +5490,7 @@ class G
public static function verifyInputDocExtension($InpDocAllowedFiles, $fileName, $filesTmpName) public static function verifyInputDocExtension($InpDocAllowedFiles, $fileName, $filesTmpName)
{ {
$error = null; $error = null;
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) use(&$error) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) use(&$error) {
$error = new stdclass(); $error = new stdclass();
$error->status = false; $error->status = false;
$error->message = $validator->getMessage(); $error->message = $validator->getMessage();

View File

@@ -1026,7 +1026,7 @@ class adminProxy extends HttpProxyController
*/ */
public function uploadImage() public function uploadImage()
{ {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
echo G::json_encode([ echo G::json_encode([
'success' => true, 'success' => true,
'failed' => true, 'failed' => true,

View File

@@ -725,7 +725,7 @@ class pmTablesProxy extends HttpProxyController
} }
try { try {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
throw new ExceptionRestApi($validator->getMessage()); throw new ExceptionRestApi($validator->getMessage());
}); });
$result = new stdClass(); $result = new stdClass();

View File

@@ -1446,7 +1446,7 @@ function checkTree($uidOriginFolder, $uidNewFolder)
*/ */
function uploadExternalDocument() function uploadExternalDocument()
{ {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
$response = [ $response = [
'error' => $validator->getMessage(), 'error' => $validator->getMessage(),
'message' => $validator->getMessage(), 'message' => $validator->getMessage(),

View File

@@ -18,7 +18,7 @@ function runBgProcessmaker($task, $log)
} }
try { try {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
throw new ExceptionRestApi($validator->getMessage()); throw new ExceptionRestApi($validator->getMessage());
}); });
if (isset($_REQUEST["action"])) { if (isset($_REQUEST["action"])) {

View File

@@ -36,7 +36,7 @@ $response = array();
$status = 1; $status = 1;
try { try {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
throw new Exception($validator->getMessage()); throw new Exception($validator->getMessage());
}); });

View File

@@ -25,7 +25,7 @@
use \ProcessMaker\Importer\XmlImporter; use \ProcessMaker\Importer\XmlImporter;
use ProcessMaker\Validation\ValidationUploadedFiles; use ProcessMaker\Validation\ValidationUploadedFiles;
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
echo G::json_encode([ echo G::json_encode([
'status' => 'ERROR', 'status' => 'ERROR',
'success' => true, 'success' => true,

View File

@@ -27,7 +27,7 @@ if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
} }
} }
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
$response = [ $response = [
'result' => 0, 'result' => 0,
'msg' => $validator->getMessage() 'msg' => $validator->getMessage()

View File

@@ -26,7 +26,7 @@ if ($access != 1) {
$result = new stdClass(); $result = new stdClass();
try { try {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
throw new Exception($validator->getMessage()); throw new Exception($validator->getMessage());
}); });
//if the xmlform path is writeable //if the xmlform path is writeable

View File

@@ -32,7 +32,7 @@ global $RBAC;
$RBAC->requirePermissions('PM_SETUP_ADVANCE'); $RBAC->requirePermissions('PM_SETUP_ADVANCE');
try { try {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
throw new Exception($validator->getMessage()); throw new Exception($validator->getMessage());
}); });
//load the variables //load the variables

View File

@@ -200,7 +200,7 @@ function newSkin ($baseSkin = 'classic')
function importSkin () function importSkin ()
{ {
try { try {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
throw new Exception($validator->getMessage()); throw new Exception($validator->getMessage());
}); });
if (! isset( $_FILES['uploadedFile'] )) { if (! isset( $_FILES['uploadedFile'] )) {

View File

@@ -937,7 +937,7 @@ class InputDocument
*/ */
public function uploadFileCase($files, $caseInstance, $aData, $userUid, $appUid, $delIndex) public function uploadFileCase($files, $caseInstance, $aData, $userUid, $appUid, $delIndex)
{ {
ValidationUploadedFiles::getValidationUploadedFiles()->dispach(function($validator) { ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
G::SendMessageText($validator->getMessage(), "ERROR"); G::SendMessageText($validator->getMessage(), "ERROR");
$url = explode("sys" . config("system.workspace"), $_SERVER['HTTP_REFERER']); $url = explode("sys" . config("system.workspace"), $_SERVER['HTTP_REFERER']);
G::header("location: " . "/sys" . config("system.workspace") . $url[1]); G::header("location: " . "/sys" . config("system.workspace") . $url[1]);

View File

@@ -216,7 +216,7 @@ class ValidationUploadedFiles
* @param function $callback * @param function $callback
* @return $this * @return $this
*/ */
public function dispach($callback) public function dispatch($callback)
{ {
if (!empty($this->fails[0])) { if (!empty($this->fails[0])) {
if (!empty($callback) && is_callable($callback)) { if (!empty($callback) && is_callable($callback)) {