Merged in release/3.4.5 (pull request #7212)
Release/3.4.5 Approved-by: Paula Quispe <paula.quispe@processmaker.com> Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -42,3 +42,4 @@ test_shared/
|
||||
**/cache/
|
||||
storage/
|
||||
phpunit.xml
|
||||
!/workflow/engine/plugins/.gitignore
|
||||
@@ -45,7 +45,7 @@
|
||||
"pear/console_getopt": "1.4.*",
|
||||
"typo3/class-alias-loader": "^1.0",
|
||||
"ralouphie/getallheaders": "^2.0",
|
||||
"smarty/smarty": "2.6.30",
|
||||
"smarty/smarty": "2.6.31",
|
||||
"pdepend/pdepend": "@stable",
|
||||
"chumper/zipper": "^1.0",
|
||||
"php-imap/php-imap": "^3.0",
|
||||
|
||||
250
composer.lock
generated
250
composer.lock
generated
@@ -4,8 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "2847484159397aa0646fb850bf14c857",
|
||||
"content-hash": "6a5b008a3b908266bd5d0ff9b842eb9c",
|
||||
"content-hash": "2fbf01051b97bd40008c3196c920daed",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bshaffer/oauth2-server-php",
|
||||
@@ -48,7 +47,7 @@
|
||||
"oauth",
|
||||
"oauth2"
|
||||
],
|
||||
"time": "2013-08-12 16:35:58"
|
||||
"time": "2013-08-12T16:35:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "chumper/zipper",
|
||||
@@ -108,7 +107,7 @@
|
||||
"laravel",
|
||||
"zip"
|
||||
],
|
||||
"time": "2017-07-17 08:05:10"
|
||||
"time": "2017-07-17T08:05:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "colosa/MichelangeloFE",
|
||||
@@ -127,7 +126,7 @@
|
||||
"keywords": [
|
||||
"js app ProcessMaker"
|
||||
],
|
||||
"time": "2019-08-01 12:24:57"
|
||||
"time": "2019-08-01T12:24:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "colosa/pmDynaform",
|
||||
@@ -143,7 +142,7 @@
|
||||
"keywords": [
|
||||
"js lib ProcessMaker Dynaforms"
|
||||
],
|
||||
"time": "2019-07-29 16:58:17"
|
||||
"time": "2019-07-29T16:58:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "colosa/pmUI",
|
||||
@@ -159,7 +158,7 @@
|
||||
"keywords": [
|
||||
"js lib ProcessMaker UI"
|
||||
],
|
||||
"time": "2019-04-26 14:15:30"
|
||||
"time": "2019-04-26T14:15:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dapphp/securimage",
|
||||
@@ -208,7 +207,7 @@
|
||||
"captcha",
|
||||
"security"
|
||||
],
|
||||
"time": "2018-03-09 06:07:41"
|
||||
"time": "2018-03-09T06:07:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dnoegel/php-xdg-base-dir",
|
||||
@@ -241,7 +240,7 @@
|
||||
"MIT"
|
||||
],
|
||||
"description": "implementation of xdg base directory specification for php",
|
||||
"time": "2014-10-24 07:27:01"
|
||||
"time": "2014-10-24T07:27:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/inflector",
|
||||
@@ -308,7 +307,7 @@
|
||||
"singularize",
|
||||
"string"
|
||||
],
|
||||
"time": "2018-01-09 20:05:19"
|
||||
"time": "2018-01-09T20:05:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
@@ -368,7 +367,7 @@
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2019-06-08 11:03:04"
|
||||
"time": "2019-06-08T11:03:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
@@ -422,7 +421,7 @@
|
||||
"cron",
|
||||
"schedule"
|
||||
],
|
||||
"time": "2019-03-31 00:38:28"
|
||||
"time": "2019-03-31T00:38:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "egulias/email-validator",
|
||||
@@ -480,7 +479,7 @@
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2019-07-19 20:52:08"
|
||||
"time": "2019-07-19T20:52:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
@@ -526,7 +525,7 @@
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"time": "2019-03-17 18:48:37"
|
||||
"time": "2019-03-17T18:48:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "geshi/geshi",
|
||||
@@ -566,7 +565,7 @@
|
||||
],
|
||||
"description": "Generic Syntax Highlighter",
|
||||
"homepage": "http://qbnz.com/highlighter/",
|
||||
"time": "2018-10-01 23:49:06"
|
||||
"time": "2018-10-01T23:49:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "google/apiclient",
|
||||
@@ -609,7 +608,7 @@
|
||||
"keywords": [
|
||||
"google"
|
||||
],
|
||||
"time": "2015-10-16 22:11:08"
|
||||
"time": "2015-10-16T22:11:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
@@ -674,7 +673,7 @@
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2018-04-22 15:46:56"
|
||||
"time": "2018-04-22T15:46:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
@@ -725,7 +724,7 @@
|
||||
"keywords": [
|
||||
"promise"
|
||||
],
|
||||
"time": "2016-12-20 10:07:11"
|
||||
"time": "2016-12-20T10:07:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
@@ -796,7 +795,7 @@
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2019-07-01 23:21:34"
|
||||
"time": "2019-07-01T23:21:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-console-color",
|
||||
@@ -838,7 +837,7 @@
|
||||
"email": "jakub.onderka@gmail.com"
|
||||
}
|
||||
],
|
||||
"time": "2018-09-29 17:23:10"
|
||||
"time": "2018-09-29T17:23:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jakub-onderka/php-console-highlighter",
|
||||
@@ -884,7 +883,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Highlight PHP code in terminal",
|
||||
"time": "2018-09-29 18:48:56"
|
||||
"time": "2018-09-29T18:48:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kylekatarnls/update-helper",
|
||||
@@ -929,7 +928,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Update helper",
|
||||
"time": "2019-07-29 11:03:54"
|
||||
"time": "2019-07-29T11:03:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
@@ -1075,7 +1074,7 @@
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2019-02-26 15:41:34"
|
||||
"time": "2019-02-26T15:41:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/nexmo-notification-channel",
|
||||
@@ -1132,7 +1131,7 @@
|
||||
"nexmo",
|
||||
"notifications"
|
||||
],
|
||||
"time": "2018-12-04 12:57:08"
|
||||
"time": "2018-12-04T12:57:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/slack-notification-channel",
|
||||
@@ -1189,7 +1188,7 @@
|
||||
"notifications",
|
||||
"slack"
|
||||
],
|
||||
"time": "2018-12-12 13:12:06"
|
||||
"time": "2018-12-12T13:12:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/tinker",
|
||||
@@ -1252,7 +1251,7 @@
|
||||
"laravel",
|
||||
"psysh"
|
||||
],
|
||||
"time": "2019-07-29 18:09:25"
|
||||
"time": "2019-07-29T18:09:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "lcobucci/jwt",
|
||||
@@ -1307,7 +1306,7 @@
|
||||
"JWS",
|
||||
"jwt"
|
||||
],
|
||||
"time": "2019-05-24 18:30:49"
|
||||
"time": "2019-05-24T18:30:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
@@ -1391,7 +1390,7 @@
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2019-06-18 20:09:29"
|
||||
"time": "2019-06-18T20:09:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "libchart/libchart",
|
||||
@@ -1437,7 +1436,7 @@
|
||||
"line charts",
|
||||
"pie charts"
|
||||
],
|
||||
"time": "2013-10-19 22:21:30"
|
||||
"time": "2013-10-19T22:21:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "luracast/restler",
|
||||
@@ -1516,7 +1515,7 @@
|
||||
"rest",
|
||||
"server"
|
||||
],
|
||||
"time": "2019-05-12 15:05:48"
|
||||
"time": "2019-05-12T15:05:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
@@ -1594,7 +1593,7 @@
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2016-04-12 18:29:35"
|
||||
"time": "2016-04-12T18:29:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
@@ -1655,7 +1654,7 @@
|
||||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2019-06-11 09:07:59"
|
||||
"time": "2019-06-11T09:07:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nexmo/client",
|
||||
@@ -1703,7 +1702,7 @@
|
||||
}
|
||||
],
|
||||
"description": "PHP Client for using Nexmo's API.",
|
||||
"time": "2019-05-13 20:27:43"
|
||||
"time": "2019-05-13T20:27:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@@ -1754,7 +1753,7 @@
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2018-02-28 20:30:58"
|
||||
"time": "2018-02-28T20:30:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
@@ -1815,7 +1814,7 @@
|
||||
"serialization",
|
||||
"serialize"
|
||||
],
|
||||
"time": "2019-07-09 21:58:11"
|
||||
"time": "2019-07-09T21:58:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
@@ -1860,7 +1859,7 @@
|
||||
"pseudorandom",
|
||||
"random"
|
||||
],
|
||||
"time": "2018-07-02 15:55:56"
|
||||
"time": "2018-07-02T15:55:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pdepend/pdepend",
|
||||
@@ -1900,7 +1899,7 @@
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "Official version of pdepend to be handled with Composer",
|
||||
"time": "2017-12-13 13:21:38"
|
||||
"time": "2017-12-13T13:21:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pear/archive_tar",
|
||||
@@ -1966,7 +1965,7 @@
|
||||
"archive",
|
||||
"tar"
|
||||
],
|
||||
"time": "2019-04-08 13:15:55"
|
||||
"time": "2019-04-08T13:15:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pear/console_getopt",
|
||||
@@ -2013,7 +2012,7 @@
|
||||
}
|
||||
],
|
||||
"description": "More info available on: http://pear.php.net/package/Console_Getopt",
|
||||
"time": "2019-02-06 16:52:33"
|
||||
"time": "2019-02-06T16:52:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pear/pear-core-minimal",
|
||||
@@ -2057,7 +2056,7 @@
|
||||
}
|
||||
],
|
||||
"description": "Minimal set of PEAR core files to be used as composer dependency",
|
||||
"time": "2019-03-13 18:15:44"
|
||||
"time": "2019-03-13T18:15:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pear/pear_exception",
|
||||
@@ -2112,7 +2111,7 @@
|
||||
"keywords": [
|
||||
"exception"
|
||||
],
|
||||
"time": "2015-02-10 20:07:52"
|
||||
"time": "2015-02-10T20:07:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-http/guzzle6-adapter",
|
||||
@@ -2172,7 +2171,7 @@
|
||||
"Guzzle",
|
||||
"http"
|
||||
],
|
||||
"time": "2016-05-10 06:13:32"
|
||||
"time": "2016-05-10T06:13:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-http/httplug",
|
||||
@@ -2228,7 +2227,7 @@
|
||||
"client",
|
||||
"http"
|
||||
],
|
||||
"time": "2016-08-31 08:30:17"
|
||||
"time": "2016-08-31T08:30:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-http/promise",
|
||||
@@ -2278,7 +2277,7 @@
|
||||
"keywords": [
|
||||
"promise"
|
||||
],
|
||||
"time": "2016-01-26 13:27:02"
|
||||
"time": "2016-01-26T13:27:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-imap/php-imap",
|
||||
@@ -2331,7 +2330,7 @@
|
||||
"pop3",
|
||||
"receive emails"
|
||||
],
|
||||
"time": "2019-07-23 09:25:42"
|
||||
"time": "2019-07-23T09:25:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
@@ -2408,7 +2407,7 @@
|
||||
}
|
||||
],
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"time": "2018-11-15 22:32:31"
|
||||
"time": "2018-11-15T22:32:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
@@ -2457,7 +2456,7 @@
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"time": "2017-02-14 16:28:37"
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-factory",
|
||||
@@ -2509,7 +2508,7 @@
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"time": "2019-04-30 12:38:16"
|
||||
"time": "2019-04-30T12:38:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
@@ -2559,7 +2558,7 @@
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"time": "2016-08-06 14:39:51"
|
||||
"time": "2016-08-06T14:39:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@@ -2597,7 +2596,7 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2012-12-21 11:40:51"
|
||||
"time": "2012-12-21T11:40:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/simple-cache",
|
||||
@@ -2645,7 +2644,7 @@
|
||||
"psr-16",
|
||||
"simple-cache"
|
||||
],
|
||||
"time": "2017-10-23 01:57:42"
|
||||
"time": "2017-10-23T01:57:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psy/psysh",
|
||||
@@ -2719,7 +2718,7 @@
|
||||
"interactive",
|
||||
"shell"
|
||||
],
|
||||
"time": "2018-10-13 15:16:03"
|
||||
"time": "2018-10-13T15:16:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
@@ -2759,7 +2758,7 @@
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"time": "2016-02-11 07:05:27"
|
||||
"time": "2016-02-11T07:05:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
@@ -2841,20 +2840,20 @@
|
||||
"identifier",
|
||||
"uuid"
|
||||
],
|
||||
"time": "2018-07-19 23:38:55"
|
||||
"time": "2018-07-19T23:38:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
"version": "v2.6.30",
|
||||
"version": "v2.6.31",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-php/smarty.git",
|
||||
"reference": "c5c9d6514ceaf15fe35345886668726829560f93"
|
||||
"reference": "4ab9757b492f08a38f68123a6e7c1df7110bbc49"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/c5c9d6514ceaf15fe35345886668726829560f93",
|
||||
"reference": "c5c9d6514ceaf15fe35345886668726829560f93",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/4ab9757b492f08a38f68123a6e7c1df7110bbc49",
|
||||
"reference": "4ab9757b492f08a38f68123a6e7c1df7110bbc49",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2892,7 +2891,7 @@
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2016-07-19 18:31:12"
|
||||
"time": "2017-11-03T06:39:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "swiftmailer/swiftmailer",
|
||||
@@ -2954,7 +2953,7 @@
|
||||
"mail",
|
||||
"mailer"
|
||||
],
|
||||
"time": "2019-04-21 09:21:45"
|
||||
"time": "2019-04-21T09:21:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
@@ -3018,7 +3017,7 @@
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-18 10:34:59"
|
||||
"time": "2019-07-18T10:34:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
@@ -3093,7 +3092,7 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-24 17:13:59"
|
||||
"time": "2019-07-24T17:13:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
@@ -3146,7 +3145,7 @@
|
||||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-01-16 09:39:14"
|
||||
"time": "2019-01-16T09:39:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
@@ -3202,7 +3201,7 @@
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-23 11:21:36"
|
||||
"time": "2019-07-23T11:21:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
@@ -3275,7 +3274,7 @@
|
||||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-26 07:03:43"
|
||||
"time": "2019-07-26T07:03:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
@@ -3345,7 +3344,7 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-06-27 06:42:14"
|
||||
"time": "2019-06-27T06:42:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher-contracts",
|
||||
@@ -3403,7 +3402,7 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-06-20 06:46:26"
|
||||
"time": "2019-06-20T06:46:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
@@ -3453,7 +3452,7 @@
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-06-23 08:51:25"
|
||||
"time": "2019-06-23T08:51:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
@@ -3502,7 +3501,7 @@
|
||||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-06-28 13:16:30"
|
||||
"time": "2019-06-28T13:16:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
@@ -3557,7 +3556,7 @@
|
||||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-23 11:21:36"
|
||||
"time": "2019-07-23T11:21:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
@@ -3649,7 +3648,7 @@
|
||||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-28 07:10:23"
|
||||
"time": "2019-07-28T07:10:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
@@ -3708,7 +3707,7 @@
|
||||
"mime",
|
||||
"mime-type"
|
||||
],
|
||||
"time": "2019-07-19 16:21:19"
|
||||
"time": "2019-07-19T16:21:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@@ -3766,7 +3765,7 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2019-02-06 07:57:58"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-iconv",
|
||||
@@ -3825,7 +3824,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-06 07:57:58"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
@@ -3887,7 +3886,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-03-04 13:44:35"
|
||||
"time": "2019-03-04T13:44:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
@@ -3946,7 +3945,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-06 07:57:58"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
@@ -4001,7 +4000,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-06 07:57:58"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
@@ -4059,7 +4058,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-02-06 07:57:58"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
@@ -4108,7 +4107,7 @@
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-05-30 16:10:05"
|
||||
"time": "2019-05-30T16:10:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
@@ -4184,7 +4183,7 @@
|
||||
"uri",
|
||||
"url"
|
||||
],
|
||||
"time": "2019-07-23 14:43:56"
|
||||
"time": "2019-07-23T14:43:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
@@ -4242,7 +4241,7 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-06-13 11:15:36"
|
||||
"time": "2019-06-13T11:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
@@ -4318,7 +4317,7 @@
|
||||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-18 10:34:59"
|
||||
"time": "2019-07-18T10:34:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
@@ -4375,7 +4374,7 @@
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-06-13 11:15:36"
|
||||
"time": "2019-06-13T11:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
@@ -4451,7 +4450,7 @@
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2019-07-27 06:42:46"
|
||||
"time": "2019-07-27T06:42:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tijsverkoyen/css-to-inline-styles",
|
||||
@@ -4498,7 +4497,7 @@
|
||||
],
|
||||
"description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.",
|
||||
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
|
||||
"time": "2017-11-27 11:13:29"
|
||||
"time": "2017-11-27T11:13:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "typo3/class-alias-loader",
|
||||
@@ -4556,7 +4555,7 @@
|
||||
"classloader",
|
||||
"composer"
|
||||
],
|
||||
"time": "2018-10-03 12:49:56"
|
||||
"time": "2018-10-03T12:49:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
@@ -4607,7 +4606,7 @@
|
||||
"env",
|
||||
"environment"
|
||||
],
|
||||
"time": "2019-01-29 11:11:52"
|
||||
"time": "2019-01-29T11:11:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zendframework/zend-diactoros",
|
||||
@@ -4673,7 +4672,7 @@
|
||||
"psr",
|
||||
"psr-7"
|
||||
],
|
||||
"time": "2019-07-10 16:13:25"
|
||||
"time": "2019-07-10T16:13:25+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -4753,7 +4752,7 @@
|
||||
"symfony",
|
||||
"testing"
|
||||
],
|
||||
"time": "2018-08-10 18:56:51"
|
||||
"time": "2018-08-10T18:56:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/gherkin",
|
||||
@@ -4812,7 +4811,7 @@
|
||||
"gherkin",
|
||||
"parser"
|
||||
],
|
||||
"time": "2019-01-16 14:22:17"
|
||||
"time": "2019-01-16T14:22:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/mink",
|
||||
@@ -4870,7 +4869,7 @@
|
||||
"testing",
|
||||
"web"
|
||||
],
|
||||
"time": "2016-03-05 08:26:18"
|
||||
"time": "2016-03-05T08:26:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/mink-selenium2-driver",
|
||||
@@ -4931,7 +4930,7 @@
|
||||
"testing",
|
||||
"webdriver"
|
||||
],
|
||||
"time": "2016-03-05 09:10:18"
|
||||
"time": "2016-03-05T09:10:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "behat/transliterator",
|
||||
@@ -4975,7 +4974,7 @@
|
||||
"slug",
|
||||
"transliterator"
|
||||
],
|
||||
"time": "2017-04-04 11:38:05"
|
||||
"time": "2017-04-04T11:38:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "container-interop/container-interop",
|
||||
@@ -5006,7 +5005,8 @@
|
||||
],
|
||||
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
|
||||
"homepage": "https://github.com/container-interop/container-interop",
|
||||
"time": "2017-02-14 19:40:03"
|
||||
"abandoned": "psr/container",
|
||||
"time": "2017-02-14T19:40:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
@@ -5062,7 +5062,7 @@
|
||||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2019-03-17 17:37:11"
|
||||
"time": "2019-03-17T17:37:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
@@ -5122,7 +5122,7 @@
|
||||
"whoops",
|
||||
"zf2"
|
||||
],
|
||||
"time": "2017-02-18 14:22:27"
|
||||
"time": "2017-02-18T14:22:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fzaninotto/faker",
|
||||
@@ -5172,7 +5172,7 @@
|
||||
"faker",
|
||||
"fixtures"
|
||||
],
|
||||
"time": "2018-07-12 10:23:15"
|
||||
"time": "2018-07-12T10:23:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "instaclick/php-webdriver",
|
||||
@@ -5231,7 +5231,7 @@
|
||||
"webdriver",
|
||||
"webtest"
|
||||
],
|
||||
"time": "2017-06-30 04:02:48"
|
||||
"time": "2017-06-30T04:02:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
@@ -5279,7 +5279,7 @@
|
||||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"time": "2019-04-07 13:18:21"
|
||||
"time": "2019-04-07T13:18:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
@@ -5333,7 +5333,7 @@
|
||||
"reflection",
|
||||
"static analysis"
|
||||
],
|
||||
"time": "2017-09-11 18:02:19"
|
||||
"time": "2017-09-11T18:02:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
@@ -5384,7 +5384,7 @@
|
||||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2019-04-30 17:48:53"
|
||||
"time": "2019-04-30T17:48:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
@@ -5431,7 +5431,7 @@
|
||||
"email": "me@mikevanriel.com"
|
||||
}
|
||||
],
|
||||
"time": "2017-07-14 14:27:02"
|
||||
"time": "2017-07-14T14:27:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
@@ -5494,7 +5494,7 @@
|
||||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2019-06-13 12:50:23"
|
||||
"time": "2019-06-13T12:50:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@@ -5557,7 +5557,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2017-04-02 07:44:40"
|
||||
"time": "2017-04-02T07:44:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@@ -5604,7 +5604,7 @@
|
||||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2017-11-27 13:52:08"
|
||||
"time": "2017-11-27T13:52:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
@@ -5645,7 +5645,7 @@
|
||||
"keywords": [
|
||||
"template"
|
||||
],
|
||||
"time": "2015-06-21 13:50:34"
|
||||
"time": "2015-06-21T13:50:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
@@ -5694,7 +5694,7 @@
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2017-02-26 11:10:40"
|
||||
"time": "2017-02-26T11:10:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
@@ -5743,7 +5743,7 @@
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2017-11-27 05:48:46"
|
||||
"time": "2017-11-27T05:48:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
@@ -5825,7 +5825,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2018-02-01 05:50:59"
|
||||
"time": "2018-02-01T05:50:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
@@ -5885,7 +5885,7 @@
|
||||
"xunit"
|
||||
],
|
||||
"abandoned": true,
|
||||
"time": "2017-06-30 09:13:00"
|
||||
"time": "2017-06-30T09:13:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
@@ -5930,7 +5930,7 @@
|
||||
],
|
||||
"description": "Looks up which function or method a line of code belongs to",
|
||||
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
|
||||
"time": "2017-03-04 06:30:41"
|
||||
"time": "2017-03-04T06:30:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
@@ -5994,7 +5994,7 @@
|
||||
"compare",
|
||||
"equality"
|
||||
],
|
||||
"time": "2017-01-29 09:50:25"
|
||||
"time": "2017-01-29T09:50:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
@@ -6046,7 +6046,7 @@
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"time": "2017-05-22 07:24:03"
|
||||
"time": "2017-05-22T07:24:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
@@ -6096,7 +6096,7 @@
|
||||
"environment",
|
||||
"hhvm"
|
||||
],
|
||||
"time": "2016-11-26 07:53:53"
|
||||
"time": "2016-11-26T07:53:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
@@ -6163,7 +6163,7 @@
|
||||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2016-11-19 08:54:04"
|
||||
"time": "2016-11-19T08:54:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
@@ -6214,7 +6214,7 @@
|
||||
"keywords": [
|
||||
"global state"
|
||||
],
|
||||
"time": "2015-10-12 03:26:01"
|
||||
"time": "2015-10-12T03:26:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/object-enumerator",
|
||||
@@ -6260,7 +6260,7 @@
|
||||
],
|
||||
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
|
||||
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
|
||||
"time": "2017-02-18 15:18:39"
|
||||
"time": "2017-02-18T15:18:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
@@ -6313,7 +6313,7 @@
|
||||
],
|
||||
"description": "Provides functionality to recursively process PHP variables",
|
||||
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
|
||||
"time": "2016-11-19 07:33:16"
|
||||
"time": "2016-11-19T07:33:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/resource-operations",
|
||||
@@ -6355,7 +6355,7 @@
|
||||
],
|
||||
"description": "Provides a list of PHP built-in functions that operate on resources",
|
||||
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
|
||||
"time": "2015-07-28 20:34:47"
|
||||
"time": "2015-07-28T20:34:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
@@ -6398,7 +6398,7 @@
|
||||
],
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2016-10-03 07:35:21"
|
||||
"time": "2016-10-03T07:35:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
@@ -6449,7 +6449,7 @@
|
||||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-04-10 23:49:02"
|
||||
"time": "2019-04-10T23:49:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/class-loader",
|
||||
@@ -6505,7 +6505,7 @@
|
||||
],
|
||||
"description": "Symfony ClassLoader Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-01-16 09:39:14"
|
||||
"time": "2019-01-16T09:39:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
@@ -6564,7 +6564,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-07-24 14:47:54"
|
||||
"time": "2019-07-24T14:47:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
@@ -6615,7 +6615,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2018-12-25 11:19:39"
|
||||
"time": "2018-12-25T11:19:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wimg/php-compatibility",
|
||||
@@ -6674,7 +6674,7 @@
|
||||
"standards"
|
||||
],
|
||||
"abandoned": "phpcompatibility/php-compatibility",
|
||||
"time": "2019-06-27 19:58:56"
|
||||
"time": "2019-06-27T19:58:56+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -38,7 +38,7 @@ return [
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'strict' => true,
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => null,
|
||||
]
|
||||
],
|
||||
|
||||
@@ -82,6 +82,11 @@ workflow/engine/methods/setup/webServices.php
|
||||
workflow/engine/methods/setup/webServicesAjax.php
|
||||
workflow/engine/methods/setup/webServicesList.php
|
||||
workflow/engine/methods/users/data_usersList.php
|
||||
workflow/engine/plugins/charts.php
|
||||
workflow/engine/plugins/charts/class.charts.php
|
||||
workflow/engine/plugins/charts/config/setup.conf
|
||||
workflow/engine/plugins/charts/genericCharts.php
|
||||
workflow/engine/plugins/charts/setupPage.xml
|
||||
workflow/engine/plugins/openFlash.php
|
||||
workflow/engine/plugins/openFlash/chart-data.php
|
||||
workflow/engine/plugins/openFlash/chart.php
|
||||
@@ -103,6 +108,8 @@ workflow/engine/plugins/pmosCommunity/open_flash_chart_object.php
|
||||
workflow/engine/plugins/pmosCommunity/public_html/open-flash-chart.swf
|
||||
workflow/engine/plugins/pmosCommunity/public_html/swfobject.js
|
||||
workflow/engine/plugins/pmosCommunity/setupPage.xml
|
||||
workflow/engine/plugins/processTemplate.php
|
||||
workflow/engine/plugins/processTemplate/class.processTemplate.php
|
||||
workflow/engine/skinEngine/base/images/updating/page_background.png
|
||||
workflow/engine/skinEngine/neoclassic/images/updating/page_background.png
|
||||
workflow/engine/src/ProcessMaker/Services/Api/Test2.php
|
||||
@@ -122,4 +129,4 @@ workflow/engine/xmlform/cases/cases_ReassignBy.xml
|
||||
workflow/engine/xmlform/users/users_List.xml
|
||||
workflow/engine/xmlform/users/users_Options.xml
|
||||
workflow/public_html/skins/JSForms.js
|
||||
workflow/public_html/skins/ajax.js
|
||||
workflow/public_html/skins/ajax.js
|
||||
@@ -1,28 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* defaultAjax.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
/*NEXT LINE: Runs any configuration defined to be executed before dependent fields recalc*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
@@ -30,8 +6,6 @@ if (isset($_SESSION['CURRENT_PAGE_INITILIZATION'])) {
|
||||
eval($_SESSION['CURRENT_PAGE_INITILIZATION']);
|
||||
}
|
||||
|
||||
|
||||
// $json=new Services_JSON();
|
||||
if (!defined('XMLFORM_AJAX_PATH')) {
|
||||
define('XMLFORM_AJAX_PATH', PATH_XMLFORM);
|
||||
}
|
||||
@@ -63,11 +37,11 @@ $G_FORM->values = isset($_SESSION[$G_FORM->id]) ? $_SESSION[$G_FORM->id] : array
|
||||
$newValues = (Bootstrap::json_decode(urlDecode(stripslashes($_POST['fields']))));
|
||||
|
||||
if (isset($_POST['grid'])) {
|
||||
$_POST['row'] = (int)$_POST['row'];
|
||||
$_POST['row'] = (int) $_POST['row'];
|
||||
$aAux = array();
|
||||
|
||||
foreach ($newValues as $sKey => $newValue) {
|
||||
$newValue = (array)$newValue;
|
||||
$newValue = (array) $newValue;
|
||||
$aKeys = array_keys($newValue);
|
||||
if (count($aKeys) > 0) {
|
||||
$aValues = array();
|
||||
@@ -88,7 +62,7 @@ if (count($newValues) > 1 && isset($_POST['grid'])) {
|
||||
for ($r2 = 1; $r2 <= $_POST['row']; $r2++) {
|
||||
foreach ($values as $class => $value) {
|
||||
if ($class == $_POST['grid']) {
|
||||
$value = (array)$value;
|
||||
$value = (array) $value;
|
||||
$arrayK = $value[$r2];
|
||||
foreach ($arrayK as $key2 => $val) {
|
||||
$fieldBase[$r2][$key2] = is_array($val) ? $val[$key2] : $val;
|
||||
@@ -107,7 +81,7 @@ if (count($newValues) > 1 && isset($_POST['grid'])) {
|
||||
$dependentFields = array();
|
||||
$aux = array();
|
||||
for ($r = 0; $r < count($newValues); $r++) {
|
||||
$newValues[$r] = (array)$newValues[$r];
|
||||
$newValues[$r] = (array) $newValues[$r];
|
||||
$G_FORM->setValues($newValues[$r]);
|
||||
//Search dependent fields
|
||||
foreach ($newValues[$r] as $k => $v) {
|
||||
@@ -117,7 +91,11 @@ for ($r = 0; $r < count($newValues); $r++) {
|
||||
} else {
|
||||
foreach ($v[$_POST['row']] as $k1 => $v1) {
|
||||
$myDependentFields = subDependencies($k1, $G_FORM, $aux, $_POST['grid']);
|
||||
$_SESSION[$G_FORM->id][$_POST['grid']][$_POST['row']][$k1] = $v1;
|
||||
$_SESSION[$G_FORM->id][$_POST['grid']] = [
|
||||
$_POST['row'] => [
|
||||
$k1 => $v1
|
||||
]
|
||||
];
|
||||
$G_FORM->values[$_POST['grid']][$_POST['row']][$k1] = $v1;
|
||||
}
|
||||
}
|
||||
@@ -142,12 +120,12 @@ $G_FORM->values = $newForm;
|
||||
$arrayFieldSubDependent = array();
|
||||
|
||||
if (isset($_POST["grid"])) {
|
||||
$arrayField = (array)(Bootstrap::json_decode(urlDecode(stripslashes($_POST["fields"]))));
|
||||
$arrayField = (array) (Bootstrap::json_decode(urlDecode(stripslashes($_POST["fields"]))));
|
||||
$arrayDependentField = array();
|
||||
$ereg = null;
|
||||
|
||||
foreach ($arrayField as $fieldData) {
|
||||
$arrayAux = (array)($fieldData);
|
||||
$arrayAux = (array) ($fieldData);
|
||||
|
||||
foreach ($arrayAux as $index => $value) {
|
||||
$ereg = $ereg . (($ereg != null) ? "|" : null) . $index; //Concatenate field
|
||||
@@ -185,7 +163,7 @@ if (isset($_POST["grid"])) {
|
||||
//Completed all fields of the grid
|
||||
if (isset($_POST["grid"]) && isset($_POST["gridField"])) {
|
||||
//Completed all fields of the grid
|
||||
$arrayGridField = (array)(Bootstrap::json_decode(urldecode(stripslashes($_POST["gridField"]))));
|
||||
$arrayGridField = (array) (Bootstrap::json_decode(urldecode(stripslashes($_POST["gridField"]))));
|
||||
|
||||
foreach ($arrayGridField as $index => $value) {
|
||||
$G_FORM->values[$_POST["grid"]][$_POST["row"]][$index] = $value;
|
||||
|
||||
@@ -87,7 +87,9 @@ class CodeScanner
|
||||
|
||||
if (file_exists($fileDisabledCode)) {
|
||||
$arrayAux = array_filter(array_map("trim", file($fileDisabledCode, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)));
|
||||
$arrayAux = array_filter($arrayAux, create_function("\$line", "return !preg_match(\"/^;.*\$/\", \$line);"));
|
||||
$arrayAux = array_filter($arrayAux, function ($line) {
|
||||
return !preg_match("/^;.*\$/", $line);
|
||||
});
|
||||
|
||||
$this->arrayDisabledCode = array_unique(array_merge($this->arrayDisabledCode, $arrayAux));
|
||||
}
|
||||
|
||||
@@ -77,12 +77,13 @@ class Controller
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
$message = 'Undefined property via __get(): ' . $name . ' in ';
|
||||
if (array_key_exists($name, $this->__data__)) {
|
||||
return $this->__data__[$name];
|
||||
}
|
||||
|
||||
$trace = debug_backtrace();
|
||||
trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
|
||||
trigger_error($message . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -177,8 +178,8 @@ class Controller
|
||||
$this->__request__ = new stdclass();
|
||||
}
|
||||
if (is_array($data)) {
|
||||
while ($var = each($data)) {
|
||||
$this->__request__->{$var['key']} = $var['value'];
|
||||
foreach ($data as $key => $value) {
|
||||
$this->__request__->{$key} = $value;
|
||||
}
|
||||
} else {
|
||||
$this->__request__ = $data;
|
||||
|
||||
@@ -360,7 +360,7 @@ class Form extends XmlForm
|
||||
|
||||
//Execute just if a query was set, it should be not empty
|
||||
if (trim($query) == "") {
|
||||
continue; //if it is empty string skip it
|
||||
break; //if it is empty string skip it
|
||||
}
|
||||
|
||||
//We do the query to the external connection and we've got the label
|
||||
@@ -438,7 +438,7 @@ class Form extends XmlForm
|
||||
|
||||
// execute just if a query was set, it should be not empty
|
||||
if (trim( $query ) == '') {
|
||||
continue; //if it is empty string skip it
|
||||
break; //if it is empty string skip it
|
||||
}
|
||||
|
||||
//we do the query to the external connection and we've got the label
|
||||
@@ -491,7 +491,7 @@ class Form extends XmlForm
|
||||
//Execute just if a query was set, it should be not empty
|
||||
if (trim( $query ) == "") {
|
||||
//if it is empty string skip it
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$rs = $stmt->executeQuery( ResultSet::FETCHMODE_NUM );
|
||||
|
||||
@@ -758,7 +758,7 @@ class headPublisher
|
||||
$sjson = $oServerConf->getProperty($keyState);
|
||||
if ($sjson !== "") {
|
||||
$json = G::json_decode($sjson);
|
||||
if ((is_array($json) || is_object($json)) && sizeof($json)){
|
||||
if (is_iterable($json)) {
|
||||
foreach ($json as $key => $value) {
|
||||
$views[$key] = $value;
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ class HttpProxyController
|
||||
public function setHttpRequestData($data)
|
||||
{
|
||||
if (is_array($data)) {
|
||||
while ($var = each($data)) {
|
||||
$this->__request__->{$var['key']} = $var['value'];
|
||||
foreach ($data as $key => $value) {
|
||||
$this->__request__->{$key} = $value;
|
||||
}
|
||||
} else {
|
||||
$this->__request__ = $data;
|
||||
|
||||
@@ -48,7 +48,7 @@ class Menu
|
||||
{
|
||||
|
||||
public $Id = null;
|
||||
public $Options = null;
|
||||
public $Options = [];
|
||||
public $Labels = null;
|
||||
public $Icons = null;
|
||||
public $JS = null;
|
||||
|
||||
@@ -876,6 +876,8 @@ EOREGEX;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$shouldItContinue = false;
|
||||
switch ($upper) {
|
||||
case 'AS':
|
||||
$token_count ++;
|
||||
@@ -886,7 +888,7 @@ EOREGEX;
|
||||
++ $n;
|
||||
}
|
||||
|
||||
continue;
|
||||
$shouldItContinue = true;
|
||||
break;
|
||||
case 'INDEX':
|
||||
if ($token_category == 'CREATE') {
|
||||
@@ -908,12 +910,12 @@ EOREGEX;
|
||||
case 'OUTER':
|
||||
# $expression .= $token;
|
||||
$token_count ++;
|
||||
continue;
|
||||
$shouldItContinue = true;
|
||||
break;
|
||||
case 'FOR':
|
||||
$token_count ++;
|
||||
$skip_next = true;
|
||||
continue;
|
||||
$shouldItContinue = true;
|
||||
break;
|
||||
case 'LEFT':
|
||||
case 'RIGHT':
|
||||
@@ -969,7 +971,8 @@ EOREGEX;
|
||||
break;
|
||||
default:
|
||||
if ($token === false || empty( $token ) || $token === "") {
|
||||
continue;
|
||||
$shouldItContinue = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($token_count == 0) {
|
||||
@@ -982,6 +985,9 @@ EOREGEX;
|
||||
$token_count ++;
|
||||
break;
|
||||
}
|
||||
if ($shouldItContinue === true) {
|
||||
continue;
|
||||
}
|
||||
++ $i;
|
||||
}
|
||||
if (substr( trim( $table ), 0, 1 ) == '(') {
|
||||
|
||||
@@ -211,6 +211,24 @@ class RBAC
|
||||
'showDynaformListHistory' => ['PM_CASES'],
|
||||
'dynaformChangeLogViewHistory' => ['PM_CASES'],
|
||||
'historyDynaformGridPreview' => ['PM_CASES'],
|
||||
],
|
||||
'usersAjax.php' => [
|
||||
'countryList' => ['PM_LOGIN'],
|
||||
'stateList' => ['PM_LOGIN'],
|
||||
'locationList' => ['PM_LOGIN'],
|
||||
'usersList' => ['PM_USERS,PM_EDIT_USER_PROFILE_REPLACED_BY'],
|
||||
'availableCalendars' => ['PM_LOGIN'],
|
||||
'rolesList' => ['PM_LOGIN'],
|
||||
'getUserLogedRole' => ['PM_USERS,PM_EDIT_USER_PROFILE_PASSWORD'],
|
||||
'languagesList' => ['PM_LOGIN'],
|
||||
'saveUser' => [], // This action is validated with custom logic in the same page
|
||||
'savePersonalInfo' => [], // This action is validated with custom logic in the same page
|
||||
'userData' => [], // This action is validated with custom logic in the same page
|
||||
'defaultMainMenuOptionList' => ['PM_LOGIN'],
|
||||
'defaultCasesMenuOptionList' => ['PM_LOGIN'],
|
||||
'testPassword' => ['PM_USERS,PM_EDIT_USER_PROFILE_PASSWORD'],
|
||||
'testUsername' => ['PM_USERS,PM_EDIT_USER_PROFILE_USERNAME'],
|
||||
'passwordValidate' => ['PM_USERS,PM_EDIT_USER_PROFILE_PASSWORD'],
|
||||
]
|
||||
];
|
||||
$this->aliasPermissions['PM_CASES'] = [self::PM_GUEST_CASE];
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
|
||||
<directory suffix=".php">./gulliver</directory>
|
||||
<directory suffix=".php">./workflow/engine/classes</directory>
|
||||
<directory suffix=".php">./workflow/engine/src</directory>
|
||||
</whitelist>
|
||||
|
||||
@@ -225,7 +225,7 @@ INSERT INTO `RBAC_SYSTEMS` VALUES
|
||||
('00000000000000000000000000000002','PROCESSMAKER','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
|
||||
|
||||
INSERT INTO `RBAC_USERS` VALUES
|
||||
('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator','','admin@processmaker.com','2020-01-01','2007-08-03 12:24:36','2008-02-13 07:24:07',1,'MYSQL','00000000000000000000000000000000','',''),
|
||||
('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator','','admin@processmaker.com',DATE_ADD(curdate(), INTERVAL 1 YEAR),'2007-08-03 12:24:36','2008-02-13 07:24:07',1,'MYSQL','00000000000000000000000000000000','',''),
|
||||
('00000000000000000000000000000002','guest','$2y$10$rasFC.VNv9TLStNtFVJu6OjxhCi6FezdwkLrBzTFwmXsNnfW0/YZm','Guest','','guest@processmaker.com','2030-01-01','2009-02-01 12:24:36','2009-02-01 12:24:36',0,'MYSQL','00000000000000000000000000000000','','');
|
||||
|
||||
INSERT INTO `RBAC_USERS_ROLES` VALUES
|
||||
|
||||
@@ -53,6 +53,8 @@ define('PATH_HTML', PATH_HOME . 'public_html/');
|
||||
define('PATH_SMARTY_C', PATH_TRUNK . '/shared/compiled/smarty/c');
|
||||
define('PATH_SMARTY_CACHE', PATH_TRUNK . '/shared/compiled/smarty/cache');
|
||||
define('PATH_THIRDPARTY', PATH_TRUNK . '/thirdparty/');
|
||||
define("URL_KEY", 'c0l0s40pt1mu59r1m3');
|
||||
define("PATH_XMLFORM", PATH_CORE . "xmlform" . PATH_SEP);
|
||||
|
||||
// Set Time Zone
|
||||
$_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int) (env('MAIN_SYSTEM_UTC_TIME_ZONE', 'workflow')) == 1;
|
||||
@@ -73,6 +75,7 @@ define("PATH_DATA_SITE", PATH_DATA . "sites/" . config("system.workspace") . "/"
|
||||
define("PATH_DYNAFORM", PATH_DATA_SITE . "xmlForms/");
|
||||
define("PATH_DATA_MAILTEMPLATES", PATH_DATA_SITE . "mailTemplates/");
|
||||
define("PATH_DATA_PUBLIC", PATH_DATA_SITE . "public/");
|
||||
define("PATH_CONTROLLERS", PATH_CORE . "controllers" . PATH_SEP);
|
||||
G::defineConstants();
|
||||
|
||||
/**
|
||||
|
||||
929
tests/resources/dynaformDataForRenewUids.json
Normal file
929
tests/resources/dynaformDataForRenewUids.json
Normal file
@@ -0,0 +1,929 @@
|
||||
{
|
||||
"process": {
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_TITLE": "test",
|
||||
"PRO_DESCRIPTION": "",
|
||||
"PRO_PARENT": "7084112395dfb826264eac2069406712",
|
||||
"PRO_TIME": "1",
|
||||
"PRO_TIMEUNIT": "DAYS",
|
||||
"PRO_STATUS": "ACTIVE",
|
||||
"PRO_STATUS_ID": "1",
|
||||
"PRO_TYPE_DAY": "",
|
||||
"PRO_TYPE": "NORMAL",
|
||||
"PRO_ASSIGNMENT": "FALSE",
|
||||
"PRO_SHOW_MAP": "0",
|
||||
"PRO_SHOW_MESSAGE": "0",
|
||||
"PRO_SUBPROCESS": "0",
|
||||
"PRO_TRI_CREATE": "",
|
||||
"PRO_TRI_OPEN": "",
|
||||
"PRO_TRI_DELETED": "",
|
||||
"PRO_TRI_CANCELED": "",
|
||||
"PRO_TRI_PAUSED": "",
|
||||
"PRO_TRI_REASSIGNED": "",
|
||||
"PRO_TRI_UNPAUSED": "",
|
||||
"PRO_TYPE_PROCESS": "PUBLIC",
|
||||
"PRO_SHOW_DELEGATE": "0",
|
||||
"PRO_SHOW_DYNAFORM": "0",
|
||||
"PRO_CATEGORY": "",
|
||||
"PRO_SUB_CATEGORY": "",
|
||||
"PRO_INDUSTRY": "0",
|
||||
"PRO_UPDATE_DATE": "2019-12-19 14:16:06",
|
||||
"PRO_CREATE_USER": "00000000000000000000000000000001",
|
||||
"PRO_HEIGHT": "5000",
|
||||
"PRO_WIDTH": "10000",
|
||||
"PRO_TITLE_X": "0",
|
||||
"PRO_TITLE_Y": "0",
|
||||
"PRO_DEBUG": "0",
|
||||
"PRO_DYNAFORMS": "a:1:{s:7:\"PROCESS\";s:0:\"\";}",
|
||||
"PRO_DERIVATION_SCREEN_TPL": "",
|
||||
"PRO_COST": "0",
|
||||
"PRO_UNIT_COST": "",
|
||||
"PRO_ITEE": "1",
|
||||
"PRO_ACTION_DONE": "a:1:{i:0;s:41:\"GATEWAYTOGATEWAY_DELETE_CORRUPTED_RECORDS\";}",
|
||||
"CATEGORY_ID": "0",
|
||||
"PRO_CATEGORY_LABEL": "No Category",
|
||||
"PRO_BPMN": "1"
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_ID": "0",
|
||||
"TAS_UID": "5978729975dfb8d7a264fa0070639752",
|
||||
"TAS_TITLE": "Task 1",
|
||||
"TAS_DESCRIPTION": "",
|
||||
"TAS_DEF_TITLE": "",
|
||||
"TAS_DEF_SUBJECT_MESSAGE": "",
|
||||
"TAS_DEF_PROC_CODE": "",
|
||||
"TAS_DEF_MESSAGE": "",
|
||||
"TAS_DEF_DESCRIPTION": "",
|
||||
"TAS_TYPE": "NORMAL",
|
||||
"TAS_DURATION": "1",
|
||||
"TAS_DELAY_TYPE": "",
|
||||
"TAS_TEMPORIZER": "0",
|
||||
"TAS_TYPE_DAY": "",
|
||||
"TAS_TIMEUNIT": "DAYS",
|
||||
"TAS_ALERT": "FALSE",
|
||||
"TAS_PRIORITY_VARIABLE": "",
|
||||
"TAS_ASSIGN_TYPE": "BALANCED",
|
||||
"TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"TAS_GROUP_VARIABLE": "",
|
||||
"TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE",
|
||||
"TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE",
|
||||
"TAS_ASSIGN_LOCATION": "FALSE",
|
||||
"TAS_ASSIGN_LOCATION_ADHOC": "FALSE",
|
||||
"TAS_TRANSFER_FLY": "FALSE",
|
||||
"TAS_LAST_ASSIGNED": "0",
|
||||
"TAS_USER": "0",
|
||||
"TAS_CAN_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE",
|
||||
"TAS_CAN_CANCEL": "FALSE",
|
||||
"TAS_OWNER_APP": "FALSE",
|
||||
"STG_UID": "",
|
||||
"TAS_CAN_PAUSE": "FALSE",
|
||||
"TAS_CAN_SEND_MESSAGE": "TRUE",
|
||||
"TAS_CAN_DELETE_DOCS": "FALSE",
|
||||
"TAS_SELF_SERVICE": "FALSE",
|
||||
"TAS_START": "TRUE",
|
||||
"TAS_TO_LAST_USER": "FALSE",
|
||||
"TAS_SEND_LAST_EMAIL": "FALSE",
|
||||
"TAS_DERIVATION": "NORMAL",
|
||||
"TAS_POSX": "143",
|
||||
"TAS_POSY": "82",
|
||||
"TAS_WIDTH": "110",
|
||||
"TAS_HEIGHT": "60",
|
||||
"TAS_COLOR": "",
|
||||
"TAS_EVN_UID": "",
|
||||
"TAS_BOUNDARY": "",
|
||||
"TAS_DERIVATION_SCREEN_TPL": "",
|
||||
"TAS_SELFSERVICE_TIMEOUT": "0",
|
||||
"TAS_SELFSERVICE_TIME": "0",
|
||||
"TAS_SELFSERVICE_TIME_UNIT": "",
|
||||
"TAS_SELFSERVICE_TRIGGER_UID": "",
|
||||
"TAS_SELFSERVICE_EXECUTION": "EVERY_TIME",
|
||||
"TAS_NOT_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_OFFLINE": "FALSE",
|
||||
"TAS_EMAIL_SERVER_UID": "",
|
||||
"TAS_AUTO_ROOT": "FALSE",
|
||||
"TAS_RECEIVE_SERVER_UID": "",
|
||||
"TAS_RECEIVE_LAST_EMAIL": "FALSE",
|
||||
"TAS_RECEIVE_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_RECEIVE_MESSAGE_TYPE": "text",
|
||||
"TAS_RECEIVE_MESSAGE_TEMPLATE": "alert_message.html",
|
||||
"TAS_RECEIVE_SUBJECT_MESSAGE": "",
|
||||
"TAS_RECEIVE_MESSAGE": "",
|
||||
"TAS_AVERAGE": "",
|
||||
"TAS_SDV": "",
|
||||
"TAS_UID_OLD": "5730239675dfb8626a65a28038679991"
|
||||
},
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_ID": "0",
|
||||
"TAS_UID": "3458788095dfb8d7a18fa33047794245",
|
||||
"TAS_TITLE": "Task 2",
|
||||
"TAS_DESCRIPTION": "",
|
||||
"TAS_DEF_TITLE": "",
|
||||
"TAS_DEF_SUBJECT_MESSAGE": "",
|
||||
"TAS_DEF_PROC_CODE": "",
|
||||
"TAS_DEF_MESSAGE": "",
|
||||
"TAS_DEF_DESCRIPTION": "",
|
||||
"TAS_TYPE": "NORMAL",
|
||||
"TAS_DURATION": "1",
|
||||
"TAS_DELAY_TYPE": "",
|
||||
"TAS_TEMPORIZER": "0",
|
||||
"TAS_TYPE_DAY": "",
|
||||
"TAS_TIMEUNIT": "DAYS",
|
||||
"TAS_ALERT": "FALSE",
|
||||
"TAS_PRIORITY_VARIABLE": "",
|
||||
"TAS_ASSIGN_TYPE": "BALANCED",
|
||||
"TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"TAS_GROUP_VARIABLE": "",
|
||||
"TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE",
|
||||
"TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE",
|
||||
"TAS_ASSIGN_LOCATION": "FALSE",
|
||||
"TAS_ASSIGN_LOCATION_ADHOC": "FALSE",
|
||||
"TAS_TRANSFER_FLY": "FALSE",
|
||||
"TAS_LAST_ASSIGNED": "0",
|
||||
"TAS_USER": "0",
|
||||
"TAS_CAN_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE",
|
||||
"TAS_CAN_CANCEL": "FALSE",
|
||||
"TAS_OWNER_APP": "FALSE",
|
||||
"STG_UID": "",
|
||||
"TAS_CAN_PAUSE": "FALSE",
|
||||
"TAS_CAN_SEND_MESSAGE": "TRUE",
|
||||
"TAS_CAN_DELETE_DOCS": "FALSE",
|
||||
"TAS_SELF_SERVICE": "FALSE",
|
||||
"TAS_START": "TRUE",
|
||||
"TAS_TO_LAST_USER": "FALSE",
|
||||
"TAS_SEND_LAST_EMAIL": "FALSE",
|
||||
"TAS_DERIVATION": "NORMAL",
|
||||
"TAS_POSX": "143",
|
||||
"TAS_POSY": "181",
|
||||
"TAS_WIDTH": "110",
|
||||
"TAS_HEIGHT": "60",
|
||||
"TAS_COLOR": "",
|
||||
"TAS_EVN_UID": "",
|
||||
"TAS_BOUNDARY": "",
|
||||
"TAS_DERIVATION_SCREEN_TPL": "",
|
||||
"TAS_SELFSERVICE_TIMEOUT": "0",
|
||||
"TAS_SELFSERVICE_TIME": "0",
|
||||
"TAS_SELFSERVICE_TIME_UNIT": "",
|
||||
"TAS_SELFSERVICE_TRIGGER_UID": "",
|
||||
"TAS_SELFSERVICE_EXECUTION": "EVERY_TIME",
|
||||
"TAS_NOT_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_OFFLINE": "FALSE",
|
||||
"TAS_EMAIL_SERVER_UID": "",
|
||||
"TAS_AUTO_ROOT": "FALSE",
|
||||
"TAS_RECEIVE_SERVER_UID": "",
|
||||
"TAS_RECEIVE_LAST_EMAIL": "FALSE",
|
||||
"TAS_RECEIVE_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_RECEIVE_MESSAGE_TYPE": "text",
|
||||
"TAS_RECEIVE_MESSAGE_TEMPLATE": "alert_message.html",
|
||||
"TAS_RECEIVE_SUBJECT_MESSAGE": "",
|
||||
"TAS_RECEIVE_MESSAGE": "",
|
||||
"TAS_AVERAGE": "",
|
||||
"TAS_SDV": "",
|
||||
"TAS_UID_OLD": "6279149375dfb8626a95495099553981"
|
||||
},
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_ID": "0",
|
||||
"TAS_UID": "7916511005dfb8d7a234286082436886",
|
||||
"TAS_TITLE": "Task 3",
|
||||
"TAS_DESCRIPTION": "",
|
||||
"TAS_DEF_TITLE": "",
|
||||
"TAS_DEF_SUBJECT_MESSAGE": "",
|
||||
"TAS_DEF_PROC_CODE": "",
|
||||
"TAS_DEF_MESSAGE": "",
|
||||
"TAS_DEF_DESCRIPTION": "",
|
||||
"TAS_TYPE": "NORMAL",
|
||||
"TAS_DURATION": "1",
|
||||
"TAS_DELAY_TYPE": "",
|
||||
"TAS_TEMPORIZER": "0",
|
||||
"TAS_TYPE_DAY": "",
|
||||
"TAS_TIMEUNIT": "DAYS",
|
||||
"TAS_ALERT": "FALSE",
|
||||
"TAS_PRIORITY_VARIABLE": "",
|
||||
"TAS_ASSIGN_TYPE": "BALANCED",
|
||||
"TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"TAS_GROUP_VARIABLE": "",
|
||||
"TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE",
|
||||
"TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE",
|
||||
"TAS_ASSIGN_LOCATION": "FALSE",
|
||||
"TAS_ASSIGN_LOCATION_ADHOC": "FALSE",
|
||||
"TAS_TRANSFER_FLY": "FALSE",
|
||||
"TAS_LAST_ASSIGNED": "0",
|
||||
"TAS_USER": "0",
|
||||
"TAS_CAN_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE",
|
||||
"TAS_CAN_CANCEL": "FALSE",
|
||||
"TAS_OWNER_APP": "FALSE",
|
||||
"STG_UID": "",
|
||||
"TAS_CAN_PAUSE": "FALSE",
|
||||
"TAS_CAN_SEND_MESSAGE": "TRUE",
|
||||
"TAS_CAN_DELETE_DOCS": "FALSE",
|
||||
"TAS_SELF_SERVICE": "FALSE",
|
||||
"TAS_START": "FALSE",
|
||||
"TAS_TO_LAST_USER": "FALSE",
|
||||
"TAS_SEND_LAST_EMAIL": "FALSE",
|
||||
"TAS_DERIVATION": "NORMAL",
|
||||
"TAS_POSX": "337",
|
||||
"TAS_POSY": "181",
|
||||
"TAS_WIDTH": "110",
|
||||
"TAS_HEIGHT": "60",
|
||||
"TAS_COLOR": "",
|
||||
"TAS_EVN_UID": "",
|
||||
"TAS_BOUNDARY": "",
|
||||
"TAS_DERIVATION_SCREEN_TPL": "",
|
||||
"TAS_SELFSERVICE_TIMEOUT": "0",
|
||||
"TAS_SELFSERVICE_TIME": "0",
|
||||
"TAS_SELFSERVICE_TIME_UNIT": "",
|
||||
"TAS_SELFSERVICE_TRIGGER_UID": "",
|
||||
"TAS_SELFSERVICE_EXECUTION": "EVERY_TIME",
|
||||
"TAS_NOT_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_OFFLINE": "FALSE",
|
||||
"TAS_EMAIL_SERVER_UID": "",
|
||||
"TAS_AUTO_ROOT": "FALSE",
|
||||
"TAS_RECEIVE_SERVER_UID": "",
|
||||
"TAS_RECEIVE_LAST_EMAIL": "FALSE",
|
||||
"TAS_RECEIVE_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_RECEIVE_MESSAGE_TYPE": "text",
|
||||
"TAS_RECEIVE_MESSAGE_TEMPLATE": "alert_message.html",
|
||||
"TAS_RECEIVE_SUBJECT_MESSAGE": "",
|
||||
"TAS_RECEIVE_MESSAGE": "",
|
||||
"TAS_AVERAGE": "",
|
||||
"TAS_SDV": "",
|
||||
"TAS_UID_OLD": "3347609685dfb8626a35d06089327263"
|
||||
},
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_ID": "0",
|
||||
"TAS_UID": "9865926225dfb8d7a1fc385009206952",
|
||||
"TAS_TITLE": "Task 4",
|
||||
"TAS_DESCRIPTION": "",
|
||||
"TAS_DEF_TITLE": "",
|
||||
"TAS_DEF_SUBJECT_MESSAGE": "",
|
||||
"TAS_DEF_PROC_CODE": "",
|
||||
"TAS_DEF_MESSAGE": "",
|
||||
"TAS_DEF_DESCRIPTION": "",
|
||||
"TAS_TYPE": "NORMAL",
|
||||
"TAS_DURATION": "1",
|
||||
"TAS_DELAY_TYPE": "",
|
||||
"TAS_TEMPORIZER": "0",
|
||||
"TAS_TYPE_DAY": "1",
|
||||
"TAS_TIMEUNIT": "DAYS",
|
||||
"TAS_ALERT": "FALSE",
|
||||
"TAS_PRIORITY_VARIABLE": "",
|
||||
"TAS_ASSIGN_TYPE": "BALANCED",
|
||||
"TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"TAS_GROUP_VARIABLE": "",
|
||||
"TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE",
|
||||
"TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE",
|
||||
"TAS_ASSIGN_LOCATION": "FALSE",
|
||||
"TAS_ASSIGN_LOCATION_ADHOC": "FALSE",
|
||||
"TAS_TRANSFER_FLY": "FALSE",
|
||||
"TAS_LAST_ASSIGNED": "0",
|
||||
"TAS_USER": "0",
|
||||
"TAS_CAN_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE",
|
||||
"TAS_CAN_CANCEL": "FALSE",
|
||||
"TAS_OWNER_APP": "FALSE",
|
||||
"STG_UID": "",
|
||||
"TAS_CAN_PAUSE": "FALSE",
|
||||
"TAS_CAN_SEND_MESSAGE": "TRUE",
|
||||
"TAS_CAN_DELETE_DOCS": "FALSE",
|
||||
"TAS_SELF_SERVICE": "FALSE",
|
||||
"TAS_START": "TRUE",
|
||||
"TAS_TO_LAST_USER": "FALSE",
|
||||
"TAS_SEND_LAST_EMAIL": "FALSE",
|
||||
"TAS_DERIVATION": "NORMAL",
|
||||
"TAS_POSX": "143",
|
||||
"TAS_POSY": "274",
|
||||
"TAS_WIDTH": "110",
|
||||
"TAS_HEIGHT": "60",
|
||||
"TAS_COLOR": "",
|
||||
"TAS_EVN_UID": "",
|
||||
"TAS_BOUNDARY": "",
|
||||
"TAS_DERIVATION_SCREEN_TPL": "",
|
||||
"TAS_SELFSERVICE_TIMEOUT": "0",
|
||||
"TAS_SELFSERVICE_TIME": "0",
|
||||
"TAS_SELFSERVICE_TIME_UNIT": "",
|
||||
"TAS_SELFSERVICE_TRIGGER_UID": "",
|
||||
"TAS_SELFSERVICE_EXECUTION": "EVERY_TIME",
|
||||
"TAS_NOT_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_OFFLINE": "FALSE",
|
||||
"TAS_EMAIL_SERVER_UID": "",
|
||||
"TAS_AUTO_ROOT": "FALSE",
|
||||
"TAS_RECEIVE_SERVER_UID": "",
|
||||
"TAS_RECEIVE_LAST_EMAIL": "FALSE",
|
||||
"TAS_RECEIVE_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_RECEIVE_MESSAGE_TYPE": "text",
|
||||
"TAS_RECEIVE_MESSAGE_TEMPLATE": "alert_message.html",
|
||||
"TAS_RECEIVE_SUBJECT_MESSAGE": "",
|
||||
"TAS_RECEIVE_MESSAGE": "",
|
||||
"TAS_AVERAGE": "",
|
||||
"TAS_SDV": "",
|
||||
"TAS_UID_OLD": "8420128765dfb8626acccb8059629296"
|
||||
},
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_ID": "0",
|
||||
"TAS_UID": "3454769755dfb8d7a1cadc9088436060",
|
||||
"TAS_TITLE": "Task 5",
|
||||
"TAS_DESCRIPTION": "",
|
||||
"TAS_DEF_TITLE": "",
|
||||
"TAS_DEF_SUBJECT_MESSAGE": "",
|
||||
"TAS_DEF_PROC_CODE": "",
|
||||
"TAS_DEF_MESSAGE": "",
|
||||
"TAS_DEF_DESCRIPTION": "",
|
||||
"TAS_TYPE": "NORMAL",
|
||||
"TAS_DURATION": "1",
|
||||
"TAS_DELAY_TYPE": "",
|
||||
"TAS_TEMPORIZER": "0",
|
||||
"TAS_TYPE_DAY": "1",
|
||||
"TAS_TIMEUNIT": "DAYS",
|
||||
"TAS_ALERT": "FALSE",
|
||||
"TAS_PRIORITY_VARIABLE": "",
|
||||
"TAS_ASSIGN_TYPE": "BALANCED",
|
||||
"TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"TAS_GROUP_VARIABLE": "",
|
||||
"TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE",
|
||||
"TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE",
|
||||
"TAS_ASSIGN_LOCATION": "FALSE",
|
||||
"TAS_ASSIGN_LOCATION_ADHOC": "FALSE",
|
||||
"TAS_TRANSFER_FLY": "FALSE",
|
||||
"TAS_LAST_ASSIGNED": "0",
|
||||
"TAS_USER": "0",
|
||||
"TAS_CAN_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE",
|
||||
"TAS_CAN_CANCEL": "FALSE",
|
||||
"TAS_OWNER_APP": "FALSE",
|
||||
"STG_UID": "",
|
||||
"TAS_CAN_PAUSE": "FALSE",
|
||||
"TAS_CAN_SEND_MESSAGE": "TRUE",
|
||||
"TAS_CAN_DELETE_DOCS": "FALSE",
|
||||
"TAS_SELF_SERVICE": "FALSE",
|
||||
"TAS_START": "FALSE",
|
||||
"TAS_TO_LAST_USER": "FALSE",
|
||||
"TAS_SEND_LAST_EMAIL": "FALSE",
|
||||
"TAS_DERIVATION": "NORMAL",
|
||||
"TAS_POSX": "337",
|
||||
"TAS_POSY": "274",
|
||||
"TAS_WIDTH": "110",
|
||||
"TAS_HEIGHT": "60",
|
||||
"TAS_COLOR": "",
|
||||
"TAS_EVN_UID": "",
|
||||
"TAS_BOUNDARY": "",
|
||||
"TAS_DERIVATION_SCREEN_TPL": "",
|
||||
"TAS_SELFSERVICE_TIMEOUT": "0",
|
||||
"TAS_SELFSERVICE_TIME": "0",
|
||||
"TAS_SELFSERVICE_TIME_UNIT": "",
|
||||
"TAS_SELFSERVICE_TRIGGER_UID": "",
|
||||
"TAS_SELFSERVICE_EXECUTION": "EVERY_TIME",
|
||||
"TAS_NOT_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_OFFLINE": "FALSE",
|
||||
"TAS_EMAIL_SERVER_UID": "",
|
||||
"TAS_AUTO_ROOT": "FALSE",
|
||||
"TAS_RECEIVE_SERVER_UID": "",
|
||||
"TAS_RECEIVE_LAST_EMAIL": "FALSE",
|
||||
"TAS_RECEIVE_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_RECEIVE_MESSAGE_TYPE": "text",
|
||||
"TAS_RECEIVE_MESSAGE_TEMPLATE": "alert_message.html",
|
||||
"TAS_RECEIVE_SUBJECT_MESSAGE": "",
|
||||
"TAS_RECEIVE_MESSAGE": "",
|
||||
"TAS_AVERAGE": "",
|
||||
"TAS_SDV": "",
|
||||
"TAS_UID_OLD": "7400740655dfb86269feaa1089812754"
|
||||
},
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"PRO_ID": "0",
|
||||
"TAS_UID": "wee-532835dfb8d7a2d0a29054950929",
|
||||
"TAS_TITLE": "WEBENTRYEVENT",
|
||||
"TAS_DESCRIPTION": "",
|
||||
"TAS_DEF_TITLE": "",
|
||||
"TAS_DEF_SUBJECT_MESSAGE": "",
|
||||
"TAS_DEF_PROC_CODE": "",
|
||||
"TAS_DEF_MESSAGE": "",
|
||||
"TAS_DEF_DESCRIPTION": "",
|
||||
"TAS_TYPE": "WEBENTRYEVENT",
|
||||
"TAS_DURATION": "1",
|
||||
"TAS_DELAY_TYPE": "",
|
||||
"TAS_TEMPORIZER": "0",
|
||||
"TAS_TYPE_DAY": "",
|
||||
"TAS_TIMEUNIT": "DAYS",
|
||||
"TAS_ALERT": "FALSE",
|
||||
"TAS_PRIORITY_VARIABLE": "",
|
||||
"TAS_ASSIGN_TYPE": "BALANCED",
|
||||
"TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"TAS_GROUP_VARIABLE": "",
|
||||
"TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE",
|
||||
"TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE",
|
||||
"TAS_ASSIGN_LOCATION": "FALSE",
|
||||
"TAS_ASSIGN_LOCATION_ADHOC": "FALSE",
|
||||
"TAS_TRANSFER_FLY": "FALSE",
|
||||
"TAS_LAST_ASSIGNED": "0",
|
||||
"TAS_USER": "0",
|
||||
"TAS_CAN_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_UPLOAD": "FALSE",
|
||||
"TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE",
|
||||
"TAS_CAN_CANCEL": "FALSE",
|
||||
"TAS_OWNER_APP": "FALSE",
|
||||
"STG_UID": "",
|
||||
"TAS_CAN_PAUSE": "FALSE",
|
||||
"TAS_CAN_SEND_MESSAGE": "TRUE",
|
||||
"TAS_CAN_DELETE_DOCS": "FALSE",
|
||||
"TAS_SELF_SERVICE": "FALSE",
|
||||
"TAS_START": "TRUE",
|
||||
"TAS_TO_LAST_USER": "FALSE",
|
||||
"TAS_SEND_LAST_EMAIL": "FALSE",
|
||||
"TAS_DERIVATION": "NORMAL",
|
||||
"TAS_POSX": "62",
|
||||
"TAS_POSY": "202",
|
||||
"TAS_WIDTH": "110",
|
||||
"TAS_HEIGHT": "60",
|
||||
"TAS_COLOR": "",
|
||||
"TAS_EVN_UID": "",
|
||||
"TAS_BOUNDARY": "",
|
||||
"TAS_DERIVATION_SCREEN_TPL": "",
|
||||
"TAS_SELFSERVICE_TIMEOUT": "0",
|
||||
"TAS_SELFSERVICE_TIME": "0",
|
||||
"TAS_SELFSERVICE_TIME_UNIT": "",
|
||||
"TAS_SELFSERVICE_TRIGGER_UID": "",
|
||||
"TAS_SELFSERVICE_EXECUTION": "EVERY_TIME",
|
||||
"TAS_NOT_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_OFFLINE": "FALSE",
|
||||
"TAS_EMAIL_SERVER_UID": "",
|
||||
"TAS_AUTO_ROOT": "FALSE",
|
||||
"TAS_RECEIVE_SERVER_UID": "",
|
||||
"TAS_RECEIVE_LAST_EMAIL": "FALSE",
|
||||
"TAS_RECEIVE_EMAIL_FROM_FORMAT": "0",
|
||||
"TAS_RECEIVE_MESSAGE_TYPE": "text",
|
||||
"TAS_RECEIVE_MESSAGE_TEMPLATE": "alert_message.html",
|
||||
"TAS_RECEIVE_SUBJECT_MESSAGE": "",
|
||||
"TAS_RECEIVE_MESSAGE": "",
|
||||
"TAS_AVERAGE": "",
|
||||
"TAS_SDV": "",
|
||||
"TAS_UID_OLD": "wee-873125dfb8626b28bf4015522377"
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"ROU_UID": "1212118285dfb8626c112f2028203620",
|
||||
"ROU_PARENT": "0",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "3454769755dfb8d7a1cadc9088436060",
|
||||
"ROU_NEXT_TASK": "-1",
|
||||
"ROU_CASE": "1",
|
||||
"ROU_TYPE": "SEQUENTIAL",
|
||||
"ROU_DEFAULT": "0",
|
||||
"ROU_CONDITION": "",
|
||||
"ROU_TO_LAST_USER": "FALSE",
|
||||
"ROU_OPTIONAL": "FALSE",
|
||||
"ROU_SEND_EMAIL": "TRUE",
|
||||
"ROU_SOURCEANCHOR": "1",
|
||||
"ROU_TARGETANCHOR": "0",
|
||||
"ROU_TO_PORT": "1",
|
||||
"ROU_FROM_PORT": "2",
|
||||
"ROU_EVN_UID": "",
|
||||
"GAT_UID": ""
|
||||
},
|
||||
{
|
||||
"ROU_UID": "2179164525dfb8626c19333095716699",
|
||||
"ROU_PARENT": "0",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "9865926225dfb8d7a1fc385009206952",
|
||||
"ROU_NEXT_TASK": "3454769755dfb8d7a1cadc9088436060",
|
||||
"ROU_CASE": "1",
|
||||
"ROU_TYPE": "SEQUENTIAL",
|
||||
"ROU_DEFAULT": "0",
|
||||
"ROU_CONDITION": "",
|
||||
"ROU_TO_LAST_USER": "FALSE",
|
||||
"ROU_OPTIONAL": "FALSE",
|
||||
"ROU_SEND_EMAIL": "TRUE",
|
||||
"ROU_SOURCEANCHOR": "1",
|
||||
"ROU_TARGETANCHOR": "0",
|
||||
"ROU_TO_PORT": "1",
|
||||
"ROU_FROM_PORT": "2",
|
||||
"ROU_EVN_UID": "",
|
||||
"GAT_UID": ""
|
||||
},
|
||||
{
|
||||
"ROU_UID": "2685133935dfb8626c23ee2060782509",
|
||||
"ROU_PARENT": "0",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "7916511005dfb8d7a234286082436886",
|
||||
"ROU_NEXT_TASK": "-1",
|
||||
"ROU_CASE": "1",
|
||||
"ROU_TYPE": "SEQUENTIAL",
|
||||
"ROU_DEFAULT": "0",
|
||||
"ROU_CONDITION": "",
|
||||
"ROU_TO_LAST_USER": "FALSE",
|
||||
"ROU_OPTIONAL": "FALSE",
|
||||
"ROU_SEND_EMAIL": "TRUE",
|
||||
"ROU_SOURCEANCHOR": "1",
|
||||
"ROU_TARGETANCHOR": "0",
|
||||
"ROU_TO_PORT": "1",
|
||||
"ROU_FROM_PORT": "2",
|
||||
"ROU_EVN_UID": "",
|
||||
"GAT_UID": ""
|
||||
},
|
||||
{
|
||||
"ROU_UID": "3309845585dfb8626cf6d41085941718",
|
||||
"ROU_PARENT": "0",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "wee-532835dfb8d7a2d0a29054950929",
|
||||
"ROU_NEXT_TASK": "3458788095dfb8d7a18fa33047794245",
|
||||
"ROU_CASE": "1",
|
||||
"ROU_TYPE": "SEQUENTIAL",
|
||||
"ROU_DEFAULT": "0",
|
||||
"ROU_CONDITION": "",
|
||||
"ROU_TO_LAST_USER": "FALSE",
|
||||
"ROU_OPTIONAL": "FALSE",
|
||||
"ROU_SEND_EMAIL": "TRUE",
|
||||
"ROU_SOURCEANCHOR": "1",
|
||||
"ROU_TARGETANCHOR": "0",
|
||||
"ROU_TO_PORT": "1",
|
||||
"ROU_FROM_PORT": "2",
|
||||
"ROU_EVN_UID": "",
|
||||
"GAT_UID": ""
|
||||
},
|
||||
{
|
||||
"ROU_UID": "7287866925dfb8626c065a7095532193",
|
||||
"ROU_PARENT": "0",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "3458788095dfb8d7a18fa33047794245",
|
||||
"ROU_NEXT_TASK": "7916511005dfb8d7a234286082436886",
|
||||
"ROU_CASE": "1",
|
||||
"ROU_TYPE": "SEQUENTIAL",
|
||||
"ROU_DEFAULT": "0",
|
||||
"ROU_CONDITION": "",
|
||||
"ROU_TO_LAST_USER": "FALSE",
|
||||
"ROU_OPTIONAL": "FALSE",
|
||||
"ROU_SEND_EMAIL": "TRUE",
|
||||
"ROU_SOURCEANCHOR": "1",
|
||||
"ROU_TARGETANCHOR": "0",
|
||||
"ROU_TO_PORT": "1",
|
||||
"ROU_FROM_PORT": "2",
|
||||
"ROU_EVN_UID": "",
|
||||
"GAT_UID": ""
|
||||
},
|
||||
{
|
||||
"ROU_UID": "8808316485dfb8626c2ed28017700589",
|
||||
"ROU_PARENT": "0",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "5978729975dfb8d7a264fa0070639752",
|
||||
"ROU_NEXT_TASK": "-1",
|
||||
"ROU_CASE": "1",
|
||||
"ROU_TYPE": "SEQUENTIAL",
|
||||
"ROU_DEFAULT": "0",
|
||||
"ROU_CONDITION": "",
|
||||
"ROU_TO_LAST_USER": "FALSE",
|
||||
"ROU_OPTIONAL": "FALSE",
|
||||
"ROU_SEND_EMAIL": "TRUE",
|
||||
"ROU_SOURCEANCHOR": "1",
|
||||
"ROU_TARGETANCHOR": "0",
|
||||
"ROU_TO_PORT": "1",
|
||||
"ROU_FROM_PORT": "2",
|
||||
"ROU_EVN_UID": "",
|
||||
"GAT_UID": ""
|
||||
}
|
||||
],
|
||||
"lanes": [],
|
||||
"gateways": [],
|
||||
"inputs": [],
|
||||
"outputs": [],
|
||||
"dynaforms": [
|
||||
{
|
||||
"DYN_UID": "1981330525dfb8626c70026010918765",
|
||||
"DYN_TITLE": "dynaform1",
|
||||
"DYN_DESCRIPTION": "",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"DYN_TYPE": "xmlform",
|
||||
"DYN_FILENAME": "3598973985dfb86269c23d6071638314\/1981330525dfb8626c70026010918765",
|
||||
"DYN_CONTENT": "{\"name\":\"dynaform1\",\"description\":\"\",\"items\":[{\"type\":\"form\",\"variable\":\"\",\"var_uid\":\"\",\"dataType\":\"\",\"id\":\"1981330525dfb8626c70026010918765\",\"name\":\"dynaform1\",\"description\":\"\",\"mode\":\"edit\",\"script\":\"\",\"language\":\"en\",\"externalLibs\":\"\",\"printable\":false,\"items\":[[{\"type\":\"text\",\"variable\":\"textVar001\",\"var_uid\":\"2420200535dfb8626c83d16045380736\",\"dataType\":\"string\",\"protectedValue\":false,\"id\":\"textVar001\",\"name\":\"textVar001\",\"label\":\"text_1\",\"defaultValue\":\"\",\"placeholder\":\"\",\"hint\":\"\",\"required\":false,\"requiredFieldErrorMessage\":\"\",\"textTransform\":\"none\",\"validate\":\"\",\"validateMessage\":\"\",\"maxLength\":1000,\"formula\":\"\",\"mode\":\"parent\",\"operation\":\"\",\"dbConnection\":\"workflow\",\"dbConnectionLabel\":\"PM Database\",\"sql\":\"\",\"var_name\":\"textVar001\",\"colSpan\":12}]],\"variables\":[{\"var_uid\":\"2420200535dfb8626c83d16045380736\",\"prj_uid\":\"3598973985dfb86269c23d6071638314\",\"var_name\":\"textVar001\",\"var_field_type\":\"string\",\"var_field_size\":10,\"var_label\":\"string\",\"var_dbconnection\":\"workflow\",\"var_dbconnection_label\":\"PM Database\",\"var_sql\":\"\",\"var_null\":0,\"var_default\":\"\",\"var_accepted_values\":\"[]\",\"inp_doc_uid\":\"\"}]}]}",
|
||||
"DYN_LABEL": "",
|
||||
"DYN_VERSION": "2",
|
||||
"DYN_UPDATE_DATE": "2019-12-19 14:02:48"
|
||||
}
|
||||
],
|
||||
"steps": [
|
||||
{
|
||||
"STEP_UID": "1497588005dfb8626c75079092586998",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "9865926225dfb8d7a1fc385009206952",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
},
|
||||
{
|
||||
"STEP_UID": "1500595075dfb8626c761f9080007968",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "7916511005dfb8d7a234286082436886",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
},
|
||||
{
|
||||
"STEP_UID": "2804442295dfb8626c78449036895613",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "wee-532835dfb8d7a2d0a29054950929",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
},
|
||||
{
|
||||
"STEP_UID": "3986576985dfb8626c721d3097828590",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "3454769755dfb8d7a1cadc9088436060",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
},
|
||||
{
|
||||
"STEP_UID": "4754027025dfb8626c73c99090309776",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "3458788095dfb8d7a18fa33047794245",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
},
|
||||
{
|
||||
"STEP_UID": "8110336185dfb8626ce6121078206082",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "wee-532835dfb8d7a2d0a29054950929",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
},
|
||||
{
|
||||
"STEP_UID": "9520990735dfb8626c77338089242336",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "5978729975dfb8d7a264fa0070639752",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_CONDITION": "",
|
||||
"STEP_POSITION": "1",
|
||||
"STEP_MODE": "EDIT"
|
||||
}
|
||||
],
|
||||
"triggers": [],
|
||||
"taskusers": [],
|
||||
"groupwfs": [],
|
||||
"steptriggers": [],
|
||||
"dbconnections": [],
|
||||
"reportTables": [],
|
||||
"reportTablesVars": [],
|
||||
"stepSupervisor": [
|
||||
{
|
||||
"STEP_UID": "2322645545dfb8626c79580010259901",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"STEP_TYPE_OBJ": "DYNAFORM",
|
||||
"STEP_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"STEP_POSITION": "1"
|
||||
}
|
||||
],
|
||||
"dynaformFiles": {
|
||||
"1981330525dfb8626c70026010918765": "test"
|
||||
},
|
||||
"gridFiles": {
|
||||
"1981330525dfb8626c70026010918765": "test"
|
||||
},
|
||||
"objectPermissions": [{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"OP_OBJ_UID": "1981330525dfb8626c70026010918765",
|
||||
"OP_OBJ_TYPE": "DYNAFORM"
|
||||
}
|
||||
],
|
||||
"subProcess": [],
|
||||
"caseTracker": [
|
||||
{
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"CT_MAP_TYPE": "PROCESSMAP",
|
||||
"CT_DERIVATION_HISTORY": "1",
|
||||
"CT_MESSAGE_HISTORY": "1"
|
||||
}
|
||||
],
|
||||
"caseTrackerObject": [
|
||||
{
|
||||
"CTO_UID": "9681402035dfb8626c7a720057282635",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"CTO_TYPE_OBJ": "DYNAFORM",
|
||||
"CTO_UID_OBJ": "1981330525dfb8626c70026010918765",
|
||||
"CTO_CONDITION": "",
|
||||
"CTO_POSITION": "1"
|
||||
}
|
||||
],
|
||||
"stage": [],
|
||||
"fieldCondition": [
|
||||
{
|
||||
"FCD_DYN_UID": "1981330525dfb8626c70026010918765"
|
||||
}
|
||||
],
|
||||
"event": [],
|
||||
"caseScheduler": [],
|
||||
"processCategory": [],
|
||||
"taskExtraProperties": [],
|
||||
"processUser": [],
|
||||
"processVariables": [
|
||||
{
|
||||
"VAR_UID": "2420200535dfb8626c83d16045380736",
|
||||
"PRJ_UID": "3865635965dfb8d7a152330088145190",
|
||||
"VAR_NAME": "textVar001",
|
||||
"VAR_FIELD_TYPE": "string",
|
||||
"VAR_FIELD_SIZE": "10",
|
||||
"VAR_LABEL": "string",
|
||||
"VAR_DBCONNECTION": "workflow",
|
||||
"VAR_SQL": "",
|
||||
"VAR_NULL": "0",
|
||||
"VAR_DEFAULT": "",
|
||||
"VAR_ACCEPTED_VALUES": "[]",
|
||||
"INP_DOC_UID": ""
|
||||
}
|
||||
],
|
||||
"webEntry": [
|
||||
{
|
||||
"DYN_UID": "1981330525dfb8626c70026010918765"
|
||||
}
|
||||
],
|
||||
"webEntryEvent": [
|
||||
{
|
||||
"WEE_UID": "7839596635dfb8626d46f82082790649",
|
||||
"PRJ_UID": "3598973985dfb86269c23d6071638314",
|
||||
"EVN_UID": "8868532835dfb8d7a2d0a29054950929",
|
||||
"ACT_UID": "3458788095dfb8d7a18fa33047794245",
|
||||
"DYN_UID": "1981330525dfb8626c70026010918765",
|
||||
"USR_UID": "00000000000000000000000000000002",
|
||||
"WEE_TITLE": "1833424275dfb847c912110048244199",
|
||||
"WEE_DESCRIPTION": "",
|
||||
"WEE_STATUS": "ENABLED",
|
||||
"WEE_WE_UID": "9067551515dfb8626d0f040095365609",
|
||||
"WEE_WE_TAS_UID": "wee-873125dfb8626b28bf4015522377",
|
||||
"WEE_WE_URL": "1833424275dfb847c912110048244199.php",
|
||||
"WE_CUSTOM_TITLE": "",
|
||||
"WE_TYPE": "SINGLE",
|
||||
"WE_AUTHENTICATION": "ANONYMOUS",
|
||||
"WE_HIDE_INFORMATION_BAR": "1",
|
||||
"WE_CALLBACK": "PROCESSMAKER",
|
||||
"WE_CALLBACK_URL": "",
|
||||
"WE_LINK_GENERATION": "DEFAULT",
|
||||
"WE_LINK_SKIN": "classic",
|
||||
"WE_LINK_LANGUAGE": "en",
|
||||
"WE_LINK_DOMAIN": "",
|
||||
"TAS_UID": "wee-873125dfb8626b28bf4015522377",
|
||||
"WE_SHOW_IN_NEW_CASE": "0",
|
||||
"EVN_UID_OLD": "8469873125dfb8626b28bf4015522377"
|
||||
}
|
||||
],
|
||||
"messageType": [],
|
||||
"messageTypeVariable": [],
|
||||
"messageEventDefinition": [],
|
||||
"scriptTask": [],
|
||||
"timerEvent": [],
|
||||
"emailEvent": [],
|
||||
"filesManager": [
|
||||
{
|
||||
"PRF_UID": "2320529945dfb8626e07327095962435",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"USR_UID": "00000000000000000000000000000001",
|
||||
"PRF_UPDATE_USR_UID": "",
|
||||
"PRF_PATH": "\/var\/www\/shared\/sites\/workflow\/public\/3598973985dfb86269c23d6071638314\/1833424275dfb847c912110048244199.php",
|
||||
"PRF_TYPE": "file",
|
||||
"PRF_EDITABLE": "0",
|
||||
"PRF_CREATE_DATE": "2019-12-19 14:16:06",
|
||||
"PRF_UPDATE_DATE": ""
|
||||
},
|
||||
{
|
||||
"PRF_UID": "3478830955dfb84d9e1d771040119182",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"USR_UID": "00000000000000000000000000000001",
|
||||
"PRF_UPDATE_USR_UID": "",
|
||||
"PRF_PATH": "\/var\/www\/shared\/sites\/workflow\/mailTemplates\/3598973985dfb86269c23d6071638314\/actionsByEmailErrorReply.html",
|
||||
"PRF_TYPE": "file",
|
||||
"PRF_EDITABLE": "1",
|
||||
"PRF_CREATE_DATE": "2019-12-19 14:10:33",
|
||||
"PRF_UPDATE_DATE": ""
|
||||
},
|
||||
{
|
||||
"PRF_UID": "5200351355dfb84d9e18946005177341",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"USR_UID": "00000000000000000000000000000001",
|
||||
"PRF_UPDATE_USR_UID": "",
|
||||
"PRF_PATH": "\/var\/www\/shared\/sites\/workflow\/mailTemplates\/3598973985dfb86269c23d6071638314\/actionsByEmail.html",
|
||||
"PRF_TYPE": "file",
|
||||
"PRF_EDITABLE": "1",
|
||||
"PRF_CREATE_DATE": "2019-12-19 14:10:33",
|
||||
"PRF_UPDATE_DATE": ""
|
||||
},
|
||||
{
|
||||
"PRF_UID": "6235128035dfb8626dffd94027574889",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"USR_UID": "00000000000000000000000000000001",
|
||||
"PRF_UPDATE_USR_UID": "",
|
||||
"PRF_PATH": "\/var\/www\/shared\/sites\/workflow\/public\/3598973985dfb86269c23d6071638314\/1833424275dfb847c912110048244199Info.php",
|
||||
"PRF_TYPE": "file",
|
||||
"PRF_EDITABLE": "0",
|
||||
"PRF_CREATE_DATE": "2019-12-19 14:16:06",
|
||||
"PRF_UPDATE_DATE": ""
|
||||
},
|
||||
{
|
||||
"PRF_UID": "6966516255dfb8626dfbd42099136357",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"USR_UID": "00000000000000000000000000000001",
|
||||
"PRF_UPDATE_USR_UID": "",
|
||||
"PRF_PATH": "\/var\/www\/shared\/sites\/workflow\/public\/3598973985dfb86269c23d6071638314\/1833424275dfb847c912110048244199Post.php",
|
||||
"PRF_TYPE": "file",
|
||||
"PRF_EDITABLE": "0",
|
||||
"PRF_CREATE_DATE": "2019-12-19 14:16:06",
|
||||
"PRF_UPDATE_DATE": ""
|
||||
},
|
||||
{
|
||||
"PRF_UID": "7327359135dfb8626e03770066162194",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"USR_UID": "00000000000000000000000000000001",
|
||||
"PRF_UPDATE_USR_UID": "",
|
||||
"PRF_PATH": "\/var\/www\/shared\/sites\/workflow\/public\/3598973985dfb86269c23d6071638314\/wsClient.php",
|
||||
"PRF_TYPE": "file",
|
||||
"PRF_EDITABLE": "0",
|
||||
"PRF_CREATE_DATE": "2019-12-19 14:16:06",
|
||||
"PRF_UPDATE_DATE": ""
|
||||
}
|
||||
],
|
||||
"abeConfiguration": [
|
||||
{
|
||||
"ABE_UID": "4306137575dfb8626d54c87075844725",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "3454769755dfb8d7a1cadc9088436060",
|
||||
"ABE_TYPE": "LINK",
|
||||
"ABE_TEMPLATE": "actionsByEmailErrorReply.html",
|
||||
"ABE_DYN_TYPE": "NORMAL",
|
||||
"DYN_UID": "1981330525dfb8626c70026010918765",
|
||||
"ABE_EMAIL_FIELD": "",
|
||||
"ABE_ACTION_FIELD": "",
|
||||
"ABE_ACTION_BODY_FIELD": "",
|
||||
"ABE_CASE_NOTE_IN_RESPONSE": "0",
|
||||
"ABE_FORCE_LOGIN": "0",
|
||||
"ABE_CREATE_DATE": "2019-12-19 14:16:06",
|
||||
"ABE_UPDATE_DATE": "2019-12-19 14:16:06",
|
||||
"ABE_SUBJECT_FIELD": "",
|
||||
"ABE_MAILSERVER_OR_MAILCURRENT": "0",
|
||||
"ABE_CUSTOM_GRID": "b:0;",
|
||||
"ABE_EMAIL_SERVER_UID": "",
|
||||
"ABE_EMAIL_SERVER_RECEIVER_UID": "",
|
||||
"TAS_UID_OLD": "7400740655dfb86269feaa1089812754"
|
||||
},
|
||||
{
|
||||
"ABE_UID": "5375484805dfb8626d58030072013572",
|
||||
"PRO_UID": "3865635965dfb8d7a152330088145190",
|
||||
"TAS_UID": "9865926225dfb8d7a1fc385009206952",
|
||||
"ABE_TYPE": "LINK",
|
||||
"ABE_TEMPLATE": "actionsByEmailErrorReply.html",
|
||||
"ABE_DYN_TYPE": "NORMAL",
|
||||
"DYN_UID": "1981330525dfb8626c70026010918765",
|
||||
"ABE_EMAIL_FIELD": "test",
|
||||
"ABE_ACTION_FIELD": "",
|
||||
"ABE_ACTION_BODY_FIELD": "",
|
||||
"ABE_CASE_NOTE_IN_RESPONSE": "0",
|
||||
"ABE_FORCE_LOGIN": "0",
|
||||
"ABE_CREATE_DATE": "2019-12-19 14:16:06",
|
||||
"ABE_UPDATE_DATE": "2019-12-19 14:16:06",
|
||||
"ABE_SUBJECT_FIELD": "test",
|
||||
"ABE_MAILSERVER_OR_MAILCURRENT": "0",
|
||||
"ABE_CUSTOM_GRID": "b:0;",
|
||||
"ABE_EMAIL_SERVER_UID": "",
|
||||
"ABE_EMAIL_SERVER_RECEIVER_UID": "",
|
||||
"TAS_UID_OLD": "8420128765dfb8626acccb8059629296"
|
||||
}
|
||||
],
|
||||
"elementTask": [],
|
||||
"uid": {
|
||||
"PROCESS": {
|
||||
"7084112395dfb826264eac2069406712": "3865635965dfb8d7a152330088145190"
|
||||
},
|
||||
"TASK": {
|
||||
"5730239675dfb8626a65a28038679991": "5978729975dfb8d7a264fa0070639752",
|
||||
"6279149375dfb8626a95495099553981": "3458788095dfb8d7a18fa33047794245",
|
||||
"3347609685dfb8626a35d06089327263": "7916511005dfb8d7a234286082436886",
|
||||
"8420128765dfb8626acccb8059629296": "9865926225dfb8d7a1fc385009206952",
|
||||
"7400740655dfb86269feaa1089812754": "3454769755dfb8d7a1cadc9088436060",
|
||||
"wee-873125dfb8626b28bf4015522377": "wee-532835dfb8d7a2d0a29054950929"
|
||||
}
|
||||
}
|
||||
}
|
||||
8
tests/resources/simpleClassicPostData.json
Normal file
8
tests/resources/simpleClassicPostData.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"function": "reloadField",
|
||||
"form": "Wlp0bHBXS2tiR2FtcVpXaHBwbHcxV09tWlpObHBXaWphV2locDJpbHEyWm9wV1dlWkpabG4yQ2phWlNrcFpXbTFteHNvcGJSbUp0Z29tQ21iR1drcTJmTTZhS3BvbMKwbG9NOA______",
|
||||
"fields": "[%7B%22suggest2%22%3A%22C%22%7D]",
|
||||
"grid": "Grid",
|
||||
"gridField": "%7B%22suggest1%22%3A%22BO%22%7D",
|
||||
"row": "1"
|
||||
}
|
||||
242
tests/resources/simpleClassicSessionData.json
Normal file
242
tests/resources/simpleClassicSessionData.json
Normal file
File diff suppressed because one or more lines are too long
15
tests/resources/simpleClassicXmlFormData.xml
Executable file
15
tests/resources/simpleClassicXmlFormData.xml
Executable file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm type="xmlform" name="2859218665d41d7c2920598058137861/3411353005d41d9a730ede8060385476" width="500" enabletemplate="0" mode="" nextstepsave="prompt">
|
||||
<BUG type="title" required="0" readonly="0" optgroup="0">
|
||||
<en>BUG</en>
|
||||
</BUG>
|
||||
<TEST type="text" maxlength="64" validate="Any" required="0" readonly="0" size="15" mode="edit" optgroup="0">
|
||||
<en>TEST</en>
|
||||
</TEST>
|
||||
<SUGGEST type="suggest" required="0" size="15" mode="edit" sqlconnection="4898432885d41d9921cea61001765691" maxresults="6" searchtype="*searchtype*" table="0" readonly="0" optgroup="0"><![CDATA[SELECT IC_UID, IC_NAME
|
||||
FROM ISO_COUNTRY]]><en>SUGGEST</en></SUGGEST>
|
||||
<SUBMIT type="submit" required="0" readonly="0" optgroup="0">
|
||||
<en>SUBMIT</en>
|
||||
</SUBMIT>
|
||||
<Grid type="grid" xmlgrid="2859218665d41d7c2920598058137861/4923800155da71a732a4207031768424" addrow="1" deleterow="1" required="0" readonly="0" resizable="0" optgroup="0"/>
|
||||
</dynaForm>
|
||||
47
tests/unit/gulliver/methods/DefaultAjaxTest.php
Normal file
47
tests/unit/gulliver/methods/DefaultAjaxTest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\gulliver\methods;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class DefaultAjaxTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* This gets data from a json file.
|
||||
* @param string $pathData
|
||||
* @return array
|
||||
*/
|
||||
private function getDataFromFile(string $pathData): array
|
||||
{
|
||||
$pathData = PATH_TRUNK . "/tests/resources/{$pathData}";
|
||||
$data = file_get_contents($pathData);
|
||||
$result = json_decode($data, JSON_OBJECT_AS_ARRAY);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This should get the data for control suggest in classic process.
|
||||
* @test
|
||||
*/
|
||||
public function this_should_get_the_data_for_control_suggest_in_classic_process()
|
||||
{
|
||||
$_POST = $this->getDataFromFile("simpleClassicPostData.json");
|
||||
$_SESSION = $this->getDataFromFile("simpleClassicSessionData.json");
|
||||
$_SESSION["CURRENT_PAGE_INITILIZATION"] = "";
|
||||
|
||||
$pathName = PATH_XMLFORM . "2859218665d41d7c2920598058137861";
|
||||
$pathFileName = "{$pathName}/3411353005d41d9a730ede8060385476_tmp0.xml";
|
||||
if (!is_dir($pathName)) {
|
||||
mkdir($pathName);
|
||||
}
|
||||
$data = file_get_contents(PATH_TRUNK . "/tests/resources/simpleClassicXmlFormData.xml");
|
||||
file_put_contents($pathFileName, $data);
|
||||
|
||||
require_once PATH_TRUNK . '/gulliver/methods/defaultAjax.php';
|
||||
$this->expectOutputString('[]');
|
||||
|
||||
unlink($pathFileName);
|
||||
rmdir($pathName);
|
||||
}
|
||||
}
|
||||
263
tests/unit/workflow/engine/classes/DerivationTest.php
Normal file
263
tests/unit/workflow/engine/classes/DerivationTest.php
Normal file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes;
|
||||
|
||||
use Cases;
|
||||
use Derivation;
|
||||
use G;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use ProcessMaker\Model\Application;
|
||||
use ProcessMaker\Model\Delegation;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\Route;
|
||||
use ProcessMaker\Model\Task;
|
||||
use ProcessMaker\Model\TaskUser;
|
||||
use ProcessMaker\Model\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DerivationTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Call the setUp parent method
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
// Truncate the APP_SEQUENCE table
|
||||
DB::table('APP_SEQUENCE')->truncate();
|
||||
|
||||
config(["system.workspace" => "new_site"]);
|
||||
$workspace = config("system.workspace");
|
||||
|
||||
if (!file_exists(PATH_DB . $workspace)) {
|
||||
G::mk_dir(PATH_DB . $workspace);
|
||||
}
|
||||
|
||||
if (!file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
|
||||
$myfile = fopen(PATH_DB . $workspace . PATH_SEP . "db.php", "w");
|
||||
fwrite($myfile, "<?php
|
||||
define ('DB_ADAPTER', 'mysql' );
|
||||
define ('DB_HOST', '" . env('DB_HOST') . "' );
|
||||
define ('DB_NAME', '" . env('DB_DATABASE') . "' );
|
||||
define ('DB_USER', '" . env('DB_USERNAME') . "' );
|
||||
define ('DB_PASS', '" . env('DB_PASSWORD') . "' );
|
||||
define ('DB_RBAC_HOST', '" . env('DB_HOST') . "' );
|
||||
define ('DB_RBAC_NAME', '" . env('DB_DATABASE') . "' );
|
||||
define ('DB_RBAC_USER', '" . env('DB_USERNAME') . "' );
|
||||
define ('DB_RBAC_PASS', '" . env('DB_PASSWORD') . "' );
|
||||
define ('DB_REPORT_HOST', '" . env('DB_HOST') . "' );
|
||||
define ('DB_REPORT_NAME', '" . env('DB_DATABASE') . "' );
|
||||
define ('DB_REPORT_USER', '" . env('DB_USERNAME') . "' );
|
||||
define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call the tearDown method
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown(); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the getSubProcessVariables method with object variables
|
||||
*
|
||||
* @covers Derivation::getSubProcessVariables()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_sub_process_variables_method_with_object_variables()
|
||||
{
|
||||
$fields = ['@&var2' => '@&var3'];
|
||||
$childCaseData = ['var2' => (object)['Street' => 'test', 'name' => 'Something']];
|
||||
$parentCaseData = ['var1' => (object)['Street' => 'test']];
|
||||
|
||||
$der = new Derivation();
|
||||
$res = $der->getSubProcessVariables($fields, $childCaseData, $parentCaseData);
|
||||
|
||||
$this->assertArrayHasKey('var3', $res);
|
||||
$this->assertObjectHasAttribute('Street', $res['var3']);
|
||||
$this->assertObjectHasAttribute('name', $res['var3']);
|
||||
$this->assertEquals($res['var3'], (object)['Street' => 'test', 'name' => 'Something']);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the getSubProcessVariables method with origin labels
|
||||
*
|
||||
* @covers Derivation::getSubProcessVariables()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_sub_process_variables_method_with_origin_labels()
|
||||
{
|
||||
$fields = ['@&var2' => '@&var3', '@&var2_label' => '@&var3'];
|
||||
$childCaseData = [
|
||||
'var2' => (object)['Street' => 'test', 'name' => 'Something'],
|
||||
'var2_label' => ['Street' => 'test', 'name' => 'Something']
|
||||
];
|
||||
$parentCaseData = ['var1' => (object)['Street' => 'test']];
|
||||
|
||||
$der = new Derivation();
|
||||
$res = $der->getSubProcessVariables($fields, $childCaseData, $parentCaseData);
|
||||
|
||||
$this->assertArrayHasKey('var3_label', $res);
|
||||
$this->assertEquals($res['var3_label'], ['Street' => 'test', 'name' => 'Something']);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the getSubProcessVariables method with target labels
|
||||
*
|
||||
* @covers Derivation::getSubProcessVariables()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_sub_process_variables_method_with_target_labels()
|
||||
{
|
||||
$fields = ['@&var2' => '@&var3', '@&var2' => '@&var3_label'];
|
||||
$childCaseData = ['var2' => (object)['Street' => 'test', 'name' => 'Something']];
|
||||
$parentCaseData = ['var1' => (object)['Street' => 'test']];
|
||||
|
||||
$der = new Derivation();
|
||||
$res = $der->getSubProcessVariables($fields, $childCaseData, $parentCaseData);
|
||||
|
||||
$this->assertArrayHasKey('var3_label', $res);
|
||||
$this->assertObjectHasAttribute('Street', $res['var3_label']);
|
||||
$this->assertObjectHasAttribute('name', $res['var3_label']);
|
||||
$this->assertEquals($res['var3_label'], (object)['Street' => 'test', 'name' => 'Something']);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the doDerivation method sending variables synchronously
|
||||
*
|
||||
* @covers Derivation::doDerivation()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_do_derivation_method_sending_variables_synchronously()
|
||||
{
|
||||
// Create the models
|
||||
$user = factory(User::class)->create();
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user->USR_UID
|
||||
]);
|
||||
$task = factory(Task::class)->create([
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
]);
|
||||
$application = factory(Application::class)->create();
|
||||
$appDelegation = factory(Delegation::class)->create();
|
||||
|
||||
// Create the parameters
|
||||
$currentDelegation = [
|
||||
'APP_UID' => $application->APP_UID,
|
||||
'DEL_INDEX' => $appDelegation->DEL_INDEX,
|
||||
'ROU_TYPE' => ''
|
||||
];
|
||||
$nextDel = [
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'USR_UID' => $user->USR_UID,
|
||||
'DEL_PRIORITY' => $appDelegation->DEL_PRIORITY,
|
||||
'TAS_ASSIGN_TYPE' => $task->TAS_ASSIGN_TYPE,
|
||||
'TAS_ID' => $task->TAS_ID
|
||||
];
|
||||
$appFields = [
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
'DEL_THREAD' => $appDelegation->DEL_THREAD,
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'APP_DATA' => [],
|
||||
'APP_TITLE' => $application->APP_TITLE,
|
||||
'APP_UID' => $application->APP_UID
|
||||
];
|
||||
$sp = [
|
||||
'SP_VARIABLES_OUT' => 'a:1:{s:6:"@&var1";s:6:"@&var2";}',
|
||||
'SP_VARIABLES_IN' => 'a:1:{s:6:"@&var2";s:6:"@&var3";}',
|
||||
'SP_SYNCHRONOUS' => '1',
|
||||
'SP_TYPE' => '',
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'USR_UID' => $user->USR_UID,
|
||||
];
|
||||
|
||||
// Create the Derivation object
|
||||
$der = new Derivation();
|
||||
$der->case = new Cases;
|
||||
|
||||
// Call the doDerivation method
|
||||
$res = $der->doDerivation($currentDelegation, $nextDel, $appFields, $sp);
|
||||
|
||||
// Assert the new delegation index is 1
|
||||
$this->assertEquals(1, $res);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the doDerivation method sending variables asynchronously
|
||||
*
|
||||
* @covers Derivation::doDerivation()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_do_derivation_method_sending_variables_asynchronously()
|
||||
{
|
||||
// Create the models
|
||||
$user = factory(User::class)->create();
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user->USR_UID
|
||||
]);
|
||||
$task = factory(Task::class)->create([
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'TAS_USER' => $user->USR_UID
|
||||
]);
|
||||
factory(TaskUser::class)->create([
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'USR_UID' => $user->USR_UID,
|
||||
]);
|
||||
$application = factory(Application::class)->create();
|
||||
$appDelegation = factory(Delegation::class)->create([
|
||||
'TAS_UID' => $task->TAS_UID
|
||||
]);
|
||||
factory(Route::class)->create([
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'ROU_NEXT_TASK' => $task->TAS_UID,
|
||||
'PRO_UID' => $process->PRO_UID
|
||||
]);
|
||||
|
||||
// Create the parameters
|
||||
$currentDelegation = [
|
||||
'APP_UID' => $application->APP_UID,
|
||||
'DEL_INDEX' => $appDelegation->DEL_INDEX,
|
||||
'ROU_TYPE' => '',
|
||||
'TAS_UID' => $task->TAS_UID
|
||||
];
|
||||
$nextDel = [
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'USR_UID' => $user->USR_UID,
|
||||
'DEL_PRIORITY' => $appDelegation->DEL_PRIORITY,
|
||||
'TAS_ASSIGN_TYPE' => $task->TAS_ASSIGN_TYPE,
|
||||
'TAS_ID' => $task->TAS_ID
|
||||
];
|
||||
$appFields = [
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
'DEL_THREAD' => $appDelegation->DEL_THREAD,
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'APP_DATA' => [],
|
||||
'APP_TITLE' => $application->APP_TITLE,
|
||||
'APP_UID' => $application->APP_UID
|
||||
];
|
||||
$sp = [
|
||||
'SP_VARIABLES_OUT' => 'a:1:{s:6:"@&var1";s:6:"@&var2";}',
|
||||
'SP_VARIABLES_IN' => 'a:1:{s:6:"@&var2";s:6:"@&var3";}',
|
||||
'SP_SYNCHRONOUS' => '0',
|
||||
'SP_TYPE' => '',
|
||||
'TAS_UID' => $task->TAS_UID,
|
||||
'USR_UID' => $user->USR_UID,
|
||||
];
|
||||
|
||||
// Create the Derivation object
|
||||
$der = new Derivation();
|
||||
$der->case = new Cases;
|
||||
|
||||
// Call the doDerivation method
|
||||
$res = $der->doDerivation($currentDelegation, $nextDel, $appFields, $sp);
|
||||
|
||||
// Assert the new delegation index is 1
|
||||
$this->assertEquals(1, $res);
|
||||
}
|
||||
}
|
||||
@@ -885,4 +885,81 @@ class PmDynaformTest extends TestCase
|
||||
$labelsPo = $pmDynaform->getLabelsPo($faker->sentence(1));
|
||||
$this->assertNull($labelsPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the SQL that uses the SELECT statement is parsed correctly
|
||||
*
|
||||
* @covers PmDynaform::sqlParse()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_sql_parsed_select_statement()
|
||||
{
|
||||
// Note.- The following queries are used by running tests but none of them are valid
|
||||
$sqlOriginal1 = 'SELECT TOP 10 USERS.USR_UID, USERS.USR_ID, USERS.USR_USERNAME AS USERNAME, MAX(RBAC_USERS_ROLES.ROL_UID),
|
||||
MIN(RBAC_USERS_ROLES.ROL_UID) AS THEMIN, (SELECT USR_FIRSTNAME FROM USERS), (SELECT USR_LASTNAME AS XXX) AS YYY, <>, 1000
|
||||
FROM USERS AS OFFSET INNER JOIN RBAC_USERS ON USERS.USR_UID = RBAC_USERS.USR_UID INNER JOIN RBAC_USERS_ROLES ON
|
||||
USERS.USR_UID = RBAC_USERS_ROLES.USR_UID WHERE USERS.USR_UID <> "" AND 1 AND OFFSET 1 GROUP BY USERS.USR_UID HAVING
|
||||
USERS.USR_UID <> "" ORDER BY USERS.USR_ID DESC LIMIT 1 OFFSET 10 FOR UPDATE';
|
||||
|
||||
$sqlOriginal2 = 'SELECT TOP 10 USERS.USR_UID, USERS.USR_ID, USERS.USR_USERNAME AS USERNAME, MAX(RBAC_USERS_ROLES.ROL_UID),
|
||||
MIN(RBAC_USERS_ROLES.ROL_UID) AS THEMIN, (SELECT USR_FIRSTNAME FROM USERS), (SELECT USR_LASTNAME AS XXX) AS YYY, <>, 1000
|
||||
FROM USERS INNER JOIN RBAC_USERS ON USERS.USR_UID = RBAC_USERS.USR_UID INNER JOIN RBAC_USERS_ROLES ON
|
||||
USERS.USR_UID = RBAC_USERS_ROLES.USR_UID WHERE USERS.USR_UID <> "" AND 1 GROUP BY USERS.USR_UID HAVING
|
||||
USERS.USR_UID <> "" ORDER BY USERS.USR_ID DESC LIMIT 1, 10 FOR UPDATE';
|
||||
|
||||
$sqlOriginal3 = 'DUMMY';
|
||||
|
||||
// Instance the class PmDynaform
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
|
||||
// Test bug PMC-1299
|
||||
$sqlParsed1 = $pmDynaform->sqlParse($sqlOriginal1);
|
||||
$this->assertFalse(strpos($sqlParsed1, 'INNER INNER'));
|
||||
|
||||
// For now is only used for complete the coverture
|
||||
$sqlParsed2 = $pmDynaform->sqlParse($sqlOriginal2, 'dummy_function_for_this_unit_test');
|
||||
// To Do: Currently, there is a coverture of 100%, but is necessary to add more tests to verify
|
||||
// if the SQL string is parsed correctly in more scenarios
|
||||
|
||||
// Test another string, shoul be return the same value
|
||||
$sqlParsed3 = $pmDynaform->sqlParse($sqlOriginal3);
|
||||
$this->assertEquals($sqlOriginal3, $sqlParsed3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the SQL that uses the CALL statement is parsed correctly
|
||||
*
|
||||
* @covers PmDynaform::sqlParse()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_sql_parsed_call_statement()
|
||||
{
|
||||
$sqlOriginal = 'CALL dummy_sp_for_this_unit_test()';
|
||||
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$sqlParsed = $pmDynaform->sqlParse($sqlOriginal);
|
||||
|
||||
$this->assertEquals(strlen($sqlOriginal), strlen($sqlParsed));
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the SQL that uses the EXECUTE statement is parsed correctly
|
||||
*
|
||||
* @covers PmDynaform::sqlParse()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_sql_parsed_execute_statement()
|
||||
{
|
||||
$sqlOriginal = 'EXECUTE dummy_sp_for_this_unit_test()';
|
||||
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$sqlParsed = $pmDynaform->sqlParse($sqlOriginal);
|
||||
|
||||
$this->assertEquals(strlen($sqlOriginal), strlen($sqlParsed));
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy function used for the coverture
|
||||
function dummy_function_for_this_unit_test()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,7 +65,8 @@ class ExecuteQueryTest extends TestCase
|
||||
});
|
||||
$expected = $user->toArray();
|
||||
|
||||
$sql = "SELECT "
|
||||
foreach ($expected as $value) {
|
||||
$sql = "SELECT "
|
||||
. "USR_UID ,"
|
||||
. "USR_USERNAME ,"
|
||||
. "USR_PASSWORD ,"
|
||||
@@ -74,15 +75,16 @@ class ExecuteQueryTest extends TestCase
|
||||
. "USR_EMAIL "
|
||||
. "FROM USERS "
|
||||
. "WHERE "
|
||||
. "USR_UID NOT IN ("
|
||||
. " '00000000000000000000000000000001',"
|
||||
. " '00000000000000000000000000000002'"
|
||||
. ")"
|
||||
. "USR_UID = '" . $value['USR_UID'] . "'"
|
||||
. "ORDER BY USR_UID DESC";
|
||||
$actual = executeQuery($sql);
|
||||
$actual = array_values($actual);
|
||||
$actual = executeQuery($sql);
|
||||
|
||||
$actual = array_values($actual);
|
||||
|
||||
$this->assertEquals($value, head($actual));
|
||||
}
|
||||
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
28
tests/unit/workflow/engine/classes/PmTableTest.php
Normal file
28
tests/unit/workflow/engine/classes/PmTableTest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class PmTablesTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Check if the "removePmtPropelFolder" is working correctly
|
||||
*
|
||||
* @covers PmTable::removePmtPropelFolder()
|
||||
*
|
||||
* @test
|
||||
*/
|
||||
public function it_should_check_remove_pmt_propel_folder()
|
||||
{
|
||||
// Define the folder path
|
||||
$pmtPropelFolderPath = PATH_DB . config('system.workspace') . PATH_SEP . 'pmt-propel';
|
||||
|
||||
// Create the folder
|
||||
G::mk_dir($pmtPropelFolderPath);
|
||||
|
||||
// Remove the "pmt-propel" folder
|
||||
PmTable::removePmtPropelFolder();
|
||||
|
||||
// Assert that the folder was deleted correctly
|
||||
$this->assertFalse(is_dir($pmtPropelFolderPath));
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ use Tests\TestCase;
|
||||
|
||||
class ProcessesTest extends TestCase
|
||||
{
|
||||
private $processes;
|
||||
|
||||
/**
|
||||
* Constructor of the class.
|
||||
@@ -33,6 +34,7 @@ class ProcessesTest extends TestCase
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->processes = new Processes();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,7 +156,7 @@ class ProcessesTest extends TestCase
|
||||
* This checks fi the returned output documents are correct with the differect
|
||||
* parameters.
|
||||
* @test
|
||||
* @covers Processes::getOutputRows()
|
||||
* @covers \Processes::getOutputRows()
|
||||
*/
|
||||
public function it_should_return_output_documents()
|
||||
{
|
||||
@@ -205,7 +207,7 @@ class ProcessesTest extends TestCase
|
||||
/**
|
||||
* This checks if the dynaforms structure is saved with the different parameters.
|
||||
* @test
|
||||
* @covers Processes::createDynaformRows()
|
||||
* @covers \Processes::createDynaformRows()
|
||||
*/
|
||||
public function it_sholud_create_dynaform()
|
||||
{
|
||||
@@ -269,7 +271,7 @@ class ProcessesTest extends TestCase
|
||||
* This checks if the input documents structure is saved with the different
|
||||
* parameters.
|
||||
* @test
|
||||
* @covers Processes::createInputRows()
|
||||
* @covers \Processes::createInputRows()
|
||||
*/
|
||||
public function it_should_create_input_document()
|
||||
{
|
||||
@@ -339,7 +341,7 @@ class ProcessesTest extends TestCase
|
||||
* This checks if the output documents structure is saved with the different
|
||||
* parameters.
|
||||
* @test
|
||||
* @covers Processes::createOutputRows()
|
||||
* @covers \Processes::createOutputRows()
|
||||
*/
|
||||
public function it_should_create_output_document()
|
||||
{
|
||||
@@ -432,7 +434,7 @@ class ProcessesTest extends TestCase
|
||||
/**
|
||||
* This gets the data structure of a project.
|
||||
* @test
|
||||
* @covers Processes::getWorkflowData()
|
||||
* @covers \Processes::getWorkflowData()
|
||||
*/
|
||||
public function it_should_get_workflow_data()
|
||||
{
|
||||
@@ -459,4 +461,40 @@ class ProcessesTest extends TestCase
|
||||
$result = $processes->getWorkflowData($process->PRO_UID);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This test guarantees the replacement of new identifiers.
|
||||
* @test
|
||||
* @covers \Processes::renewAllDynaformGuid()
|
||||
*/
|
||||
public function it_should_renew_all_dynaform_guid()
|
||||
{
|
||||
$pathData = PATH_TRUNK . "/tests/resources/dynaformDataForRenewUids.json";
|
||||
$data = file_get_contents($pathData);
|
||||
$result = json_decode($data, JSON_OBJECT_AS_ARRAY);
|
||||
$result = (object) $result;
|
||||
$this->processes->renewAllDynaformGuid($result);
|
||||
foreach ($result as $key => $value) {
|
||||
$this->assertObjectHasAttribute($key, $result);
|
||||
}
|
||||
|
||||
//without PRO_DYNAFORMS
|
||||
$result = json_decode($data, JSON_OBJECT_AS_ARRAY);
|
||||
$result = (object) $result;
|
||||
unset($result->process['PRO_DYNAFORMS']);
|
||||
$this->processes->renewAllDynaformGuid($result);
|
||||
foreach ($result as $key => $value) {
|
||||
$this->assertObjectHasAttribute($key, $result);
|
||||
}
|
||||
|
||||
//for process inside PRO_DYNAFORMS
|
||||
$result = json_decode($data, JSON_OBJECT_AS_ARRAY);
|
||||
$result = (object) $result;
|
||||
$result->process['PRO_DYNAFORMS'] = [];
|
||||
$result->process['PRO_DYNAFORMS']['PROCESS'] = $result->dynaforms[0]['DYN_UID'];
|
||||
$this->processes->renewAllDynaformGuid($result);
|
||||
foreach ($result as $key => $value) {
|
||||
$this->assertObjectHasAttribute($key, $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,9 @@ class DesignerTest extends TestCase
|
||||
);
|
||||
|
||||
//Start the session for the user logged
|
||||
session_start();
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$_SESSION['CASE'] = $application->APP_NUMBER;
|
||||
$_SESSION['PIN'] = "LJ5W";
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\methods\cases;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use ProcessMaker\Model\User;
|
||||
use RBAC;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
||||
class ProxyNewCasesListTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* This sets the initial parameters for each test.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
$this->settingUserLogged();
|
||||
}
|
||||
|
||||
/**
|
||||
* This starts a valid user in session with the appropriate permissions.
|
||||
* @global object $RBAC
|
||||
*/
|
||||
private function settingUserLogged()
|
||||
{
|
||||
global $RBAC;
|
||||
|
||||
$user = User::where('USR_ID', '=', 1)
|
||||
->get()
|
||||
->first();
|
||||
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
$RBAC->loadUserRolePermission('PROCESSMAKER', $_SESSION['USER_LOGGED']);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the result contains an error
|
||||
*
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_there_is_an_error_in_the_proxy_new_cases_list_file()
|
||||
{
|
||||
//Turn on output buffering
|
||||
ob_start();
|
||||
|
||||
//Call the tested file
|
||||
require_once PATH_METHODS . 'cases/proxyNewCasesList.php';
|
||||
|
||||
//Return the contents of the output buffer
|
||||
$outputBuffer = ob_get_contents();
|
||||
//Clean the output buffer and turn off output buffering
|
||||
ob_end_clean();
|
||||
|
||||
// This asserts there is an error in the output
|
||||
$this->assertEquals('{"error":"ID_ACCESS_DENIED"}', $outputBuffer);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the result contains an empty "search" field
|
||||
*
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_response_of_the_proxy_new_cases_list_file()
|
||||
{
|
||||
$_REQUEST["paged"] = '';
|
||||
$_REQUEST['count'] = '';
|
||||
$_REQUEST["category"] = '';
|
||||
$_REQUEST["process"] = '';
|
||||
$_REQUEST["search"] = 'fsfaefwa';
|
||||
$_REQUEST["filter"] = '';
|
||||
$_REQUEST["dateFrom"] = '';
|
||||
$_REQUEST["dateTo"] = '';
|
||||
$_REQUEST["start"] = '';
|
||||
$_REQUEST["limit"] = '';
|
||||
$_REQUEST['sort'] = 'ASC';
|
||||
$_REQUEST["dir"] = '';
|
||||
$_REQUEST["action"] = 'todo';
|
||||
$_REQUEST["user"] = '';
|
||||
$_REQUEST["list"] = 'inbox';
|
||||
$_REQUEST["filterStatus"] = '';
|
||||
$_REQUEST['openApplicationUid'] = '';
|
||||
|
||||
//Turn on output buffering
|
||||
ob_start();
|
||||
|
||||
//Call the tested file
|
||||
require_once PATH_METHODS . 'cases/proxyNewCasesList.php';
|
||||
|
||||
//Return the contents of the output buffer
|
||||
$outputBuffer = ob_get_contents();
|
||||
|
||||
//Clean the output buffer and turn off output buffering
|
||||
ob_end_clean();
|
||||
|
||||
$result = json_decode($outputBuffer, true);
|
||||
|
||||
//This asserts that the search parameter has an empty value
|
||||
$this->assertEmpty($result['filters']['search']);
|
||||
}
|
||||
}
|
||||
74
tests/unit/workflow/engine/methods/groups/GroupsAjaxTest.php
Normal file
74
tests/unit/workflow/engine/methods/groups/GroupsAjaxTest.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\methods\groups;
|
||||
|
||||
use Faker\Factory;
|
||||
use ProcessMaker\Model\Groupwf;
|
||||
use ProcessMaker\Model\User;
|
||||
use RBAC;
|
||||
use Tests\TestCase;
|
||||
|
||||
class GroupsAjaxTest extends TestCase
|
||||
{
|
||||
private $groups;
|
||||
|
||||
/**
|
||||
* Set up function
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->settingUserLogged();
|
||||
Groupwf::truncate();
|
||||
$this->createGroups();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create records in the GROUPSWF table
|
||||
*/
|
||||
private function createGroups()
|
||||
{
|
||||
$this->groups = factory(Groupwf::class, 10)->create();
|
||||
}
|
||||
|
||||
/**
|
||||
* This starts a valid user in session with the appropriate permissions.
|
||||
* @global object $RBAC
|
||||
*/
|
||||
private function settingUserLogged()
|
||||
{
|
||||
global $RBAC;
|
||||
|
||||
$user = User::where('USR_ID', '=', 1)
|
||||
->get()
|
||||
->first();
|
||||
|
||||
$_SESSION['USER_LOGGED'] = $user['USR_UID'];
|
||||
|
||||
$RBAC = RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$RBAC->initRBAC();
|
||||
$RBAC->loadUserRolePermission('PROCESSMAKER', $_SESSION['USER_LOGGED']);
|
||||
}
|
||||
|
||||
/**
|
||||
* This tests the answer of the option groupsList.
|
||||
* @test
|
||||
*/
|
||||
public function it_should_return_option_groups_list()
|
||||
{
|
||||
global $RBAC;
|
||||
$_POST['action'] = 'groupsList';
|
||||
|
||||
$fileName = PATH_METHODS . 'groups/groups_Ajax.php';
|
||||
|
||||
ob_start();
|
||||
require_once $fileName;
|
||||
$content = ob_get_clean();
|
||||
$content = json_decode($content, JSON_OBJECT_AS_ARRAY);
|
||||
|
||||
$this->assertArrayHasKey("success", $content);
|
||||
$this->assertArrayHasKey("groups", $content);
|
||||
$this->assertTrue($content["success"]);
|
||||
$this->assertTrue(is_array($content["groups"]));
|
||||
}
|
||||
}
|
||||
@@ -62,13 +62,16 @@ class SkinsTest extends TestCase
|
||||
*/
|
||||
public function testGetSkinsCurrentWorkspace()
|
||||
{
|
||||
$this->object->createSkin('test2', 'test2', 'description skin', config("system.workspace"));
|
||||
$skins = $this->object->getSkins();
|
||||
$this->assertCount(3, $skins);
|
||||
$this->assertEquals('test2', $skins[2]['SKIN_FOLDER_ID']);
|
||||
$this->object->createSkin('test', 'test', 'description skin', config("system.workspace"));
|
||||
$this->object->createSkin('test', 'test');
|
||||
$this->object->createSkin('test2', 'test2', 'Second skin', 'ProcessMaker Team', 'current', 'neoclassic');
|
||||
$skins = $this->object->getSkins();
|
||||
$skins = collect($skins)
|
||||
->sortBy('SKIN_FOLDER_ID')
|
||||
->values()
|
||||
->toArray();
|
||||
$this->assertCount(4, $skins);
|
||||
$this->assertEquals('test2', $skins[3]['SKIN_FOLDER_ID']);
|
||||
$this->assertEquals($skins[2]['SKIN_FOLDER_ID'], 'test');
|
||||
$this->assertEquals($skins[3]['SKIN_FOLDER_ID'], 'test2');
|
||||
$this->assertEquals($skins[3]['SKIN_WORKSPACE'], config("system.workspace"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Importer;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use ProcessMaker\Importer\Importer;
|
||||
use ProcessMaker\Model\BpmnProject;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\User;
|
||||
use ReflectionClass;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -292,6 +294,7 @@ define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||
// Mock the load method
|
||||
$importer->method("load")
|
||||
->willReturn($array);
|
||||
$importer->setData("usr_uid", factory(User::class)->create()->USR_UID);
|
||||
|
||||
// Call the import method
|
||||
$res = $importer->import(Importer::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW,
|
||||
@@ -303,7 +306,9 @@ define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||
$result = $query->get()->values()->toArray();
|
||||
|
||||
// Assert the created date is the same as the updated date
|
||||
$this->assertEquals($result[0]['PRO_CREATE_DATE'], $result[0]['PRO_UPDATE_DATE']);
|
||||
$createDate = Carbon::createFromTimeString($result[0]['PRO_CREATE_DATE'])->format("Y-m-d");
|
||||
$updateDate = Carbon::createFromTimeString($result[0]['PRO_UPDATE_DATE'])->format("Y-m-d");
|
||||
$this->assertEquals($createDate, $updateDate);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,6 +546,7 @@ define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||
// Mock the load method
|
||||
$importer->method("load")
|
||||
->willReturn($array);
|
||||
$importer->setData("usr_uid", factory(User::class)->create()->USR_UID);
|
||||
|
||||
// Call the setProtectedProperty method
|
||||
$this->setProtectedProperty($importer, 'metadata', ['uid' => $process['PRO_UID']]);
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Project;
|
||||
|
||||
use Exception;
|
||||
use Faker\Factory;
|
||||
use G;
|
||||
use ProcessMaker\Model\Dynaform;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\WebEntry;
|
||||
use ProcessMaker\Project\Workflow;
|
||||
use Tests\TestCase;
|
||||
|
||||
class WorkflowTest extends TestCase
|
||||
{
|
||||
private $workflow;
|
||||
private $directories;
|
||||
private $files;
|
||||
private $faker;
|
||||
|
||||
/**
|
||||
* This method sets the values before starting any test.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->workflow = new Workflow();
|
||||
$this->directories = [];
|
||||
$this->files = [];
|
||||
$this->faker = Factory::create();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is executed after each test.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
foreach ($this->files as $value) {
|
||||
unlink($value);
|
||||
}
|
||||
foreach ($this->directories as $value) {
|
||||
rmdir($value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This test ensures that the getData method returns the correct data.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Workflow::getData()
|
||||
*/
|
||||
public function it_should_return_the_data_when_the_project_id_is_valid()
|
||||
{
|
||||
$process = factory(Process::class)->create();
|
||||
$dynaforms = factory(Dynaform::class, 5)->create([
|
||||
'PRO_UID' => $process->PRO_UID
|
||||
]);
|
||||
factory(WebEntry::class, 5)->create([
|
||||
'PRO_UID' => $process->PRO_UID
|
||||
]);
|
||||
|
||||
$directory = PATH_DYNAFORM . $process->PRO_UID . "/";
|
||||
$this->directories[] = $directory;
|
||||
mkdir($directory);
|
||||
foreach ($dynaforms as $dynaform) {
|
||||
Dynaform::where('PRO_UID', $process->PRO_UID)
|
||||
->where('DYN_UID', $dynaform->DYN_UID)
|
||||
->update(['DYN_FILENAME' => $process->PRO_UID . '/' . $dynaform->DYN_UID]);
|
||||
|
||||
$dynUid = $dynaform->DYN_UID;
|
||||
$data = '';
|
||||
$filename = $directory . $dynUid . ".xml";
|
||||
$this->files[] = $filename;
|
||||
file_put_contents($filename, $data);
|
||||
|
||||
$filename = $directory . $dynUid . ".html";
|
||||
$this->files[] = $filename;
|
||||
file_put_contents($filename, $data);
|
||||
}
|
||||
|
||||
//template
|
||||
$directory = PATH_DATA_MAILTEMPLATES . $process->PRO_UID;
|
||||
$this->directories[] = $directory;
|
||||
mkdir($directory);
|
||||
|
||||
$filename = $directory . "/test.html";
|
||||
$this->files[] = $filename;
|
||||
file_put_contents($filename, '');
|
||||
|
||||
//public files
|
||||
$directory = PATH_DATA_PUBLIC . $process->PRO_UID;
|
||||
$this->directories[] = $directory;
|
||||
mkdir($directory);
|
||||
|
||||
$filename = $directory . "/wsClient.php";
|
||||
$this->files[] = $filename;
|
||||
file_put_contents($filename, '');
|
||||
|
||||
$actual = $this->workflow->getData($process->PRO_UID);
|
||||
|
||||
$this->assertCount(2, $actual);
|
||||
$this->assertArrayHasKey('process', $actual[0]);
|
||||
$this->assertArrayHasKey('DYNAFORMS', $actual[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* This test should throw an exception when the parameter is not correct.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Workflow::getData()
|
||||
*/
|
||||
public function it_should_throw_exception_when_get_data_is_failed()
|
||||
{
|
||||
$proUid = $this->faker->regexify("/[a-zA-Z]{32}/");
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$actual = $this->workflow->getData($proUid);
|
||||
}
|
||||
}
|
||||
2
thirdparty/pear/DB.php
vendored
2
thirdparty/pear/DB.php
vendored
@@ -610,7 +610,7 @@ class DB
|
||||
$parsed['dbsyntax'] = $str;
|
||||
}
|
||||
|
||||
if (!count($dsn)) {
|
||||
if (!is_string($dsn)) {
|
||||
return $parsed;
|
||||
}
|
||||
|
||||
|
||||
2
thirdparty/phing/types/Path.php
vendored
2
thirdparty/phing/types/Path.php
vendored
@@ -318,7 +318,7 @@ class Path extends DataType {
|
||||
try {
|
||||
$element .= self::resolveFile($project, $pathElement);
|
||||
} catch (BuildException $e) {
|
||||
$this->project->log("Dropping path element " . $pathElement
|
||||
self::$project->log("Dropping path element " . $pathElement
|
||||
. " as it is not valid relative to the project",
|
||||
PROJECT_MSG_VERBOSE);
|
||||
}
|
||||
|
||||
2
thirdparty/phing/util/StringHelper.php
vendored
2
thirdparty/phing/util/StringHelper.php
vendored
@@ -106,7 +106,7 @@ class StringHelper {
|
||||
* @return int
|
||||
*/
|
||||
public static function hashCode($string) {
|
||||
return $this->encryptCrc32($string);
|
||||
return self::encryptCrc32($string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
70
thirdparty/tcpdf/tcpdf.php
vendored
70
thirdparty/tcpdf/tcpdf.php
vendored
@@ -8301,9 +8301,6 @@ class TCPDF {
|
||||
$version = PHP_VERSION;
|
||||
define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
|
||||
}
|
||||
if (PHP_VERSION_ID < 50300) {
|
||||
@set_magic_quotes_runtime($mqr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21418,7 +21415,7 @@ class TCPDF {
|
||||
// define self-closing tags
|
||||
$selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta');
|
||||
// remove all unsupported tags (the line below lists all supported tags)
|
||||
$html = strip_tags($html, '<marker/><a><b><blockquote><body><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
|
||||
$html = strip_tags($html, '<marker><a><b><blockquote><body><br><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
|
||||
//replace some blank characters
|
||||
$html = preg_replace('/<pre/', '<xre', $html); // preserve pre tag
|
||||
$html = preg_replace('/<(table|tr|td|th|tcpdf|blockquote|dd|div|dl|dt|form|h1|h2|h3|h4|h5|h6|br|hr|li|ol|ul|p)([^\>]*)>[\n\r\t]+/', '<\\1\\2>', $html);
|
||||
@@ -22789,6 +22786,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
}
|
||||
global $spacew;
|
||||
while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) {
|
||||
$flagContinue = true;
|
||||
// check if we are inside a string section '[( ... )]'
|
||||
$stroffset = strpos($pmid, '[(', $offset);
|
||||
if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) {
|
||||
@@ -22853,7 +22851,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
// justify block
|
||||
if (!$this->empty_string($this->lispacer)) {
|
||||
$this->lispacer = '';
|
||||
continue;
|
||||
$flagContinue = false;
|
||||
break;
|
||||
}
|
||||
preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches);
|
||||
$currentxpos = $xmatches[1];
|
||||
@@ -22906,36 +22905,39 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// shift the annotations and links
|
||||
$cxpos = ($currentxpos / $this->k);
|
||||
$lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps);
|
||||
if ($this->inxobj) {
|
||||
// we are inside an XObject template
|
||||
foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) {
|
||||
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
||||
if ($cxpos > $lmpos) {
|
||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k);
|
||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
} else {
|
||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} elseif (isset($this->PageAnnots[$this->page])) {
|
||||
foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
|
||||
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
||||
if ($cxpos > $lmpos) {
|
||||
$this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k);
|
||||
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
} else {
|
||||
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($flagContinue) {
|
||||
// shift the annotations and links
|
||||
$cxpos = ($currentxpos / $this->k);
|
||||
$lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps);
|
||||
if ($this->inxobj) {
|
||||
// we are inside an XObject template
|
||||
foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) {
|
||||
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
||||
if ($cxpos > $lmpos) {
|
||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k);
|
||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
} else {
|
||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} elseif (isset($this->PageAnnots[$this->page])) {
|
||||
foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
|
||||
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
||||
if ($cxpos > $lmpos) {
|
||||
$this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k);
|
||||
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
} else {
|
||||
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of while
|
||||
}
|
||||
// end of while
|
||||
// remove markers
|
||||
$pmid = str_replace('x*#!#*x', '', $pmid);
|
||||
if ($this->isUnicodeFont()) {
|
||||
|
||||
@@ -24,12 +24,11 @@ use ProcessMaker\Core\JobsManager;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
$fn = '
|
||||
register_shutdown_function(function () {
|
||||
if (class_exists("Propel")) {
|
||||
Propel::close();
|
||||
}
|
||||
';
|
||||
register_shutdown_function(create_function('', $fn));
|
||||
});
|
||||
|
||||
ini_set('memory_limit', '512M');
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ class Cases
|
||||
public function array_key_intersect(&$a, &$b)
|
||||
{
|
||||
$array = array();
|
||||
while (list($key, $value) = each($a)) {
|
||||
foreach ($a as $key => $value) {
|
||||
if (isset($b[$key])) {
|
||||
if (is_object($b[$key]) && is_object($value)) {
|
||||
if (serialize($b[$key]) === serialize($value)) {
|
||||
@@ -1034,6 +1034,7 @@ class Cases
|
||||
public function removeCase($sAppUid, $deleteDelegation = true)
|
||||
{
|
||||
try {
|
||||
$appUidCopy = $sAppUid;
|
||||
$this->getExecuteTriggerProcess($sAppUid, 'DELETED');
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
@@ -1152,7 +1153,7 @@ class Cases
|
||||
|
||||
/** ProcessMaker log*/
|
||||
$context = Bootstrap::getDefaultContextLog();
|
||||
$context['appUid'] = $sAppUid;
|
||||
$context['appUid'] = $appUidCopy;
|
||||
$context['request'] = $nameFiles;
|
||||
Bootstrap::registerMonolog('DeleteCases', 200, 'Delete Case', $context);
|
||||
|
||||
|
||||
@@ -1334,8 +1334,8 @@ class Derivation
|
||||
$aOldFields = $this->case->loadCase( $aNewCase['APPLICATION'] );
|
||||
|
||||
foreach ($aFields as $sOriginField => $sTargetField) {
|
||||
$sOriginField = trim($sOriginField, " @#%?$=");
|
||||
$sTargetField = trim($sTargetField, " @#%?$=");
|
||||
$sOriginField = trim($sOriginField, " @#%?$=&");
|
||||
$sTargetField = trim($sTargetField, " @#%?$=&");
|
||||
|
||||
$aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';
|
||||
|
||||
@@ -1653,12 +1653,14 @@ class Derivation
|
||||
$originField = str_replace('?', '', $originField);
|
||||
$originField = str_replace('$', '', $originField);
|
||||
$originField = str_replace('=', '', $originField);
|
||||
$originField = str_replace('&', '', $originField);
|
||||
$targetField = str_replace('@', '', $targetField);
|
||||
$targetField = str_replace('#', '', $targetField);
|
||||
$targetField = str_replace('%', '', $targetField);
|
||||
$targetField = str_replace('?', '', $targetField);
|
||||
$targetField = str_replace('$', '', $targetField);
|
||||
$targetField = str_replace('=', '', $targetField);
|
||||
$targetField = str_replace('&', '', $targetField);
|
||||
$newFields[$targetField] = isset($childCaseData[$originField]) ? $childCaseData[$originField] : '';
|
||||
|
||||
if (array_key_exists($originField . '_label', $childCaseData)) {
|
||||
|
||||
@@ -357,6 +357,7 @@ class PmDynaform
|
||||
$option->value = isset($row[0]) ? $row[0] : "";
|
||||
$option->label = isset($row[1]) ? $row[1] : "";
|
||||
$json->optionsSql[] = $option;
|
||||
$json->queryOutputData[] = $option;
|
||||
}
|
||||
}
|
||||
if ($value === "suggest" && isset($json->queryField) && $json->queryField == true) {
|
||||
@@ -985,7 +986,7 @@ class PmDynaform
|
||||
}
|
||||
break;
|
||||
case "subquery":
|
||||
if (strpos($sAlias, $sBaseExpr, 0) != 0) {
|
||||
if (strpos($sAlias, $sBaseExpr, 0) !== 0) {
|
||||
$select .= $sAlias;
|
||||
} else {
|
||||
$select .= $sBaseExpr . " AS " . $sAlias;
|
||||
@@ -1023,7 +1024,7 @@ class PmDynaform
|
||||
. $dt[$key]["table"]
|
||||
. ($dt[$key]["table"] == $dt[$key]["alias"] ? "" : " " . $dt[$key]["alias"]) . " "
|
||||
. $dt[$key]["ref_type"] . " "
|
||||
. $dt[$key]["ref_clause"];
|
||||
. rtrim($dt[$key]["ref_clause"], " INNER");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,8 +166,14 @@ class PmLicenseManager
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists(PATH_DATA_SITE . "ee")) {
|
||||
$aPlugins = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
|
||||
$eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () {
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
return trim(file_get_contents(PATH_DATA_SITE . 'ee'));
|
||||
}
|
||||
return null;
|
||||
});
|
||||
if ($eeData) {
|
||||
$aPlugins = unserialize($eeData);
|
||||
$aDenied = [];
|
||||
foreach ($aPlugins as $aPlugin) {
|
||||
$sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-'));
|
||||
@@ -210,8 +216,14 @@ class PmLicenseManager
|
||||
$oPluginRegistry->savePlugin($oDetails->getNamespace());
|
||||
}
|
||||
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
$aPlugins = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
|
||||
$eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () {
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
return trim(file_get_contents(PATH_DATA_SITE . 'ee'));
|
||||
}
|
||||
return null;
|
||||
});
|
||||
if ($eeData) {
|
||||
$aPlugins = unserialize($eeData);
|
||||
|
||||
foreach ($aPlugins as $aPlugin) {
|
||||
$sClassName = substr($aPlugin ['sFilename'], 0, strpos($aPlugin ['sFilename'], '-'));
|
||||
|
||||
@@ -466,7 +466,7 @@ class PmTable
|
||||
}
|
||||
|
||||
if (empty($line)) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (strpos($line, "#") === 0) {
|
||||
@@ -474,7 +474,7 @@ class PmTable
|
||||
}
|
||||
|
||||
if (empty($line)) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
// Concatenate the previous line, if any, with the current
|
||||
@@ -487,7 +487,7 @@ class PmTable
|
||||
// with the next one, thus supporting multi-line statements.
|
||||
if (strrpos($line, ";") != strlen($line) - 1) {
|
||||
$previous = $line;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$line = substr($line, 0, strrpos($line, ";"));
|
||||
@@ -513,7 +513,7 @@ class PmTable
|
||||
}
|
||||
|
||||
if (empty($line)) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (strpos($line, "#") === 0) {
|
||||
@@ -521,7 +521,7 @@ class PmTable
|
||||
}
|
||||
|
||||
if (empty($line)) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
// Concatenate the previous line, if any, with the current
|
||||
@@ -534,13 +534,13 @@ class PmTable
|
||||
// with the next one, thus supporting multi-line statements.
|
||||
if (strrpos($line, ";") != strlen($line) - 1) {
|
||||
$previous = $line;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$line = substr($line, 0, strrpos($line, ";"));
|
||||
|
||||
if (strpos($line, $this->tableName) == false) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$auxCreate = explode('CREATE', $line);
|
||||
@@ -553,7 +553,7 @@ class PmTable
|
||||
case 'oracle':
|
||||
$line = trim($line); // Remove comments from the script
|
||||
if (empty($line)) {
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
switch (true) {
|
||||
case preg_match("/^CREATE TABLE\s/i", $line):
|
||||
@@ -1026,4 +1026,13 @@ class PmTable
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the folder "pmt-folder" and all the content inside
|
||||
*/
|
||||
public static function removePmtPropelFolder()
|
||||
{
|
||||
$pmtPropelFolder = PATH_DB . config('system.workspace') . PATH_SEP . 'pmt-propel';
|
||||
G::rm_dir($pmtPropelFolder);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,6 +729,7 @@ class ProcessMap
|
||||
$urlEdit = '';
|
||||
$linkEditValue = '';
|
||||
|
||||
$shouldItContinue = false;
|
||||
switch ($aRow['STEP_TYPE_OBJ']) {
|
||||
case 'DYNAFORM':
|
||||
$oDynaform = new Dynaform();
|
||||
@@ -748,7 +749,8 @@ class ProcessMap
|
||||
$oInputDocument = new InputDocument();
|
||||
$aFields = $oInputDocument->getByUid($aRow['STEP_UID_OBJ']);
|
||||
if ($aFields === false) {
|
||||
continue;
|
||||
$shouldItContinue = true;
|
||||
break;
|
||||
}
|
||||
$sTitle = $aFields['INP_DOC_TITLE'];
|
||||
break;
|
||||
@@ -757,7 +759,8 @@ class ProcessMap
|
||||
$aFields = $oOutputDocument->getByUid($aRow['STEP_UID_OBJ']);
|
||||
|
||||
if ($aFields === false) {
|
||||
continue;
|
||||
$shouldItContinue = true;
|
||||
break;
|
||||
}
|
||||
$sTitle = $aFields['OUT_DOC_TITLE'];
|
||||
break;
|
||||
@@ -777,6 +780,9 @@ class ProcessMap
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ($shouldItContinue === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$aSteps[] = array('STEP_TITLE' => $sTitle, 'STEP_UID' => $aRow['STEP_UID'], 'STEP_TYPE_OBJ' => $aRow['STEP_TYPE_OBJ'], 'STEP_MODE' => $aRow['STEP_MODE'], 'STEP_CONDITION' => $aRow['STEP_CONDITION'], 'STEP_POSITION' => $aRow['STEP_POSITION'], 'urlEdit' => $urlEdit, 'linkEditValue' => $linkEditValue, 'PRO_UID' => $aRow['PRO_UID']
|
||||
);
|
||||
|
||||
@@ -1017,6 +1017,9 @@ class Processes
|
||||
$map[$val['DYN_UID']] = $newGuid;
|
||||
$oData->dynaforms[$key]['DYN_UID'] = $newGuid;
|
||||
unset($oData->dynaforms[$key]['DYN_ID']);
|
||||
|
||||
//this is important when UID's is updated
|
||||
$oData->dynaforms[$key]['DYN_FILENAME'] = $oData->dynaforms[$key]['PRO_UID'] . "/" . $oData->dynaforms[$key]['DYN_UID'];
|
||||
}
|
||||
|
||||
$oData->uid["DYNAFORM"] = $map;
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
function __autoload($sClassName)
|
||||
{
|
||||
spl_autoload_register(function($sClassName) {
|
||||
if (!empty(config("system.workspace"))) {
|
||||
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
|
||||
if (file_exists($sPath . $sClassName . '.php')) {
|
||||
require_once $sPath . $sClassName . '.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!empty(config("system.workspace")) && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
|
||||
Bootstrap::setConstantsRelatedWs(config("system.workspace"));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
@@ -354,8 +355,14 @@ class AddonsStore extends BaseAddonsStore
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aPluginsPP = array();
|
||||
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
$aPluginsPP = unserialize(trim(file_get_contents(PATH_DATA_SITE . 'ee')));
|
||||
$eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () {
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
return trim(file_get_contents(PATH_DATA_SITE . 'ee'));
|
||||
}
|
||||
return null;
|
||||
});
|
||||
if ($eeData) {
|
||||
$aPluginsPP = unserialize($eeData);
|
||||
}
|
||||
|
||||
$pmLicenseManagerO = PmLicenseManager::getSingleton();
|
||||
|
||||
@@ -103,7 +103,7 @@ class Configuration extends BaseConfiguration
|
||||
public function exists($CfgUid, $ObjUid = "", $ProUid = "", $UsrUid = "", $AppUid = "")
|
||||
{
|
||||
$oRow = ConfigurationPeer::retrieveByPK( $CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid );
|
||||
return (( get_class ($oRow) == 'Configuration' )&&(!is_null($oRow)));
|
||||
return (!is_null($oRow) && get_class($oRow) === 'Configuration');
|
||||
}
|
||||
|
||||
public function getAll ()
|
||||
|
||||
@@ -237,7 +237,7 @@ class Translation extends BaseTranslation
|
||||
}
|
||||
|
||||
$res['cacheFileMafe'] = $cacheFileMafe;
|
||||
$res['languague'] = count($cacheFileMafe);
|
||||
$res['languague'] = (is_array($cacheFileMafe) || $cacheFileMafe instanceof Countable) ? count($cacheFileMafe) : 0;
|
||||
$res['rowsMafeJS'] = count( $translation );
|
||||
return $res;
|
||||
} catch (Exception $e) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -21662,8 +21662,8 @@ msgstr "Open SSL is optional"
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
||||
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
||||
msgid "PHP recommended version 7.1 or higher, PHP 7.2 is not yet supported"
|
||||
msgstr "PHP recommended version 7.1 or higher, PHP 7.2 is not yet supported"
|
||||
msgid "PHP recommended version 7.3, we maintain compatibility starting with PHP 7.1"
|
||||
msgstr "PHP recommended version 7.3, we maintain compatibility starting with PHP 7.1"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_SOAP
|
||||
|
||||
@@ -12,8 +12,8 @@ include PATH_LANGUAGECONT . "translation." . SYS_LANG;
|
||||
|
||||
class InstallerModule extends Controller
|
||||
{
|
||||
const PHP_VERSION_MINIMUM_SUPPORTED = '7.1';
|
||||
const PHP_VERSION_NOT_SUPPORTED = '7.2';
|
||||
const PHP_VERSION_MINIMUM_SUPPORTED = "7.1";
|
||||
const PHP_VERSION_NOT_SUPPORTED = "7.4";
|
||||
public $path_config;
|
||||
public $path_languages;
|
||||
public $path_plugins;
|
||||
|
||||
@@ -69,7 +69,7 @@ class Admin extends Controller
|
||||
|
||||
$this->setJSVar( 'CONFIG', $Config );
|
||||
$this->setJSVar( 'FORMATS', $c->getFormats() );
|
||||
$this->setJSVar( 'uxTypes', AdminProxy::getUxTypesList( 'list' ) );
|
||||
$this->setJSVar( 'uxTypes', adminProxy::getUxTypesList( 'list' ) );
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use ProcessMaker\Validation\ValidationUploadedFiles;
|
||||
@@ -232,7 +233,7 @@ class adminProxy extends HttpProxyController
|
||||
return array('success' => $success, 'users' => $usersAdmin);
|
||||
}
|
||||
|
||||
public function getUxTypesList($type = 'assoc')
|
||||
public static function getUxTypesList($type = 'assoc')
|
||||
{
|
||||
$list = array();
|
||||
|
||||
@@ -1500,8 +1501,14 @@ class adminProxy extends HttpProxyController
|
||||
//Installed Plugins (license info?)
|
||||
$arrayAddon = array();
|
||||
|
||||
if (file_exists(PATH_DATA_SITE . "ee")) {
|
||||
$arrayAddon = unserialize(trim(file_get_contents(PATH_DATA_SITE . "ee")));
|
||||
$eeData = Cache::get(config('system.workspace') . 'enterprise.ee', function () {
|
||||
if (file_exists(PATH_DATA_SITE . 'ee')) {
|
||||
return trim(file_get_contents(PATH_DATA_SITE . 'ee'));
|
||||
}
|
||||
return null;
|
||||
});
|
||||
if ($eeData) {
|
||||
$arrayAddon = unserialize($eeData);
|
||||
}
|
||||
|
||||
$plugins = array();
|
||||
|
||||
@@ -207,6 +207,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
public function save ($httpData, $alterTable = true)
|
||||
{
|
||||
try {
|
||||
// Remove temporary Propel folder used by Report Tables and PM Tables (Bug PMC-388)
|
||||
PmTable::removePmtPropelFolder();
|
||||
|
||||
$reportTable = new \ProcessMaker\BusinessModel\ReportTable();
|
||||
|
||||
return $reportTable->saveStructureOfTable((array)($httpData), $alterTable);
|
||||
@@ -816,6 +819,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
|
||||
fclose($f);
|
||||
|
||||
// Remove temporary Propel folder used by Report Tables and PM Tables (Bug PMC-388)
|
||||
PmTable::removePmtPropelFolder();
|
||||
|
||||
//First Validate the file
|
||||
$reportTable = new \ProcessMaker\BusinessModel\ReportTable();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
INSERT INTO USERS (USR_UID,USR_USERNAME,USR_PASSWORD,USR_FIRSTNAME,USR_LASTNAME,USR_EMAIL,USR_DUE_DATE,USR_CREATE_DATE,USR_UPDATE_DATE,USR_STATUS,USR_COUNTRY,USR_CITY,USR_LOCATION,USR_ADDRESS,USR_PHONE,USR_FAX,USR_CELLULAR,USR_ZIP_CODE,DEP_UID,USR_POSITION,USR_RESUME,USR_BIRTHDAY,USR_ROLE,USR_REPORTS_TO,USR_REPLACED_BY ) VALUES
|
||||
('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator',' ', 'admin@processmaker.com','2020-01-01','1999-11-30 00:00:00','2008-05-23 18:36:19','ACTIVE', 'US','FL','MMK','','', '1-305-402-0282','1-305-675-1400','','','Administrator', '','1999-02-25','PROCESSMAKER_ADMIN','',''),
|
||||
('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator',' ','admin@processmaker.com',DATE_ADD(curdate(), INTERVAL 1 YEAR),'1999-11-30 00:00:00','2008-05-23 18:36:19','ACTIVE', 'US','FL','MMK','','', '1-305-402-0282','1-305-675-1400','','','Administrator', '','1999-02-25','PROCESSMAKER_ADMIN','',''),
|
||||
('00000000000000000000000000000002','guest','674ba9750749d735ec9787d606170d78','Guest',' ', 'guest@processmaker.com','2030-01-01','2009-02-01 12:24:36','2009-02-01 12:24:36','INACTIVE', 'US','FL','MMK','','', '1-305-402-0282','1-305-675-1400','','','Guest', '','2009-02-01','PROCESSMAKER_GUEST','','');
|
||||
|
||||
INSERT INTO CONTENT (CON_CATEGORY,CON_PARENT,CON_ID,CON_LANG,CON_VALUE) VALUES
|
||||
@@ -60486,7 +60486,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
|
||||
|
||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_OPENSSL_OPTIONAL','en','Open SSL is optional','2014-01-15') ,
|
||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_PHP','en','PHP recommended version 7.1 or higher, PHP 7.2 is not yet supported','2018-06-13') ,
|
||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_PHP','en','PHP recommended version 7.3, we maintain compatibility starting with PHP 7.1','2019-12-02') ,
|
||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_SOAP','en','Soap Support','2014-01-15') ,
|
||||
( 'LABEL','ID_PROCESSMAKER_SLOGAN1','en','This Business Process is Powered By ProcessMaker','2014-01-15') ,
|
||||
( 'LABEL','ID_PROCESSMAKER_SUCCESS_INSTALLED','en','ProcessMaker was successfully installed<br/>Workspace <b>" {0} " </b> was installed correctly.','2014-01-15') ,
|
||||
|
||||
@@ -737,10 +737,12 @@ function sortContent()
|
||||
|
||||
function openPMFolder()
|
||||
{
|
||||
$oPMFolder = new AppFolder();
|
||||
$rootFolder = "/";
|
||||
$WIDTH_PANEL = 350;
|
||||
$folderContent = $oPMFolder->getFolderList($_POST ['folderID'] != '0' ?
|
||||
$_POST ['folderID'] == 'NA' ? "" : $_POST ['folderID'] : $rootFolder);
|
||||
//krumo($folderContent);
|
||||
|
||||
if (! is_array($folderContent)) {
|
||||
echo $folderContent;
|
||||
exit();
|
||||
@@ -750,51 +752,49 @@ function openPMFolder()
|
||||
$tree->name = 'DMS';
|
||||
$tree->nodeType = "blank";
|
||||
|
||||
//$tree->width="350px";
|
||||
$tree->value = '';
|
||||
$tree->showSign = false;
|
||||
|
||||
$i = 0;
|
||||
foreach ($folderContent as $key => $obj) {
|
||||
foreach ($folderContent['folders'] as $key => $obj) {
|
||||
$i ++;
|
||||
//if ($obj->item_type=="F") {
|
||||
|
||||
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
||||
$id_delete = G::LoadTranslation('ID_DELETE');
|
||||
$id_edit = G::LoadTranslation('ID_EDIT');
|
||||
|
||||
$htmlGroup = <<<GHTML
|
||||
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width="100%" class="pagedTable">
|
||||
<tr id="{$i}" onmouseout="setRowClass(this, '{$RowClass}')" onmouseover="setRowClass(this, 'RowPointer')"
|
||||
class="{$RowClass}" style="cursor:hand">
|
||||
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href="#"
|
||||
onclick="focusRow(this, 'Selected');openPMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');">
|
||||
<img src="/images/folderV2.gif" border = "0" valign="middle" /> {$obj['FOLDER_NAME']}</a>
|
||||
<a href="#" onclick="deletePMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');"> {$id_delete}</a>
|
||||
$htmlGroup = "
|
||||
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width=\"100%\" class=\"pagedTable\">
|
||||
<tr id=\"{$i}\" onmouseout=\"setRowClass(this, '{$RowClass}')\" onmouseover=\"setRowClass(this, 'RowPointer')\"
|
||||
class=\"{$RowClass}\" style=\"cursor:hand\">
|
||||
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href=\"#\"
|
||||
onclick=\"focusRow(this, 'Selected');openPMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');\">
|
||||
<img src=\"/images/folderV2.gif\" border = \"0\" valign=\"middle\" /> {$obj['FOLDER_NAME']}</a>
|
||||
<a href=\"#\" onclick=\"deletePMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');\"> {$id_delete}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="child_{$obj['FOLDER_UID']}"></div>
|
||||
GHTML;
|
||||
<div id=\"child_{$obj['FOLDER_UID']}\"></div>
|
||||
";
|
||||
|
||||
$ch = $tree->addChild ($key, $htmlGroup, array ('nodeType' => 'child'));
|
||||
$ch->point = ' ';
|
||||
}
|
||||
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
||||
$key = 0;
|
||||
if ($_POST ['folderID'] == '0') {
|
||||
$notInFolderLabel = G::LoadTranslation ('ID_NOT_IN_FOLDER');
|
||||
$htmlGroup = <<<GHTML
|
||||
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width="100%" class="pagedTable">
|
||||
<tr id="{$i}" onclick="focusRow(this, 'Selected');openPMFolder('NA');"
|
||||
onmouseout="setRowClass(this, '{$RowClass}')" onmouseover="setRowClass(this, 'RowPointer')" class="{$RowClass}">
|
||||
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href="#" onclick="">
|
||||
<img src="/images/folderV2.gif" border = "0" valign="middle" /> - {$notInFolderLabel} -</a> </td>
|
||||
}
|
||||
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
||||
$key = 0;
|
||||
if ($_POST ['folderID'] == '0') {
|
||||
$notInFolderLabel = G::LoadTranslation ('ID_NOT_IN_FOLDER');
|
||||
$htmlGroup = "
|
||||
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width=\"100%\" class=\"pagedTable\">
|
||||
<tr id=\"{$i}\" onclick=\"focusRow(this, 'Selected');openPMFolder('NA');\"
|
||||
onmouseout=\"setRowClass(this, '{$RowClass}')\" onmouseover=\"setRowClass(this, 'RowPointer')\" class=\"{$RowClass}\">
|
||||
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href=\"#\" onclick=\"\">
|
||||
<img src=\"/images/folderV2.gif\" border = \"0\" valign=\"middle\" /> - {$notInFolderLabel} -</a> </td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<div id="child_NA"></div>
|
||||
GHTML;
|
||||
<div id=\"child_NA\"></div>
|
||||
";
|
||||
|
||||
$ch = $tree->addChild($key, $htmlGroup, array('nodeType' => 'child'));
|
||||
$ch->point = ' ';
|
||||
|
||||
@@ -191,6 +191,7 @@ try {
|
||||
$response['filters'] = $filters;
|
||||
$response['totalCount'] = $list->getCountList($userUid, $filters);
|
||||
$response['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($result);
|
||||
!empty($response['filters']['search']) ? $response['filters']['search'] = '' : '';
|
||||
echo G::json_encode($response);
|
||||
} catch (Exception $e) {
|
||||
$msg = array("error" => $e->getMessage());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
@@ -207,15 +208,47 @@ class enterprisePlugin extends PMPlugin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registeres the plugin in the enterprise data
|
||||
* Note, this utilizes caching to reduce the burden of the file I/O on the ee file. However, this does
|
||||
* require caching to be enabled.
|
||||
*/
|
||||
public function registerEE($pluginFile, $pluginVersion)
|
||||
{
|
||||
if (file_exists(PATH_DATA_SITE . "ee")) {
|
||||
$this->systemAvailable = unserialize(trim(file_get_contents(PATH_DATA_SITE . "ee")));
|
||||
$cacheKey = config('system.workspace') . 'enterprise.ee';
|
||||
// Fetch the value from cache. If not present, fetch from the filesystem.
|
||||
$value = Cache::get($cacheKey, function () use($cacheKey) {
|
||||
if (file_exists(PATH_DATA_SITE . "ee")) {
|
||||
$contents = trim(file_get_contents(PATH_DATA_SITE . "ee"));
|
||||
// Store it in cache so it can be used in the future
|
||||
Cache::forever($cacheKey, $contents);
|
||||
return $contents;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
if ($value) {
|
||||
$this->systemAvailable = unserialize($value);
|
||||
} else {
|
||||
// Handle potential no value
|
||||
$this->systemAvailable = [];
|
||||
}
|
||||
|
||||
$this->systemAvailable[$pluginFile]["sFilename"] = $pluginFile . "-" . $pluginVersion . ".tar";
|
||||
file_put_contents(PATH_DATA_SITE . "ee", serialize($this->systemAvailable));
|
||||
$filename = $pluginFile . '-' . $pluginVersion . '.tar';
|
||||
|
||||
// Check to see if update is required
|
||||
if (
|
||||
!isset($this->systemAvailable[$pluginFile]) ||
|
||||
!isset($this->systemAvailable[$pluginFile]['sFilename']) ||
|
||||
$this->systemAvailable[$pluginFile]['sFilename'] != $filename
|
||||
) {
|
||||
// Update required
|
||||
$this->systemAvailable[$pluginFile]["sFilename"] = $filename;
|
||||
file_put_contents(PATH_DATA_SITE . "ee", serialize($this->systemAvailable));
|
||||
// Put in cache as well
|
||||
Cache::forever($cacheKey, serialize($this->systemAvailable));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,7 @@ switch ($_POST['action']) {
|
||||
$sortDir = isset($_REQUEST["dir"]) ? $_REQUEST["dir"] : "";
|
||||
|
||||
global $RBAC;
|
||||
if ($limit == $start) {
|
||||
$limit = $limit + $limit;
|
||||
}
|
||||
|
||||
$tasks = new TaskUser();
|
||||
$aTask = $tasks->getCountAllTaksByGroups();
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ try {
|
||||
if (\BpmnProject::exists($_GET["pro_uid"]) && isset($_GET['objects'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$_GET["objects"] = \G::json_decode($_GET['objects']);
|
||||
if (sizeof($_GET['objects']) == 0) {
|
||||
if (empty($_GET['objects'])) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
||||
$projectName = $exporter->getProjectName();
|
||||
|
||||
@@ -144,7 +144,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
|
||||
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
@@ -268,41 +268,44 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
try {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$objectsToImport = '';
|
||||
// only uploadFileNewProcessExist
|
||||
if (version_compare($data['version'], '3.0', '>') && isset($_POST['objectsToImport']) && $_POST['objectsToImport'] === '' && $_POST['IMPORT_OPTION']==="1") {
|
||||
$objectImport = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objectImport = $ids->getIdObjectList($objectImport);
|
||||
$granularImport = true;
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $objectImport,
|
||||
"project_type_aux" => ''
|
||||
);
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
}
|
||||
if (version_compare($data['version'], '3.0', '>')) {
|
||||
$dataObject = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$exportObjects = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$idObjectList = $exportObjects->getIdObjectList($dataObject);
|
||||
|
||||
if (version_compare($data['version'], '3.0', '>') && $_POST['IMPORT_OPTION']==="3") {
|
||||
$objectsToImport = [];
|
||||
$objects = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objects = $ids->getIdObjectList($objects);
|
||||
foreach ($objects as $object) {
|
||||
$objectsToImport[] = (object)array('id' => $object, 'action' => 'replace');
|
||||
// only uploadFileNewProcessExist
|
||||
if (isset($_POST['objectsToImport']) && $_POST['objectsToImport'] === '' && $_POST['IMPORT_OPTION'] === "1") {
|
||||
$granularImport = true;
|
||||
$result = [
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $idObjectList,
|
||||
"project_type_aux" => ''
|
||||
];
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
$actionImport = "merge";
|
||||
if ($_POST['IMPORT_OPTION'] === "3") {
|
||||
$actionImport = "replace";
|
||||
}
|
||||
|
||||
$objectsToImport = [];
|
||||
foreach ($idObjectList as $object) {
|
||||
$objectsToImport[] = (object) ['id' => $object, 'action' => $actionImport];
|
||||
}
|
||||
|
||||
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$prjUid = $importer->import($option, $optionGroup, false, $objectsToImport);
|
||||
|
||||
@@ -200,91 +200,83 @@ function newSkin ($baseSkin = 'classic')
|
||||
function importSkin ()
|
||||
{
|
||||
try {
|
||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
|
||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function ($validator) {
|
||||
throw new Exception($validator->getMessage());
|
||||
});
|
||||
if (! isset( $_FILES['uploadedFile'] )) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_FILE_REQUIRED' ) ));
|
||||
if (!isset($_FILES['uploadedFile'])) {
|
||||
throw (new Exception(G::LoadTranslation('ID_SKIN_FILE_REQUIRED')));
|
||||
}
|
||||
$uploadedInstances = count( $_FILES['uploadedFile']['name'] );
|
||||
$sw_error = false;
|
||||
$sw_error_exists = isset( $_FILES['uploadedFile']['error'] );
|
||||
$emptyInstances = 0;
|
||||
$quequeUpload = array ();
|
||||
|
||||
// upload files & check for errors
|
||||
$sw_error_exists = isset($_FILES['uploadedFile']['error']);
|
||||
|
||||
// Upload files & check for errors
|
||||
$tmp = $_FILES['uploadedFile']['tmp_name'];
|
||||
$items = stripslashes( $_FILES['uploadedFile']['name'] );
|
||||
$items = stripslashes($_FILES['uploadedFile']['name']);
|
||||
if ($sw_error_exists) {
|
||||
$up_err = $_FILES['uploadedFile']['error'];
|
||||
} else {
|
||||
$up_err = (file_exists( $tmp ) ? 0 : 4);
|
||||
$up_err = (file_exists($tmp) ? 0 : 4);
|
||||
}
|
||||
|
||||
if ($items == "" || $up_err == 4) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_FILE_REQUIRED' ) ));
|
||||
throw (new Exception(G::LoadTranslation('ID_SKIN_FILE_REQUIRED')));
|
||||
}
|
||||
if ($up_err == 1 || $up_err == 2) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_FILE_TOO_BIG' ) ));
|
||||
//$errors[$i]='miscfilesize';
|
||||
throw (new Exception(G::LoadTranslation('ID_FILE_TOO_BIG')));
|
||||
}
|
||||
if ($up_err == 3) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR' ) ));
|
||||
//$errors[$i]='miscfilepart';
|
||||
throw (new Exception(G::LoadTranslation('ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR')));
|
||||
}
|
||||
if (! @is_uploaded_file( $tmp )) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR' ) ));
|
||||
//$errors[$i]='uploadfile';
|
||||
if (!@is_uploaded_file($tmp)) {
|
||||
throw (new Exception(G::LoadTranslation('ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR')));
|
||||
}
|
||||
$fileInfo = pathinfo( $items );
|
||||
$validType = array ('tar','gz'
|
||||
);
|
||||
$fileInfo = pathinfo($items);
|
||||
$validType = ['tar', 'gz'];
|
||||
|
||||
if (! in_array( $fileInfo['extension'], $validType )) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_FILE_UPLOAD_INCORRECT_EXTENSION' ) ));
|
||||
//$errors[$i]='wrongtype';
|
||||
if (!in_array($fileInfo['extension'], $validType)) {
|
||||
throw (new Exception(G::LoadTranslation('ID_FILE_UPLOAD_INCORRECT_EXTENSION')));
|
||||
}
|
||||
|
||||
$filename = $items;
|
||||
$tempPath = PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP;
|
||||
G::verifyPath( $tempPath, true );
|
||||
G::verifyPath($tempPath, true);
|
||||
$tempName = $tmp;
|
||||
G::uploadFile( $tempName, $tempPath, $filename );
|
||||
G::uploadFile($tempName, $tempPath, $filename);
|
||||
|
||||
$tar = new Archive_Tar( $tempPath . $filename );
|
||||
$tar = new Archive_Tar($tempPath . $filename);
|
||||
$aFiles = $tar->listContent();
|
||||
$swConfigFile = false;
|
||||
|
||||
foreach ($aFiles as $key => $val) {
|
||||
if (basename( $val['filename'] ) == 'config.xml') {
|
||||
$skinName = dirname( $val['filename'] );
|
||||
$skinArray = explode( "/", $skinName );
|
||||
if (count( $skinArray ) == 1) {
|
||||
if (basename($val['filename']) == 'config.xml') {
|
||||
$skinName = dirname($val['filename']);
|
||||
$skinArray = explode("/", $skinName);
|
||||
if (count($skinArray) == 1) {
|
||||
$swConfigFile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $swConfigFile) {
|
||||
@unlink( PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename );
|
||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_CONFIGURATION_MISSING' ) ));
|
||||
if (!$swConfigFile) {
|
||||
@unlink(PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename);
|
||||
throw (new Exception(G::LoadTranslation('ID_SKIN_CONFIGURATION_MISSING')));
|
||||
}
|
||||
|
||||
if (is_dir( PATH_CUSTOM_SKINS . $skinName )) {
|
||||
if ((isset( $_REQUEST['overwrite_files'] )) && ($_REQUEST['overwrite_files'] == 'on')) {
|
||||
G::rm_dir( PATH_CUSTOM_SKINS . $skinName, false );
|
||||
if (is_dir(PATH_CUSTOM_SKINS . $skinName)) {
|
||||
if ((isset($_REQUEST['overwrite_files'])) && ($_REQUEST['overwrite_files'] == 'on')) {
|
||||
G::rm_dir(PATH_CUSTOM_SKINS . $skinName, false);
|
||||
} else {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_ALREADY_EXISTS' ) ));
|
||||
throw (new Exception(G::LoadTranslation('ID_SKIN_ALREADY_EXISTS')));
|
||||
}
|
||||
}
|
||||
$res = $tar->extract( PATH_CUSTOM_SKINS );
|
||||
if (! $res) {
|
||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_ERROR_EXTRACTING' ) ));
|
||||
$res = $tar->extract(PATH_CUSTOM_SKINS);
|
||||
if (!$res) {
|
||||
throw (new Exception(G::LoadTranslation('ID_SKIN_ERROR_EXTRACTING')));
|
||||
}
|
||||
|
||||
$configFileOriginal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
||||
$configFileFinal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
||||
$xmlConfiguration = file_get_contents( $configFileOriginal );
|
||||
$xmlConfiguration = file_get_contents($configFileOriginal);
|
||||
|
||||
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : config("system.workspace");
|
||||
|
||||
@@ -292,27 +284,27 @@ function importSkin ()
|
||||
$skinInformationArray = $xmlConfigurationObj->result["skinConfiguration"]["__CONTENT__"]["information"]["__CONTENT__"];
|
||||
|
||||
if (isset($skinInformationArray["workspace"]["__VALUE__"])) {
|
||||
$workspace = ($workspace != "" && !empty($skinInformationArray["workspace"]["__VALUE__"]))? $skinInformationArray["workspace"]["__VALUE__"] . "|" . $workspace : $workspace;
|
||||
$workspace = ($workspace != "" && !empty($skinInformationArray["workspace"]["__VALUE__"])) ? $skinInformationArray["workspace"]["__VALUE__"] . "|" . $workspace : $workspace;
|
||||
|
||||
$xmlConfiguration = preg_replace("/(<workspace>)(.*)(<\/workspace>)/i", "<workspace>" . $workspace . "</workspace><!-- $2 -->", $xmlConfiguration);
|
||||
} else {
|
||||
$xmlConfiguration = preg_replace("/(<name>)(.*)(<\/name>)/i", "<name>" . $skinName . "</name><!-- $2 -->\n<workspace>" . $workspace . "</workspace>", $xmlConfiguration);
|
||||
}
|
||||
|
||||
file_put_contents( $configFileFinal, $xmlConfiguration );
|
||||
file_put_contents($configFileFinal, $xmlConfiguration);
|
||||
|
||||
//Delete Temporal
|
||||
@unlink( PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename );
|
||||
// Delete Temporal
|
||||
@unlink(PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename);
|
||||
|
||||
$response['success'] = true;
|
||||
$response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESSFUL_IMPORTED' );
|
||||
G::auditLog("ImportSkin", "Skin Name: ".$skinName);
|
||||
G::outRes( G::json_encode( $response ) );
|
||||
$response['message'] = G::LoadTranslation('ID_SKIN_SUCCESSFUL_IMPORTED');
|
||||
G::auditLog("ImportSkin", "Skin Name: " . $skinName);
|
||||
G::outRes(G::json_encode($response));
|
||||
} catch (Exception $e) {
|
||||
$response['success'] = false;
|
||||
$response['message'] = $e->getMessage();
|
||||
$response['error'] = $e->getMessage();
|
||||
G::outRes( G::json_encode( $response ) );
|
||||
G::outRes(G::json_encode($response));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\BusinessModel\User as BmUser;
|
||||
|
||||
// Sanitizing the values sent in the global variables
|
||||
$filter = new InputFilter();
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
if (isset($_SESSION['USER_LOGGED'])) {
|
||||
@@ -9,456 +12,482 @@ if (isset($_SESSION['USR_USERNAME'])) {
|
||||
$_SESSION['USR_USERNAME'] = $filter->xssFilterHard($_SESSION['USR_USERNAME']);
|
||||
}
|
||||
|
||||
global $RBAC;
|
||||
// Initializing variables
|
||||
$action = $_POST['action'];
|
||||
$result = new StdClass();
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'countryList':
|
||||
require_once("classes/model/IsoCountry.php");
|
||||
$c = new Criteria();
|
||||
$c->add(IsoCountryPeer::IC_UID, null, Criteria::ISNOTNULL);
|
||||
$c->addAscendingOrderByColumn(IsoCountryPeer::IC_NAME);
|
||||
// Try to execute the requested action
|
||||
try {
|
||||
// Checking access permissions for the current action
|
||||
global $RBAC;
|
||||
$RBAC->allows(basename(__FILE__), $action);
|
||||
|
||||
$countries = IsoCountryPeer::doSelect($c);
|
||||
foreach ($countries as $rowid => $row) {
|
||||
$oData[] = array('IC_UID' => $row->getICUid(), 'IC_NAME' => $row->getICName());
|
||||
}
|
||||
print(G::json_encode($oData));
|
||||
break;
|
||||
case 'stateList':
|
||||
require_once("classes/model/IsoSubdivision.php");
|
||||
$c = new Criteria();
|
||||
$country = $_POST['IC_UID'];
|
||||
$c->add(IsoSubdivisionPeer::IC_UID, $country, Criteria::EQUAL);
|
||||
$c->addAscendingOrderByColumn(IsoSubdivisionPeer::IS_NAME);
|
||||
$locations = IsoSubdivisionPeer::doSelect($c);
|
||||
// Executing the action
|
||||
switch ($action) {
|
||||
case 'countryList':
|
||||
$c = new Criteria();
|
||||
$c->add(IsoCountryPeer::IC_UID, null, Criteria::ISNOTNULL);
|
||||
$c->addAscendingOrderByColumn(IsoCountryPeer::IC_NAME);
|
||||
$countries = IsoCountryPeer::doSelect($c);
|
||||
|
||||
$oData = array();
|
||||
foreach ($locations as $rowid => $row) {
|
||||
if (($row->getISUid() != '') && ($row->getISName() != '')) {
|
||||
$oData[] = array('IS_UID' => $row->getISUid(), 'IS_NAME' => $row->getISName());
|
||||
$data = [];
|
||||
foreach ($countries as $row) {
|
||||
$data[] = ['IC_UID' => $row->getICUid(), 'IC_NAME' => $row->getICName()];
|
||||
}
|
||||
}
|
||||
print(G::json_encode($oData));
|
||||
break;
|
||||
case 'locationList':
|
||||
require_once("classes/model/IsoLocation.php");
|
||||
$c = new Criteria();
|
||||
$country = $_POST['IC_UID'];
|
||||
$state = $_POST['IS_UID'];
|
||||
$c->add(IsoLocationPeer::IC_UID, $country, Criteria::EQUAL);
|
||||
$c->add(IsoLocationPeer::IS_UID, $state, Criteria::EQUAL);
|
||||
$c->addAscendingOrderByColumn(IsoLocationPeer::IL_NAME);
|
||||
$locations = IsoLocationPeer::doSelect($c);
|
||||
print(G::json_encode($data));
|
||||
break;
|
||||
case 'stateList':
|
||||
$c = new Criteria();
|
||||
$country = $_POST['IC_UID'];
|
||||
$c->add(IsoSubdivisionPeer::IC_UID, $country, Criteria::EQUAL);
|
||||
$c->addAscendingOrderByColumn(IsoSubdivisionPeer::IS_NAME);
|
||||
$locations = IsoSubdivisionPeer::doSelect($c);
|
||||
|
||||
$oData = array();
|
||||
foreach ($locations as $rowid => $row) {
|
||||
if (($row->getILUid() != '') && ($row->getILName() != '')) {
|
||||
$oData[] = array('IL_UID' => $row->getILUid(), 'IL_NAME' => $row->getILName());
|
||||
}
|
||||
}
|
||||
print(G::json_encode($oData));
|
||||
break;
|
||||
case 'usersList':
|
||||
$filter = (isset($_POST['filter']))? $_POST['filter'] : '';
|
||||
|
||||
$arrayUser = [];
|
||||
|
||||
$user = new \ProcessMaker\BusinessModel\User();
|
||||
$conf = new Configurations();
|
||||
|
||||
$arrayConfFormat = $conf->getFormats();
|
||||
|
||||
$arrayCondition = [[UsersPeer::USR_STATUS, ['ACTIVE', 'VACATION'], Criteria::IN]];
|
||||
|
||||
if (isset($_POST['USR_UID'])) {
|
||||
$arrayCondition[] = [UsersPeer::USR_UID, $_POST['USR_UID'], Criteria::NOT_EQUAL];
|
||||
}
|
||||
|
||||
$result = $user->getUsers(['condition' => $arrayCondition, 'filter' => $filter], null, null, null, 25);
|
||||
|
||||
foreach ($result['data'] as $record) {
|
||||
$arrayUser[] = [
|
||||
'USR_UID' => $record['USR_UID'],
|
||||
'USER_FULLNAME' => G::getFormatUserList($arrayConfFormat['format'], $record)
|
||||
];
|
||||
}
|
||||
|
||||
echo G::json_encode($arrayUser);
|
||||
break;
|
||||
case 'availableCalendars':
|
||||
$calendar = new Calendar();
|
||||
$calendarObj = $calendar->getCalendarList(true, true);
|
||||
$oData[] = array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -');
|
||||
foreach ($calendarObj['array'] as $rowid => $row) {
|
||||
if ($rowid > 0) {
|
||||
$oData[] = array('CALENDAR_UID' => $row['CALENDAR_UID'], 'CALENDAR_NAME' => $row['CALENDAR_NAME']);
|
||||
}
|
||||
}
|
||||
print(G::json_encode($oData));
|
||||
break;
|
||||
case 'rolesList':
|
||||
require_once PATH_RBAC . "model/Roles.php";
|
||||
$roles = new Roles();
|
||||
$rolesData = $roles->getAllRoles();
|
||||
foreach ($rolesData as $rowid => $row) {
|
||||
$oData[] = array('ROL_UID' => $row['ROL_CODE'], 'ROL_CODE' => $row['ROL_NAME']);
|
||||
}
|
||||
print(G::json_encode($oData));
|
||||
break;
|
||||
case 'getUserLogedRole':
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$aUserLog = $oUser->loadDetailed($_SESSION['USER_LOGGED']);
|
||||
print(G::json_encode(array(
|
||||
'USR_UID' => $aUserLog['USR_UID'],
|
||||
'USR_USERNAME' => $aUserLog['USR_USERNAME'],
|
||||
'USR_ROLE' => $aUserLog['USR_ROLE']
|
||||
)));
|
||||
break;
|
||||
case 'languagesList':
|
||||
$Translations = new Translation();
|
||||
$langs = $Translations->getTranslationEnvironments();
|
||||
$oData[] = array('LAN_ID' => '', 'LAN_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -');
|
||||
foreach ($langs as $lang) {
|
||||
$oData[] = array('LAN_ID' => $lang['LOCALE'],'LAN_NAME' => $lang['LANGUAGE']
|
||||
);
|
||||
}
|
||||
print(G::json_encode($oData));
|
||||
break;
|
||||
case 'saveUser':
|
||||
case 'savePersonalInfo':
|
||||
try {
|
||||
verifyCsrfToken($_POST);
|
||||
$user = new \ProcessMaker\BusinessModel\User();
|
||||
$form = $_POST;
|
||||
$permissionsToSaveData = $user->getPermissionsForEdit();
|
||||
$form = $user->checkPermissionForEdit($_SESSION['USER_LOGGED'], $permissionsToSaveData, $form);
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'saveUser':
|
||||
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS')) {
|
||||
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION', [$_SESSION['USER_LOGGED']]));
|
||||
}
|
||||
break;
|
||||
case 'savePersonalInfo':
|
||||
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS') &&
|
||||
!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_EDITPERSONALINFO')
|
||||
) {
|
||||
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION', [$_SESSION['USER_LOGGED']]));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Exception(G::LoadTranslation('ID_INVALID_DATA'));
|
||||
break;
|
||||
}
|
||||
|
||||
if (array_key_exists('USR_LOGGED_NEXT_TIME', $form)) {
|
||||
$form['USR_LOGGED_NEXT_TIME'] = ($form['USR_LOGGED_NEXT_TIME']) ? 1 : 0;
|
||||
}
|
||||
|
||||
$userUid = '';
|
||||
$auditLogType = '';
|
||||
if ($form['USR_UID'] == '') {
|
||||
$arrayUserData = $user->create($form);
|
||||
$userUid = $arrayUserData['USR_UID'];
|
||||
$auditLogType = 'INS';
|
||||
} else {
|
||||
if (array_key_exists('USR_NEW_PASS', $form) && $form['USR_NEW_PASS'] == '') {
|
||||
unset($form['USR_NEW_PASS']);
|
||||
}
|
||||
|
||||
$result = $user->update($form['USR_UID'], $form, $_SESSION['USER_LOGGED']);
|
||||
$userUid = $form['USR_UID'];
|
||||
$arrayUserData = $user->getUserRecordByPk($userUid, [], false);
|
||||
$auditLogType = 'UPD';
|
||||
}
|
||||
|
||||
$user->auditLog($auditLogType, array_merge(['USR_UID' => $userUid, 'USR_USERNAME' => $arrayUserData['USR_USERNAME']], $form));
|
||||
/* Saving preferences */
|
||||
$def_lang = isset($form['PREF_DEFAULT_LANG']) ? $form['PREF_DEFAULT_LANG'] : '';
|
||||
$def_menu = isset($form['PREF_DEFAULT_MENUSELECTED']) ? $form['PREF_DEFAULT_MENUSELECTED'] : '';
|
||||
$def_cases_menu = isset($form['PREF_DEFAULT_CASES_MENUSELECTED']) ? $form['PREF_DEFAULT_CASES_MENUSELECTED'] : '';
|
||||
$oConf = new Configurations();
|
||||
$aConf = array('DEFAULT_LANG' => $def_lang, 'DEFAULT_MENU' => $def_menu, 'DEFAULT_CASES_MENU' => $def_cases_menu);
|
||||
$oConf->aConfig = $aConf;
|
||||
$oConf->saveConfig('USER_PREFERENCES', '', '', $userUid);
|
||||
|
||||
if ($user->checkPermission($userUid, 'PM_EDIT_USER_PROFILE_PHOTO')) {
|
||||
try {
|
||||
$user->uploadImage($userUid);
|
||||
} catch (Exception $e) {
|
||||
$result = new stdClass();
|
||||
$result->success = false;
|
||||
$result->fileError = true;
|
||||
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
$data = [];
|
||||
foreach ($locations as $row) {
|
||||
if (($row->getISUid() != '') && ($row->getISName() != '')) {
|
||||
$data[] = ['IS_UID' => $row->getISUid(), 'IS_NAME' => $row->getISName()];
|
||||
}
|
||||
}
|
||||
print(G::json_encode($data));
|
||||
break;
|
||||
case 'locationList':
|
||||
$c = new Criteria();
|
||||
$country = $_POST['IC_UID'];
|
||||
$state = $_POST['IS_UID'];
|
||||
$c->add(IsoLocationPeer::IC_UID, $country, Criteria::EQUAL);
|
||||
$c->add(IsoLocationPeer::IS_UID, $state, Criteria::EQUAL);
|
||||
$c->addAscendingOrderByColumn(IsoLocationPeer::IL_NAME);
|
||||
$locations = IsoLocationPeer::doSelect($c);
|
||||
|
||||
if ($_SESSION['USER_LOGGED'] == $form['USR_UID']) {
|
||||
/* UPDATING SESSION VARIABLES */
|
||||
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
||||
$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
$data = [];
|
||||
foreach ($locations as $row) {
|
||||
if (($row->getILUid() != '') && ($row->getILName() != '')) {
|
||||
$data[] = ['IL_UID' => $row->getILUid(), 'IL_NAME' => $row->getILName()];
|
||||
}
|
||||
}
|
||||
print(G::json_encode($data));
|
||||
break;
|
||||
case 'usersList':
|
||||
$filter = (isset($_POST['filter'])) ? $_POST['filter'] : '';
|
||||
|
||||
$arrayUser = [];
|
||||
|
||||
$user = new BmUser();
|
||||
$conf = new Configurations();
|
||||
|
||||
$arrayConfFormat = $conf->getFormats();
|
||||
|
||||
$arrayCondition = [[UsersPeer::USR_STATUS, ['ACTIVE', 'VACATION'], Criteria::IN]];
|
||||
|
||||
if (isset($_POST['USR_UID'])) {
|
||||
$arrayCondition[] = [UsersPeer::USR_UID, $_POST['USR_UID'], Criteria::NOT_EQUAL];
|
||||
}
|
||||
|
||||
$result = new stdClass();
|
||||
$result->success = true;
|
||||
print(G::json_encode($result));
|
||||
} catch (Exception $e) {
|
||||
$result = new stdClass();
|
||||
$result->success = false;
|
||||
$result->error = $e->getMessage();
|
||||
print(G::json_encode($result));
|
||||
}
|
||||
break;
|
||||
case 'userData':
|
||||
require_once 'classes/model/Users.php';
|
||||
$_SESSION['CURRENT_USER'] = $_POST['USR_UID'];
|
||||
$oUser = new Users();
|
||||
$aFields = $oUser->loadDetailed($_POST['USR_UID']);
|
||||
$results = $user->getUsers(['condition' => $arrayCondition, 'filter' => $filter], null, null, null, 25);
|
||||
|
||||
//Load Calendar options and falue for this user
|
||||
$calendar = new Calendar();
|
||||
$calendarInfo = $calendar->getCalendarFor($_POST['USR_UID'], $_POST['USR_UID'], $_POST['USR_UID']);
|
||||
//If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
|
||||
$aFields['USR_CALENDAR'] = $calendarInfo['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo['CALENDAR_UID'] : "";
|
||||
$aFields['CALENDAR_NAME'] = $calendarInfo['CALENDAR_NAME'];
|
||||
|
||||
#verifying if it has any preferences on the configurations table
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig($x, 'USER_PREFERENCES', '', '', $aFields['USR_UID'], '');
|
||||
|
||||
$aFields['PREF_DEFAULT_MENUSELECTED'] = '';
|
||||
$aFields['PREF_DEFAULT_CASES_MENUSELECTED'] = '';
|
||||
$aFields['PREF_DEFAULT_LANG'] = isset($oConf->aConfig['DEFAULT_LANG']) ? $oConf->aConfig['DEFAULT_LANG'] : SYS_LANG;
|
||||
|
||||
if (isset($oConf->aConfig['DEFAULT_MENU'])) {
|
||||
$aFields['PREF_DEFAULT_MENUSELECTED'] = $oConf->aConfig['DEFAULT_MENU'];
|
||||
} else {
|
||||
switch ($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE']) {
|
||||
case 'PROCESSMAKER_ADMIN':
|
||||
$aFields['PREF_DEFAULT_MENUSELECTED'] = 'PM_SETUP';
|
||||
break;
|
||||
case 'PROCESSMAKER_OPERATOR':
|
||||
$aFields['PREF_DEFAULT_MENUSELECTED'] = 'PM_CASES';
|
||||
break;
|
||||
foreach ($results['data'] as $record) {
|
||||
$arrayUser[] = [
|
||||
'USR_UID' => $record['USR_UID'],
|
||||
'USER_FULLNAME' => G::getFormatUserList($arrayConfFormat['format'], $record)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$aFields['PREF_DEFAULT_CASES_MENUSELECTED'] = isset($oConf->aConfig['DEFAULT_CASES_MENU']) ? $oConf->aConfig['DEFAULT_CASES_MENU'] : '';
|
||||
|
||||
if ($aFields['USR_REPLACED_BY'] != '') {
|
||||
echo G::json_encode($arrayUser);
|
||||
break;
|
||||
case 'availableCalendars':
|
||||
$calendar = new Calendar();
|
||||
$calendarObj = $calendar->getCalendarList(true, true);
|
||||
$data = [['CALENDAR_UID' => '', 'CALENDAR_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -']];
|
||||
foreach ($calendarObj['array'] as $rowId => $row) {
|
||||
if ($rowId > 0) {
|
||||
$data[] = ['CALENDAR_UID' => $row['CALENDAR_UID'], 'CALENDAR_NAME' => $row['CALENDAR_NAME']];
|
||||
}
|
||||
}
|
||||
print(G::json_encode($data));
|
||||
break;
|
||||
case 'rolesList':
|
||||
$roles = new Roles();
|
||||
$rolesData = $roles->getAllRoles();
|
||||
$data = [];
|
||||
foreach ($rolesData as $rowId => $row) {
|
||||
$data[] = ['ROL_UID' => $row['ROL_CODE'], 'ROL_CODE' => $row['ROL_NAME']];
|
||||
}
|
||||
print(G::json_encode($data));
|
||||
break;
|
||||
case 'getUserLogedRole':
|
||||
$user = new Users();
|
||||
$u = $user->load($aFields['USR_REPLACED_BY']);
|
||||
if ($u['USR_STATUS'] == 'CLOSED') {
|
||||
$replaced_by = '';
|
||||
$aFields['USR_REPLACED_BY'] = '';
|
||||
} else {
|
||||
$c = new Configurations();
|
||||
$arrayConfFormat = $c->getFormats();
|
||||
|
||||
$replaced_by = G::getFormatUserList($arrayConfFormat['format'], $u);
|
||||
$userLog = $user->loadDetailed($_SESSION['USER_LOGGED']);
|
||||
print(G::json_encode([
|
||||
'USR_UID' => $userLog['USR_UID'],
|
||||
'USR_USERNAME' => $userLog['USR_USERNAME'],
|
||||
'USR_ROLE' => $userLog['USR_ROLE']
|
||||
]));
|
||||
break;
|
||||
case 'languagesList':
|
||||
$translations = new Translation();
|
||||
$languages = $translations->getTranslationEnvironments();
|
||||
$data = [['LAN_ID' => '', 'LAN_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -']];
|
||||
foreach ($languages as $lang) {
|
||||
$data[] = [
|
||||
'LAN_ID' => $lang['LOCALE'],
|
||||
'LAN_NAME' => $lang['LANGUAGE']
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$replaced_by = '';
|
||||
}
|
||||
print(G::json_encode($data));
|
||||
break;
|
||||
case 'saveUser':
|
||||
case 'savePersonalInfo':
|
||||
try {
|
||||
verifyCsrfToken($_POST);
|
||||
$user = new BmUser();
|
||||
$form = $_POST;
|
||||
$permissionsToSaveData = $user->getPermissionsForEdit();
|
||||
$form = $user->checkPermissionForEdit($_SESSION['USER_LOGGED'], $permissionsToSaveData, $form);
|
||||
|
||||
$aFields['REPLACED_NAME'] = $replaced_by;
|
||||
switch ($_POST['action']) {
|
||||
case 'saveUser':
|
||||
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS')) {
|
||||
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION',
|
||||
[$_SESSION['USER_LOGGED']]));
|
||||
}
|
||||
break;
|
||||
case 'savePersonalInfo':
|
||||
if (!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_USERS') &&
|
||||
!$user->checkPermission($_SESSION['USER_LOGGED'], 'PM_EDITPERSONALINFO')
|
||||
) {
|
||||
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION',
|
||||
[$_SESSION['USER_LOGGED']]));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Exception(G::LoadTranslation('ID_INVALID_DATA'));
|
||||
break;
|
||||
}
|
||||
|
||||
$menuSelected = '';
|
||||
if (array_key_exists('USR_LOGGED_NEXT_TIME', $form)) {
|
||||
$form['USR_LOGGED_NEXT_TIME'] = ($form['USR_LOGGED_NEXT_TIME']) ? 1 : 0;
|
||||
}
|
||||
|
||||
if ($aFields['PREF_DEFAULT_MENUSELECTED'] != '') {
|
||||
foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
|
||||
if ($aFields['PREF_DEFAULT_MENUSELECTED'] == $permission['PER_CODE']) {
|
||||
switch ($permission['PER_CODE']) {
|
||||
case 'PM_USERS':
|
||||
case 'PM_SETUP':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_SETUP'));
|
||||
break;
|
||||
case 'PM_CASES':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_CASES'));
|
||||
break;
|
||||
case 'PM_FACTORY':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_APPLICATIONS'));
|
||||
break;
|
||||
case 'PM_DASHBOARD':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_DASHBOARD'));
|
||||
break;
|
||||
}
|
||||
$userUid = '';
|
||||
$auditLogType = '';
|
||||
if (empty($form['USR_UID'])) {
|
||||
$arrayUserData = $user->create($form);
|
||||
$userUid = $arrayUserData['USR_UID'];
|
||||
$auditLogType = 'INS';
|
||||
} else {
|
||||
if ($aFields['PREF_DEFAULT_MENUSELECTED'] == 'PM_STRATEGIC_DASHBOARD') {
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'));
|
||||
if (array_key_exists('USR_NEW_PASS', $form) && $form['USR_NEW_PASS'] == '') {
|
||||
unset($form['USR_NEW_PASS']);
|
||||
}
|
||||
|
||||
$results = $user->update($form['USR_UID'], $form, $_SESSION['USER_LOGGED']);
|
||||
$userUid = $form['USR_UID'];
|
||||
$arrayUserData = $user->getUserRecordByPk($userUid, [], false);
|
||||
$auditLogType = 'UPD';
|
||||
}
|
||||
|
||||
$user->auditLog($auditLogType,
|
||||
array_merge(['USR_UID' => $userUid, 'USR_USERNAME' => $arrayUserData['USR_USERNAME']], $form));
|
||||
/* Saving preferences */
|
||||
$def_lang = isset($form['PREF_DEFAULT_LANG']) ? $form['PREF_DEFAULT_LANG'] : '';
|
||||
$def_menu = isset($form['PREF_DEFAULT_MENUSELECTED']) ? $form['PREF_DEFAULT_MENUSELECTED'] : '';
|
||||
$def_cases_menu = isset($form['PREF_DEFAULT_CASES_MENUSELECTED']) ? $form['PREF_DEFAULT_CASES_MENUSELECTED'] : '';
|
||||
$configuration = new Configurations();
|
||||
$configuration->aConfig = [
|
||||
'DEFAULT_LANG' => $def_lang,
|
||||
'DEFAULT_MENU' => $def_menu,
|
||||
'DEFAULT_CASES_MENU' => $def_cases_menu
|
||||
];
|
||||
$configuration->saveConfig('USER_PREFERENCES', '', '', $userUid);
|
||||
|
||||
if ($user->checkPermission($userUid, 'PM_EDIT_USER_PROFILE_PHOTO')) {
|
||||
try {
|
||||
$user->uploadImage($userUid);
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->fileError = true;
|
||||
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if ($_SESSION['USER_LOGGED'] == $form['USR_UID']) {
|
||||
/* UPDATING SESSION VARIABLES */
|
||||
$userInfo = $RBAC->userObj->load($_SESSION['USER_LOGGED']);
|
||||
$_SESSION['USR_FULLNAME'] = $userInfo['USR_FIRSTNAME'] . ' ' . $userInfo['USR_LASTNAME'];
|
||||
}
|
||||
|
||||
$result->success = true;
|
||||
print(G::json_encode($result));
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->error = $e->getMessage();
|
||||
print(G::json_encode($result));
|
||||
}
|
||||
break;
|
||||
case 'userData':
|
||||
// Check if the user logged has the correct permission
|
||||
if (($_POST['USR_UID'] !== $_SESSION['USER_LOGGED']) && ($RBAC->userCanAccess('PM_USERS') !== 1)) {
|
||||
throw new Exception(G::LoadTranslation('ID_USER_NOT_HAVE_PERMISSION', [$_SESSION['USER_LOGGED']]));
|
||||
}
|
||||
|
||||
$_SESSION['CURRENT_USER'] = $_POST['USR_UID'];
|
||||
$user = new Users();
|
||||
$fields = $user->loadDetailed($_POST['USR_UID']);
|
||||
|
||||
//Load Calendar options and falue for this user
|
||||
$calendar = new Calendar();
|
||||
$calendarInfo = $calendar->getCalendarFor($_POST['USR_UID'], $_POST['USR_UID'], $_POST['USR_UID']);
|
||||
//If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
|
||||
$fields['USR_CALENDAR'] = $calendarInfo['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo['CALENDAR_UID'] : "";
|
||||
$fields['CALENDAR_NAME'] = $calendarInfo['CALENDAR_NAME'];
|
||||
|
||||
//verifying if it has any preferences on the configurations table
|
||||
$configuration = new Configurations();
|
||||
$configuration->loadConfig($x, 'USER_PREFERENCES', '', '', $fields['USR_UID'], '');
|
||||
|
||||
$fields['PREF_DEFAULT_MENUSELECTED'] = '';
|
||||
$fields['PREF_DEFAULT_CASES_MENUSELECTED'] = '';
|
||||
$fields['PREF_DEFAULT_LANG'] = isset($configuration->aConfig['DEFAULT_LANG']) ? $configuration->aConfig['DEFAULT_LANG'] : SYS_LANG;
|
||||
|
||||
if (isset($configuration->aConfig['DEFAULT_MENU'])) {
|
||||
$fields['PREF_DEFAULT_MENUSELECTED'] = $configuration->aConfig['DEFAULT_MENU'];
|
||||
} else {
|
||||
switch ($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE']) {
|
||||
case 'PROCESSMAKER_ADMIN':
|
||||
$fields['PREF_DEFAULT_MENUSELECTED'] = 'PM_SETUP';
|
||||
break;
|
||||
case 'PROCESSMAKER_OPERATOR':
|
||||
$fields['PREF_DEFAULT_MENUSELECTED'] = 'PM_CASES';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$fields['PREF_DEFAULT_CASES_MENUSELECTED'] = isset($configuration->aConfig['DEFAULT_CASES_MENU']) ? $configuration->aConfig['DEFAULT_CASES_MENU'] : '';
|
||||
|
||||
if ($fields['USR_REPLACED_BY'] != '') {
|
||||
$user = new Users();
|
||||
$u = $user->load($fields['USR_REPLACED_BY']);
|
||||
if ($u['USR_STATUS'] == 'CLOSED') {
|
||||
$replaced_by = '';
|
||||
$fields['USR_REPLACED_BY'] = '';
|
||||
} else {
|
||||
$c = new Configurations();
|
||||
$arrayConfFormat = $c->getFormats();
|
||||
|
||||
$replaced_by = G::getFormatUserList($arrayConfFormat['format'], $u);
|
||||
}
|
||||
} else {
|
||||
$replaced_by = '';
|
||||
}
|
||||
|
||||
$fields['REPLACED_NAME'] = $replaced_by;
|
||||
|
||||
$menuSelected = '';
|
||||
|
||||
if ($fields['PREF_DEFAULT_MENUSELECTED'] != '') {
|
||||
foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
|
||||
if ($fields['PREF_DEFAULT_MENUSELECTED'] == $permission['PER_CODE']) {
|
||||
switch ($permission['PER_CODE']) {
|
||||
case 'PM_USERS':
|
||||
case 'PM_SETUP':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_SETUP'));
|
||||
break;
|
||||
case 'PM_CASES':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_CASES'));
|
||||
break;
|
||||
case 'PM_FACTORY':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_APPLICATIONS'));
|
||||
break;
|
||||
case 'PM_DASHBOARD':
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_DASHBOARD'));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ($fields['PREF_DEFAULT_MENUSELECTED'] == 'PM_STRATEGIC_DASHBOARD') {
|
||||
$menuSelected = strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aFields['MENUSELECTED_NAME'] = $menuSelected;
|
||||
$fields['MENUSELECTED_NAME'] = $menuSelected;
|
||||
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load('cases');
|
||||
$casesMenuSelected = '';
|
||||
$menu = new Menu();
|
||||
$menu->load('cases');
|
||||
$casesMenuSelected = '';
|
||||
|
||||
if ($aFields['PREF_DEFAULT_CASES_MENUSELECTED'] != '') {
|
||||
foreach ($oMenu->Id as $i => $item) {
|
||||
if ($aFields['PREF_DEFAULT_CASES_MENUSELECTED'] == $item) {
|
||||
$casesMenuSelected = $oMenu->Labels[$i];
|
||||
if ($fields['PREF_DEFAULT_CASES_MENUSELECTED'] != '') {
|
||||
foreach ($menu->Id as $i => $item) {
|
||||
if ($fields['PREF_DEFAULT_CASES_MENUSELECTED'] == $item) {
|
||||
$casesMenuSelected = $menu->Labels[$i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
$aUserLog = $oUser->loadDetailed($_SESSION['USER_LOGGED']);
|
||||
$aFields['USER_LOGGED_NAME'] = $aUserLog['USR_USERNAME'];
|
||||
$aFields['USER_LOGGED_ROLE'] = $aUserLog['USR_ROLE'];
|
||||
$user = new Users();
|
||||
$userLog = $user->loadDetailed($_SESSION['USER_LOGGED']);
|
||||
$fields['USER_LOGGED_NAME'] = $userLog['USR_USERNAME'];
|
||||
$fields['USER_LOGGED_ROLE'] = $userLog['USR_ROLE'];
|
||||
|
||||
$aFields['CASES_MENUSELECTED_NAME'] = $casesMenuSelected;
|
||||
$fields['CASES_MENUSELECTED_NAME'] = $casesMenuSelected;
|
||||
|
||||
require_once 'classes/model/UsersProperties.php';
|
||||
$oUserProperty = new UsersProperties();
|
||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aFields['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array($oUser->getUsrPassword()))));
|
||||
$aFields['USR_LOGGED_NEXT_TIME'] = $aUserProperty['USR_LOGGED_NEXT_TIME'];
|
||||
$userProperties = new UsersProperties();
|
||||
$properties = $userProperties->loadOrCreateIfNotExists($fields['USR_UID'],
|
||||
['USR_PASSWORD_HISTORY' => serialize([$user->getUsrPassword()])]);
|
||||
$fields['USR_LOGGED_NEXT_TIME'] = $properties['USR_LOGGED_NEXT_TIME'];
|
||||
|
||||
if (array_key_exists('USR_PASSWORD', $aFields)) {
|
||||
unset($aFields['USR_PASSWORD']);
|
||||
}
|
||||
|
||||
$userPermissions = new \ProcessMaker\BusinessModel\User();
|
||||
$permissions = $userPermissions->loadDetailedPermissions($aFields);
|
||||
|
||||
$result->success = true;
|
||||
$result->user = $aFields;
|
||||
$result->permission = $permissions;
|
||||
|
||||
print(G::json_encode($result));
|
||||
break;
|
||||
case 'defaultMainMenuOptionList':
|
||||
foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
|
||||
switch ($permission['PER_CODE']) {
|
||||
case 'PM_USERS':
|
||||
case 'PM_SETUP':
|
||||
$rows[] = array('id' => 'PM_SETUP', 'name' => strtoupper(G::LoadTranslation('ID_SETUP'))
|
||||
);
|
||||
break;
|
||||
case 'PM_CASES':
|
||||
$rows[] = array('id' => 'PM_CASES', 'name' => strtoupper(G::LoadTranslation('ID_CASES'))
|
||||
);
|
||||
break;
|
||||
case 'PM_FACTORY':
|
||||
$rows[] = array('id' => 'PM_FACTORY', 'name' => strtoupper(G::LoadTranslation('ID_APPLICATIONS'))
|
||||
);
|
||||
break;
|
||||
case 'PM_DASHBOARD':
|
||||
$rows[] = array('id' => 'PM_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_DASHBOARD'))
|
||||
);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// NEW DASHBOARD MODULE
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$rows[] = array('id' => 'PM_STRATEGIC_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'))
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
if (array_key_exists('USR_PASSWORD', $fields)) {
|
||||
unset($fields['USR_PASSWORD']);
|
||||
}
|
||||
}
|
||||
print(G::json_encode($rows));
|
||||
break;
|
||||
case 'defaultCasesMenuOptionList':
|
||||
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load('cases');
|
||||
$userPermissions = new BmUser();
|
||||
$permissions = $userPermissions->loadDetailedPermissions($fields);
|
||||
|
||||
foreach ($oMenu->Id as $i => $item) {
|
||||
if ($oMenu->Types[$i] != 'blockHeader') {
|
||||
$rowsCasesMenu[] = array('id' => $item, 'name' => $oMenu->Labels[$i]);
|
||||
$result->success = true;
|
||||
$result->user = $fields;
|
||||
$result->permission = $permissions;
|
||||
|
||||
print(G::json_encode($result));
|
||||
break;
|
||||
case 'defaultMainMenuOptionList':
|
||||
$rows = [];
|
||||
foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
|
||||
switch ($permission['PER_CODE']) {
|
||||
case 'PM_USERS':
|
||||
case 'PM_SETUP':
|
||||
$rows[] = [
|
||||
'id' => 'PM_SETUP',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_SETUP'))
|
||||
];
|
||||
break;
|
||||
case 'PM_CASES':
|
||||
$rows[] = [
|
||||
'id' => 'PM_CASES',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_CASES'))
|
||||
];
|
||||
break;
|
||||
case 'PM_FACTORY':
|
||||
$rows[] = [
|
||||
'id' => 'PM_FACTORY',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_APPLICATIONS'))
|
||||
];
|
||||
break;
|
||||
case 'PM_DASHBOARD':
|
||||
$rows[] = [
|
||||
'id' => 'PM_DASHBOARD',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_DASHBOARD'))
|
||||
];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
// NEW DASHBOARD MODULE
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$rows[] = [
|
||||
'id' => 'PM_STRATEGIC_DASHBOARD',
|
||||
'name' => strtoupper(G::LoadTranslation('ID_STRATEGIC_DASHBOARD'))
|
||||
];
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
print(G::json_encode($rowsCasesMenu));
|
||||
break;
|
||||
case 'testPassword':
|
||||
require_once 'classes/model/UsersProperties.php';
|
||||
$userProperty = new UsersProperties();
|
||||
print(G::json_encode($rows));
|
||||
break;
|
||||
case 'defaultCasesMenuOptionList':
|
||||
$menu = new Menu();
|
||||
$menu->load('cases');
|
||||
|
||||
$fields = [];
|
||||
$color = '';
|
||||
$img = '';
|
||||
$dateNow = date('Y-m-d H:i:s');
|
||||
$errorInPassword = $userProperty->validatePassword($_POST['PASSWORD_TEXT'], $dateNow, 0);
|
||||
|
||||
if (!empty($errorInPassword)) {
|
||||
$img = '/images/delete.png';
|
||||
$color = 'red';
|
||||
if (!defined('NO_DISPLAY_USERNAME')) {
|
||||
define('NO_DISPLAY_USERNAME', 1);
|
||||
foreach ($menu->Id as $i => $item) {
|
||||
if ($menu->Types[$i] != 'blockHeader') {
|
||||
$rowsCasesMenu[] = ['id' => $item, 'name' => $menu->Labels[$i]];
|
||||
}
|
||||
}
|
||||
$fields = $userProperty->getMessageValidatePassword($errorInPassword);
|
||||
$fields['STATUS'] = false;
|
||||
} else {
|
||||
$color = 'green';
|
||||
$img = '/images/dialog-ok-apply.png';
|
||||
$fields['DESCRIPTION'] = G::LoadTranslation('ID_PASSWORD_COMPLIES_POLICIES') . '</span>';
|
||||
$fields['STATUS'] = true;
|
||||
}
|
||||
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';
|
||||
$gif = '<img width="13" height="13" border="0" src="' . $img . '">';
|
||||
$fields['DESCRIPTION'] = $span . $gif . $fields['DESCRIPTION'];
|
||||
print(G::json_encode($fields));
|
||||
break;
|
||||
case 'testUsername':
|
||||
require_once 'classes/model/Users.php';
|
||||
$_POST['NEW_USERNAME'] = trim($_POST['NEW_USERNAME']);
|
||||
$USR_UID = isset($_POST['USR_UID']) ? $_POST['USR_UID'] : '';
|
||||
print(G::json_encode($rowsCasesMenu));
|
||||
break;
|
||||
case 'testPassword':
|
||||
$userProperty = new UsersProperties();
|
||||
|
||||
$response = array("success" => true);
|
||||
$fields = [];
|
||||
$color = '';
|
||||
$img = '';
|
||||
$dateNow = date('Y-m-d H:i:s');
|
||||
$errorInPassword = $userProperty->validatePassword($_POST['PASSWORD_TEXT'], $dateNow, 0);
|
||||
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
if (!empty($errorInPassword)) {
|
||||
$img = '/images/delete.png';
|
||||
$color = 'red';
|
||||
if (!defined('NO_DISPLAY_USERNAME')) {
|
||||
define('NO_DISPLAY_USERNAME', 1);
|
||||
}
|
||||
$fields = $userProperty->getMessageValidatePassword($errorInPassword);
|
||||
$fields['STATUS'] = false;
|
||||
} else {
|
||||
$color = 'green';
|
||||
$img = '/images/dialog-ok-apply.png';
|
||||
$fields['DESCRIPTION'] = G::LoadTranslation('ID_PASSWORD_COMPLIES_POLICIES') . '</span>';
|
||||
$fields['STATUS'] = true;
|
||||
}
|
||||
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';
|
||||
$gif = '<img width="13" height="13" border="0" src="' . $img . '">';
|
||||
$fields['DESCRIPTION'] = $span . $gif . $fields['DESCRIPTION'];
|
||||
print(G::json_encode($fields));
|
||||
break;
|
||||
case 'testUsername':
|
||||
$_POST['NEW_USERNAME'] = trim($_POST['NEW_USERNAME']);
|
||||
$usrUid = isset($_POST['USR_UID']) ? $_POST['USR_UID'] : '';
|
||||
|
||||
$oCriteria->add(UsersPeer::USR_USERNAME, utf8_encode($_POST['NEW_USERNAME']));
|
||||
if ($USR_UID != '') {
|
||||
$oCriteria->add(UsersPeer::USR_UID, array($_POST['USR_UID']), Criteria::NOT_IN);
|
||||
}
|
||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$response = ["success" => true];
|
||||
|
||||
if (is_array($aRow) || $_POST['NEW_USERNAME'] == '') {
|
||||
$color = 'red';
|
||||
$img = '/images/delete.png';
|
||||
$dataVar['USER_ID'] = $_POST['NEW_USERNAME'];
|
||||
$text = G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', $dataVar);
|
||||
$text = ($_POST['NEW_USERNAME'] == '') ? G::LoadTranslation('ID_MSG_ERROR_USR_USERNAME') : $text;
|
||||
$response['exists'] = true;
|
||||
} else {
|
||||
$color = 'green';
|
||||
$img = '/images/dialog-ok-apply.png';
|
||||
$text = G::LoadTranslation('ID_USERNAME_CORRECT');
|
||||
$response['exists'] = false;
|
||||
}
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
|
||||
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';
|
||||
$gif = '<img width="13" height="13" border="0" src="' . $img . '">';
|
||||
$response['descriptionText'] = $span . $gif . $text . '</span>';
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
case "passwordValidate":
|
||||
$messageResultLogin = "";
|
||||
$password = $_POST["password"];
|
||||
$resultLogin = $RBAC->VerifyLogin($_SESSION["USR_USERNAME"], $password);
|
||||
$criteria->add(UsersPeer::USR_USERNAME, utf8_encode($_POST['NEW_USERNAME']));
|
||||
if ($usrUid != '') {
|
||||
$criteria->add(UsersPeer::USR_UID, [$_POST['USR_UID']], Criteria::NOT_IN);
|
||||
}
|
||||
$dataSet = UsersPeer::doSelectRS($criteria);
|
||||
$dataSet->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataSet->next();
|
||||
$row = $dataSet->getRow();
|
||||
|
||||
if ($resultLogin == $_SESSION["USER_LOGGED"]) {
|
||||
$messageResultLogin = "OK";
|
||||
} else {
|
||||
$messageResultLogin = "ERROR";
|
||||
}
|
||||
if (is_array($row) || $_POST['NEW_USERNAME'] == '') {
|
||||
$color = 'red';
|
||||
$img = '/images/delete.png';
|
||||
$dataVar = ['USER_ID' => $_POST['NEW_USERNAME']];
|
||||
$text = G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', $dataVar);
|
||||
$text = ($_POST['NEW_USERNAME'] == '') ? G::LoadTranslation('ID_MSG_ERROR_USR_USERNAME') : $text;
|
||||
$response['exists'] = true;
|
||||
} else {
|
||||
$color = 'green';
|
||||
$img = '/images/dialog-ok-apply.png';
|
||||
$text = G::LoadTranslation('ID_USERNAME_CORRECT');
|
||||
$response['exists'] = false;
|
||||
}
|
||||
|
||||
$response = array();
|
||||
$response["result"] = $messageResultLogin;
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';
|
||||
$gif = '<img width="13" height="13" border="0" src="' . $img . '">';
|
||||
$response['descriptionText'] = $span . $gif . $text . '</span>';
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
case "passwordValidate":
|
||||
$messageResultLogin = "";
|
||||
$password = $_POST["password"];
|
||||
$resultLogin = $RBAC->VerifyLogin($_SESSION["USR_USERNAME"], $password);
|
||||
|
||||
if ($resultLogin == $_SESSION["USER_LOGGED"]) {
|
||||
$messageResultLogin = "OK";
|
||||
} else {
|
||||
$messageResultLogin = "ERROR";
|
||||
}
|
||||
|
||||
$response = [];
|
||||
$response["result"] = $messageResultLogin;
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->error = $e->getMessage();
|
||||
echo G::json_encode($result);
|
||||
}
|
||||
|
||||
0
workflow/engine/plugins/.gitignore
vendored
Normal file
0
workflow/engine/plugins/.gitignore
vendored
Normal file
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
class chartsPlugin extends PMPlugin
|
||||
{
|
||||
public function chartsPlugin($sNamespace, $sFilename = null)
|
||||
{
|
||||
$res = parent::PMPlugin($sNamespace, $sFilename);
|
||||
$this->sFriendlyName = 'Charts Plugin';
|
||||
$this->sDescription = 'This plugin shows generic charts for ProcessMaker';
|
||||
$this->sPluginFolder = 'charts';
|
||||
$this->sSetupPage = 'setupPage';
|
||||
$this->aWorkspaces = array( );
|
||||
$this->iVersion = 0.45;
|
||||
$this->bPrivate = true;
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
$this->registerTrigger(10000, 'createCaseFolder');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
$oPluginRegistry = PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerPlugin('charts', __FILE__);
|
||||
@@ -1,106 +0,0 @@
|
||||
<?php
|
||||
require_once ( "classes/model/Application.php" );
|
||||
require_once ( "classes/model/AppDelegation.php" );
|
||||
require_once ( "classes/model/Process.php" );
|
||||
|
||||
class chartsClass extends PMPlugin {
|
||||
|
||||
function __construct ( ) {
|
||||
}
|
||||
|
||||
function readConfig () {
|
||||
$fileConf = PATH_PLUGINS . 'charts' . PATH_SEP . 'config' . PATH_SEP . 'setup.conf';
|
||||
if ( !file_exists( dirname($fileConf) ) )
|
||||
throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist." ) );
|
||||
|
||||
if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) )
|
||||
throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) );
|
||||
|
||||
$content = file_get_contents ( $fileConf);
|
||||
$fields = unserialize ($content);
|
||||
return $fields;
|
||||
}
|
||||
|
||||
function getFieldsForPageSetup () {
|
||||
$fileConf = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf';
|
||||
if ( !file_exists( dirname($fileConf) ) )
|
||||
throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist." ) );
|
||||
|
||||
if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) )
|
||||
throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) );
|
||||
|
||||
if ( file_exists ( $fileConf ) ) {
|
||||
$content = file_get_contents ( $fileConf);
|
||||
$fields = unserialize ($content);
|
||||
}
|
||||
else
|
||||
$fields = array();
|
||||
return $fields;
|
||||
}
|
||||
|
||||
function updateFieldsForPageSetup ( $oData) {
|
||||
$content = serialize ($oData['form']);
|
||||
$fileConf = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf';
|
||||
if ( !is_writable( dirname($fileConf) ) )
|
||||
throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist or this directory is not writable." ) );
|
||||
|
||||
if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) )
|
||||
throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) );
|
||||
|
||||
file_put_contents ( $fileConf, $content);
|
||||
return true;
|
||||
}
|
||||
|
||||
function setup() {
|
||||
}
|
||||
|
||||
function getDatasetCasesByStatus ( ) {
|
||||
$dataSet = new XYDataSet();
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn ( ApplicationPeer::APP_STATUS );
|
||||
$c->addSelectColumn ( 'COUNT(*) AS CANT') ;
|
||||
$c->addGroupByColumn(ApplicationPeer::APP_STATUS);
|
||||
$rs = ApplicationPeer::doSelectRS( $c );
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
while ( is_array ( $row ) ) {
|
||||
$label = $row['APP_STATUS'];
|
||||
$value = $row['CANT'];
|
||||
$dataSet->addPoint(new Point($label , (int)$value ) );
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
}
|
||||
return $dataSet;
|
||||
}
|
||||
|
||||
//we are trying to obtain the process title thru the long way, using the process object.
|
||||
//there is a short way, if you use a more complex query joining Content Table.
|
||||
function getDatasetCasesByProcess ( ) {
|
||||
$dataSet = new XYDataSet();
|
||||
$processObj = new Process;
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn ( ApplicationPeer::PRO_UID );
|
||||
$c->addSelectColumn ( 'COUNT(*) AS CANT') ;
|
||||
//$c->addJoin( ProcessPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
|
||||
$c->addGroupByColumn(ApplicationPeer::PRO_UID);
|
||||
$rs = ApplicationPeer::doSelectRS( $c );
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
while ( is_array ( $row ) ) {
|
||||
$processObj->load ( $row['PRO_UID'] );
|
||||
$label = $processObj->getProTitle();
|
||||
$value = $row['CANT'];
|
||||
$dataSet->addPoint(new Point($label , (int)$value) );
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
}
|
||||
return $dataSet;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
a:1:{s:6:"ACCEPT";s:4:"Save";}
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* dashboard.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
//if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
||||
|
||||
require_once ( "class.charts.php" );
|
||||
|
||||
|
||||
|
||||
|
||||
header("Content-type: image/png");
|
||||
//type of chart, pie, vertical bar, horizontal, etc.
|
||||
$type = isset ( $_GET['type']) ? $_GET['type'] : '1' ;
|
||||
$chartType = isset ( $_GET['chart']) ? $_GET['chart'] : '1' ;
|
||||
$user = isset ( $_GET['user']) ? $_GET['user'] : $_SESSION['USER_LOGGED'] ;
|
||||
$chartsObj = new chartsClass();
|
||||
|
||||
//$chart = new PieChart(450,300);
|
||||
switch ( $type ) {
|
||||
case '1' :
|
||||
$chart = new VerticalBarChart(430, 280); break;
|
||||
case '2' :
|
||||
$chart = new HorizontalBarChart(430, 200); break;
|
||||
case '3' :
|
||||
$chart = new LineChart(430, 280); break;
|
||||
case '4' :
|
||||
$chart = new PieChart(430, 200 ); break;
|
||||
}
|
||||
|
||||
switch ( $chartType ) {
|
||||
case '1' :
|
||||
$dataSet = $chartsObj->getDatasetCasesByStatus(); break;
|
||||
default :
|
||||
$dataSet = $chartsObj->getDatasetCasesByProcess(); break;
|
||||
}
|
||||
$chart->setDataSet($dataSet);
|
||||
$chart->setTitle( "Cases list" );
|
||||
$chart->render();
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm
|
||||
name="About Charts Plugin"
|
||||
type="xmlform"
|
||||
width="550"
|
||||
>
|
||||
|
||||
<TITLE type="title" >
|
||||
<en>About charts Plugin</en>
|
||||
</TITLE>
|
||||
|
||||
<sTITLE type="subtitle" >
|
||||
<en>This is the Charts Plugin, with this plugin you can see many differents charts</en>
|
||||
</sTITLE>
|
||||
|
||||
|
||||
<ACCEPT type="submit" >
|
||||
<en>Save</en>
|
||||
</ACCEPT>
|
||||
</dynaForm>
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* processTemplate.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
class processTemplatePlugin extends PMPlugin
|
||||
{
|
||||
public function processTemplatePlugin($sNamespace, $sFilename = null)
|
||||
{
|
||||
$res = parent::PMPlugin($sNamespace, $sFilename);
|
||||
$this->sFriendlyName = 'Process Map Templates';
|
||||
$this->sDescription = 'This plugin includes various templates for quick and easy Process Map creation. Users can customize Process Maps based on pre-defined templates of common process designs (including Parallel, Dual Start Task, and Selection).';
|
||||
$this->sPluginFolder = 'processTemplate';
|
||||
$this->sSetupPage = null;
|
||||
$this->iVersion = 0.78;
|
||||
$this->bPrivate = true;
|
||||
$this->aWorkspaces = array( '__' );
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
//$this->registerTrigger( PM_NEW_PROCESS_LIST, 'getNewProcessTemplateList' );
|
||||
//$this->registerTrigger( PM_NEW_PROCESS_SAVE, 'saveNewProcess' );
|
||||
//$this->registerTrigger( PM_NEW_DYNAFORM_LIST, 'getNewDynaformTemplateList' );
|
||||
//$this->registerTrigger( PM_NEW_DYNAFORM_SAVE, 'saveNewDynaform' );
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
}
|
||||
public function enable()
|
||||
{
|
||||
}
|
||||
public function disable()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
$oPluginRegistry = PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerPlugin('processTemplate', __FILE__);
|
||||
@@ -1,195 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* class.processTemplate.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
class processTemplateClass extends PMPlugin {
|
||||
|
||||
function __construct ( ) {
|
||||
}
|
||||
|
||||
function getNewProcessTemplateList ( $oData ) {
|
||||
global $_DBArray;
|
||||
$rows[] = array ( 'uid' => 'char', 'name' => 'char', );
|
||||
$rows[] = array ( 'uid' => '', 'name' => 'blank process' );
|
||||
$rows[] = array ( 'uid' => 1, 'name' => 'simple process, three tasks' );
|
||||
$rows[] = array ( 'uid' => 2, 'name' => 'simple parallel process' );
|
||||
$rows[] = array ( 'uid' => 3, 'name' => 'conditional process' );
|
||||
$rows[] = array ( 'uid' => 4, 'name' => 'double starting task' );
|
||||
$rows[] = array ( 'uid' => 5, 'name' => 'advanced parallel process' );
|
||||
|
||||
$_DBArray['ProcessesNew'] = $rows;
|
||||
}
|
||||
|
||||
function saveNewProcess ( $oData ) {
|
||||
|
||||
switch ($oData['PRO_TEMPLATE']) {
|
||||
case 1 : $this->simpleProcess ( $oData);
|
||||
break;
|
||||
case 2 : $this->simpleParallel ( $oData);
|
||||
break;
|
||||
case 3 : $this->conditional ( $oData);
|
||||
break;
|
||||
case 4 : $this->doubleStart ( $oData);
|
||||
break;
|
||||
case 5 : $this->fullParallel ( $oData);
|
||||
break;
|
||||
default :
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function simpleProcess ($oData ) {
|
||||
//$oJSON = new Services_JSON();
|
||||
$sProUid = $oData['PRO_UID'];
|
||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
||||
$oProcessMap = $oData['PROCESSMAP'];
|
||||
|
||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 160) );
|
||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 250) );
|
||||
$task1 = $t1->uid;
|
||||
$task2 = $t2->uid;
|
||||
$task3 = $t3->uid;
|
||||
|
||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task1);
|
||||
$oTask = new Task();
|
||||
$oTask->update($aData);
|
||||
|
||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task2, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task2, $task3, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task3, -1, 'SEQUENTIAL' );
|
||||
}
|
||||
|
||||
function simpleParallel ($oData ) {
|
||||
//$oJSON = new Services_JSON();
|
||||
$sProUid = $oData['PRO_UID'];
|
||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
||||
$oProcessMap = $oData['PROCESSMAP'];
|
||||
|
||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 160) );
|
||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 400, 160) );
|
||||
$t5 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 250) );
|
||||
|
||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$t1->uid);
|
||||
$oTask = new Task();
|
||||
$oTask->update($aData);
|
||||
|
||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t2->uid, 'PARALLEL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t3->uid, 'PARALLEL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t2->uid, $t5->uid, 'SEC-JOIN' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t3->uid, $t5->uid, 'SEC-JOIN' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t5->uid, -1, 'SEQUENTIAL' );
|
||||
}
|
||||
|
||||
function fullParallel ($oData ) {
|
||||
//$oJSON = new Services_JSON();
|
||||
$sProUid = $oData['PRO_UID'];
|
||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
||||
$oProcessMap = $oData['PROCESSMAP'];
|
||||
|
||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 100, 160) );
|
||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 160) );
|
||||
$t4 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 500, 160) );
|
||||
$t5 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 250) );
|
||||
$t6 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 500, 250) );
|
||||
$t7 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 350, 340) );
|
||||
|
||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$t1->uid);
|
||||
$oTask = new Task();
|
||||
$oTask->update($aData);
|
||||
|
||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t2->uid, 'PARALLEL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t3->uid, 'PARALLEL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t4->uid, 'PARALLEL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t2->uid, $t5->uid, 'SEC-JOIN' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t3->uid, $t5->uid, 'SEC-JOIN' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t4->uid, $t6->uid, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t5->uid, $t7->uid, 'SEC-JOIN' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t6->uid, $t7->uid, 'SEC-JOIN' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $t7->uid, -1, 'SEQUENTIAL' );
|
||||
}
|
||||
|
||||
|
||||
function conditional ($oData ) {
|
||||
//$oJSON = new Services_JSON();
|
||||
$sProUid = $oData['PRO_UID'];
|
||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
||||
$oProcessMap = $oData['PROCESSMAP'];
|
||||
|
||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 160) );
|
||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 400, 160) );
|
||||
$t4 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 250) );
|
||||
$task1 = $t1->uid;
|
||||
$task2 = $t2->uid;
|
||||
$task3 = $t3->uid;
|
||||
$task4 = $t4->uid;
|
||||
|
||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task1);
|
||||
$oTask = new Task();
|
||||
$oTask->update($aData);
|
||||
|
||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task2, 'SELECT' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task3, 'SELECT' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task2, $task4, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task3, $task4, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task4, -1, 'SEQUENTIAL' );
|
||||
}
|
||||
|
||||
|
||||
function doubleStart ($oData ) {
|
||||
//$oJSON = new Services_JSON();
|
||||
$sProUid = $oData['PRO_UID'];
|
||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
||||
$oProcessMap = $oData['PROCESSMAP'];
|
||||
|
||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 70) );
|
||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 400, 70) );
|
||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 160) );
|
||||
$task1 = $t1->uid;
|
||||
$task2 = $t2->uid;
|
||||
$task3 = $t3->uid;
|
||||
|
||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task1);
|
||||
$oTask = new Task();
|
||||
$oTask->update($aData);
|
||||
|
||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task2);
|
||||
$oTask = new Task();
|
||||
$oTask->update($aData);
|
||||
|
||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task3, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task2, $task3, 'SEQUENTIAL' );
|
||||
$oProcessMap->saveNewPattern($sProUid, $task3, -1, 'SEQUENTIAL' );
|
||||
}
|
||||
|
||||
|
||||
function setup()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1733,7 +1733,7 @@ class Cases
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
private function __getFieldsAndValuesByDynaFormAndAppData(array $form, array $appData, array $caseVariable)
|
||||
private function getFieldsAndValuesByDynaFormAndAppData(array $form, array $appData, array $caseVariable)
|
||||
{
|
||||
try {
|
||||
foreach ($form['items'] as $value) {
|
||||
@@ -1754,7 +1754,7 @@ class Cases
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$caseVariableAux = $this->__getFieldsAndValuesByDynaFormAndAppData($field, $appData,
|
||||
$caseVariableAux = $this->getFieldsAndValuesByDynaFormAndAppData($field, $appData,
|
||||
$caseVariable);
|
||||
$caseVariable = array_merge($caseVariable, $caseVariableAux);
|
||||
}
|
||||
@@ -1827,7 +1827,7 @@ class Cases
|
||||
|
||||
$arrayAppData = $fields['APP_DATA'];
|
||||
|
||||
$arrayCaseVariable = $this->__getFieldsAndValuesByDynaFormAndAppData(
|
||||
$arrayCaseVariable = $this->getFieldsAndValuesByDynaFormAndAppData(
|
||||
$arrayDynContent['items'][0], $arrayAppData, $arrayCaseVariable
|
||||
);
|
||||
} else {
|
||||
@@ -2406,7 +2406,7 @@ class Cases
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
private function __getStatusInfoDataByRsCriteria($rsCriteria)
|
||||
private function getStatusInfoDataByRsCriteria($rsCriteria)
|
||||
{
|
||||
try {
|
||||
$arrayData = [];
|
||||
@@ -2489,7 +2489,7 @@ class Cases
|
||||
$rsCriteria = AppDelayPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria);
|
||||
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria);
|
||||
|
||||
if (!empty($arrayData)) {
|
||||
return $arrayData;
|
||||
@@ -2522,7 +2522,7 @@ class Cases
|
||||
$rsCriteria = AppCacheViewPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria);
|
||||
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria);
|
||||
|
||||
if (!empty($arrayData)) {
|
||||
return $arrayData;
|
||||
@@ -2565,7 +2565,7 @@ class Cases
|
||||
$rsCriteria = ApplicationPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria);
|
||||
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria);
|
||||
|
||||
if (!empty($arrayData)) {
|
||||
return $arrayData;
|
||||
@@ -2605,7 +2605,7 @@ class Cases
|
||||
$rsCriteria2 = ApplicationPeer::doSelectRS($criteria2);
|
||||
$rsCriteria2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria2);
|
||||
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria2);
|
||||
|
||||
if (!empty($arrayData)) {
|
||||
return $arrayData;
|
||||
@@ -3152,7 +3152,7 @@ class Cases
|
||||
*
|
||||
* @return array Returns array with Case data updated
|
||||
*/
|
||||
private function __applicationDataDeleteMultipleFile(
|
||||
private function applicationDataDeleteMultipleFile(
|
||||
array $arrayApplicationData,
|
||||
$variable1,
|
||||
$variable2,
|
||||
@@ -3198,7 +3198,7 @@ class Cases
|
||||
case 'GRID':
|
||||
foreach ($arrayApplicationData[$variable1] as $key => $value) {
|
||||
if (array_key_exists($variable2, $value)) {
|
||||
$arrayApplicationData[$variable1][$key] = $this->__applicationDataDeleteMultipleFile(
|
||||
$arrayApplicationData[$variable1][$key] = $this->applicationDataDeleteMultipleFile(
|
||||
$value, $variable2, null, 'NORMAL', $arrayDocumentToDelete
|
||||
);
|
||||
}
|
||||
@@ -3254,7 +3254,7 @@ class Cases
|
||||
foreach ($arrayDocumentDelete as $value2) {
|
||||
$appDocument->remove($value2['appDocUid'], (int)($value2['version']));
|
||||
|
||||
$arrayApplicationData['APP_DATA'] = $this->__applicationDataDeleteMultipleFile(
|
||||
$arrayApplicationData['APP_DATA'] = $this->applicationDataDeleteMultipleFile(
|
||||
$arrayApplicationData['APP_DATA'], $variable, null, $type, $value2
|
||||
);
|
||||
|
||||
@@ -3272,7 +3272,7 @@ class Cases
|
||||
foreach ($arrayDocumentDelete as $value4) {
|
||||
$appDocument->remove($value4['appDocUid'], (int)($value4['version']));
|
||||
|
||||
$arrayApplicationData['APP_DATA'] = $this->__applicationDataDeleteMultipleFile(
|
||||
$arrayApplicationData['APP_DATA'] = $this->applicationDataDeleteMultipleFile(
|
||||
$arrayApplicationData['APP_DATA'], $grid, $variable, $type, $value4
|
||||
);
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class Variable extends Attribute
|
||||
* @return mixed Returns array with Application, AppDelegation and Variable record,
|
||||
* ThrowTheException/FALSE otherwise
|
||||
*/
|
||||
private function __getApplicationAppDelegationAndVariableRecordByData(
|
||||
private function getApplicationAppDelegationAndVariableRecordByData(
|
||||
$applicationUid,
|
||||
$delIndex,
|
||||
$variableName,
|
||||
@@ -144,7 +144,7 @@ class Variable extends Attribute
|
||||
*
|
||||
* @return array Returns an array with Fields of a Grid
|
||||
*/
|
||||
private function __getGridFieldDefinitions($projectUid, $gridName)
|
||||
private function getGridFieldDefinitions($projectUid, $gridName)
|
||||
{
|
||||
try {
|
||||
$arrayGridField = [];
|
||||
@@ -202,7 +202,7 @@ class Variable extends Attribute
|
||||
*
|
||||
* @return bool Returns TRUE when array data is valid, ThrowTheException/FALSE otherwise
|
||||
*/
|
||||
private function __validateData(array $arrayData, array $arrayVariableData, $throwException = true)
|
||||
private function validateData(array $arrayData, array $arrayVariableData, $throwException = true)
|
||||
{
|
||||
try {
|
||||
if (empty($arrayData)) {
|
||||
@@ -303,7 +303,7 @@ class Variable extends Attribute
|
||||
{
|
||||
try {
|
||||
//Verify data and Set variables
|
||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
||||
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||
$applicationUid, $delIndex, $variableName, $throwException
|
||||
);
|
||||
|
||||
@@ -329,12 +329,12 @@ class Variable extends Attribute
|
||||
}
|
||||
|
||||
if ($arrayVariableData['VAR_FIELD_TYPE'] == 'grid') {
|
||||
$arrayVariableData['arrayGridField'] = $this->__getGridFieldDefinitions(
|
||||
$arrayVariableData['arrayGridField'] = $this->getGridFieldDefinitions(
|
||||
$arrayVariableData['PRJ_UID'], $arrayVariableData['VAR_NAME']
|
||||
);
|
||||
}
|
||||
|
||||
$result = $this->__validateData($arrayData, $arrayVariableData, $throwException);
|
||||
$result = $this->validateData($arrayData, $arrayVariableData, $throwException);
|
||||
|
||||
if ($result === false) {
|
||||
return false;
|
||||
@@ -396,7 +396,7 @@ class Variable extends Attribute
|
||||
{
|
||||
try {
|
||||
//Verify data and Set variables
|
||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
||||
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||
$applicationUid, $delIndex, $variableName, $throwException
|
||||
);
|
||||
|
||||
@@ -420,12 +420,12 @@ class Variable extends Attribute
|
||||
}
|
||||
|
||||
if ($arrayVariableData['VAR_FIELD_TYPE'] == 'grid') {
|
||||
$arrayVariableData['arrayGridField'] = $this->__getGridFieldDefinitions(
|
||||
$arrayVariableData['arrayGridField'] = $this->getGridFieldDefinitions(
|
||||
$arrayVariableData['PRJ_UID'], $arrayVariableData['VAR_NAME']
|
||||
);
|
||||
}
|
||||
|
||||
$result = $this->__validateData($arrayData, $arrayVariableData, $throwException);
|
||||
$result = $this->validateData($arrayData, $arrayVariableData, $throwException);
|
||||
|
||||
if ($result === false) {
|
||||
return false;
|
||||
@@ -490,7 +490,7 @@ class Variable extends Attribute
|
||||
{
|
||||
try {
|
||||
//Verify data and Set variables
|
||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
||||
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||
$applicationUid, $delIndex, $variableName, $throwException
|
||||
);
|
||||
|
||||
@@ -605,7 +605,7 @@ class Variable extends Attribute
|
||||
$arrayVariable = [];
|
||||
|
||||
//Verify data and Set variables
|
||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
||||
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||
$applicationUid, $delIndex, $variableName, $throwException
|
||||
);
|
||||
|
||||
@@ -696,7 +696,7 @@ class Variable extends Attribute
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
||||
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||
$applicationUid, $delIndex, $variableName, $throwException
|
||||
);
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ class Department
|
||||
* @param array $record Record
|
||||
* @return array Return an array with custom record
|
||||
*/
|
||||
private function __getUserCustomRecordFromRecord(array $record)
|
||||
private function getUserCustomRecordFromRecord(array $record)
|
||||
{
|
||||
try {
|
||||
$recordc = [
|
||||
@@ -414,7 +414,7 @@ class Department
|
||||
break;
|
||||
}
|
||||
|
||||
$arrayUser[] = ($flagRecord)? $record : $this->__getUserCustomRecordFromRecord($record);
|
||||
$arrayUser[] = ($flagRecord)? $record : $this->getUserCustomRecordFromRecord($record);
|
||||
}
|
||||
|
||||
//Return
|
||||
|
||||
@@ -18,7 +18,7 @@ class ReportTable
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
private function __getDefaultColumns($type = 'NORMAL')
|
||||
private function getDefaultColumns($type = 'NORMAL')
|
||||
{
|
||||
$defaultColumns = [];
|
||||
$application = new \stdClass(); //APPLICATION KEY
|
||||
@@ -97,7 +97,7 @@ class ReportTable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function __populateData(array $arrayTableData, array $tableNameMap)
|
||||
private function populateData(array $arrayTableData, array $tableNameMap)
|
||||
{
|
||||
try {
|
||||
$errors = '';
|
||||
@@ -408,7 +408,7 @@ class ReportTable
|
||||
//New report table
|
||||
if ($flagIsReportTable && $flagAlterTable) {
|
||||
//Setting default columns
|
||||
$defaultColumns = $this->__getDefaultColumns($arrayData['REP_TAB_TYPE']);
|
||||
$defaultColumns = $this->getDefaultColumns($arrayData['REP_TAB_TYPE']);
|
||||
$columns = array_merge($defaultColumns, $columns);
|
||||
}
|
||||
|
||||
@@ -835,7 +835,7 @@ class ReportTable
|
||||
}
|
||||
|
||||
if (!empty($tableNameMap)) {
|
||||
$errors = $this->__populateData($arrayTableData, $tableNameMap);
|
||||
$errors = $this->populateData($arrayTableData, $tableNameMap);
|
||||
}
|
||||
|
||||
//Return
|
||||
|
||||
@@ -1230,7 +1230,7 @@ class TimerEvent
|
||||
//Start Timer-Event (start new case) ///////////////////////////////////////////////////////////////////////
|
||||
$common->frontEndShow("START");
|
||||
|
||||
$this->log("START-NEW-CASES", "Date \"$datetime (UTC +00:00)\": Start new cases");
|
||||
$this->log("START-NEW-CASES", "Start new cases");
|
||||
$aInfo = array(
|
||||
'ip' => \G::getIpAddress()
|
||||
,'action' => 'START-NEW-CASES'
|
||||
@@ -1506,7 +1506,7 @@ class TimerEvent
|
||||
|
||||
//Intermediate Catch Timer-Event (continue the case) ///////////////////////////////////////////////////////
|
||||
$action = "START-CONTINUE-CASES";
|
||||
$this->log($action, "Date \"$datetime (UTC +00:00)\": Start continue the cases");
|
||||
$this->log($action, "Start continue the cases");
|
||||
$aInfo = array(
|
||||
'ip' => \G::getIpAddress()
|
||||
,'action' => $action
|
||||
|
||||
@@ -640,7 +640,7 @@ class User
|
||||
* @return array Return an array with custom record
|
||||
* @throws Exception
|
||||
*/
|
||||
private function __getUserCustomRecordFromRecord(array $record)
|
||||
private function getUserCustomRecordFromRecord(array $record)
|
||||
{
|
||||
try {
|
||||
//Get Calendar
|
||||
@@ -1084,7 +1084,7 @@ class User
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
//Return
|
||||
return (!$flagGetRecord) ? $this->__getUserCustomRecordFromRecord($row) : $row;
|
||||
return (!$flagGetRecord) ? $this->getUserCustomRecordFromRecord($row) : $row;
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -1494,7 +1494,7 @@ class User
|
||||
while ($rsCriteria->next()) {
|
||||
$record = $rsCriteria->getRow();
|
||||
|
||||
$arrayUser[] = ($flagRecord) ? $record : $this->__getUserCustomRecordFromRecord($record);
|
||||
$arrayUser[] = ($flagRecord) ? $record : $this->getUserCustomRecordFromRecord($record);
|
||||
}
|
||||
|
||||
//Return
|
||||
|
||||
@@ -1502,6 +1502,7 @@ class PluginRegistry
|
||||
return $oMenuFromPlugin[$strMenuName];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,9 +87,9 @@ class WorkflowBpmn extends Project\Workflow
|
||||
return parent::getList($start, $limit, $filter, $changeCaseTo);
|
||||
}
|
||||
|
||||
public function remove()
|
||||
public function remove($flagRemoveCases = true, $onlyDiagram = false)
|
||||
{
|
||||
parent::remove();
|
||||
parent::remove($flagRemoveCases, $onlyDiagram);
|
||||
$this->bp->remove();
|
||||
}
|
||||
|
||||
|
||||
@@ -1169,12 +1169,13 @@ class Workflow extends Handler
|
||||
|
||||
//Getting DynaForms
|
||||
foreach ($workflowData["dynaforms"] as $dynaform) {
|
||||
$dynFile = PATH_DYNAFORM . $dynaform["DYN_FILENAME"] . ".xml";
|
||||
$dynFile = PATH_DYNAFORM . $dynaform["PRO_UID"] . "/" . $dynaform["DYN_UID"] . ".xml";
|
||||
$content = file_exists($dynFile) ? file_get_contents($dynFile) : '';
|
||||
|
||||
$workflowFile["DYNAFORMS"][] = array(
|
||||
"filename" => $dynaform["DYN_TITLE"],
|
||||
"filepath" => $dynaform["DYN_FILENAME"] . ".xml",
|
||||
"file_content" => file_get_contents($dynFile)
|
||||
"file_content" => $content
|
||||
);
|
||||
|
||||
$htmlFile = PATH_DYNAFORM . $dynaform["DYN_FILENAME"] . ".html";
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Services\OAuth2;
|
||||
|
||||
use OAuth2\Server;
|
||||
|
||||
/**
|
||||
* Extended class where the properties are correctly initialized, compatibility with PHP 7.3.x
|
||||
*/
|
||||
class OAuth2Server extends Server
|
||||
{
|
||||
protected $responseTypes = [];
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class Server implements iAuthenticate
|
||||
}
|
||||
|
||||
// Pass a storage object or array of storage objects to the OAuth2 server class
|
||||
$this->server = new \OAuth2\Server($this->storage, array('allow_implicit' => true, 'access_lifetime' => 86400));
|
||||
$this->server = new OAuth2Server($this->storage, array('allow_implicit' => true, 'access_lifetime' => 86400));
|
||||
|
||||
$this->server->setConfig('enforce_state', false);
|
||||
|
||||
@@ -182,7 +182,7 @@ class Server implements iAuthenticate
|
||||
if (! isset($_SESSION['USER_LOGGED'])) {
|
||||
$http = \G::is_https() ? 'https' : 'http';
|
||||
$host = $http . '://' . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
||||
$redirect = urlencode($host.'/'.self::$workspace.$_SERVER['REQUEST_URI']);
|
||||
$redirect = urlencode('/'.self::$workspace.$_SERVER['REQUEST_URI']);
|
||||
|
||||
$loginLink = sprintf('%s/sys%s/%s/%s/login/login?u=%s', $host, config("system.workspace"), SYS_LANG, SYS_SKIN, $redirect);
|
||||
header('location: ' . $loginLink);
|
||||
|
||||
@@ -15,14 +15,11 @@ require_once __DIR__ . '/../../bootstrap/app.php';
|
||||
AppEvent::getAppEvent();
|
||||
|
||||
register_shutdown_function(
|
||||
create_function(
|
||||
"",
|
||||
"
|
||||
if (class_exists(\"Propel\")) {
|
||||
function () {
|
||||
if (class_exists('Propel')) {
|
||||
Propel::close();
|
||||
}
|
||||
"
|
||||
)
|
||||
}
|
||||
);
|
||||
|
||||
ini_set("session.cookie_httponly", 1);
|
||||
|
||||
Reference in New Issue
Block a user