Merged in release/3.3 (pull request #6486)
Release/3.3 Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
@@ -45,7 +45,9 @@
|
||||
"pear/console_getopt": "1.4.*",
|
||||
"TYPO3/class-alias-loader": "^1.0",
|
||||
"ralouphie/getallheaders": "^2.0",
|
||||
"smarty/smarty": "2.6.30"
|
||||
"smarty/smarty": "2.6.30",
|
||||
"pdepend/pdepend" : "@stable",
|
||||
"chumper/zipper" : "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "^1.7",
|
||||
|
||||
585
composer.lock
generated
585
composer.lock
generated
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f3bce83c3f2a3d02dfff261dd88a5072",
|
||||
"content-hash": "0a979177bf17fe938d96211e6a03cc21",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bshaffer/oauth2-server-php",
|
||||
@@ -29,7 +29,7 @@
|
||||
"OAuth2": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"notification-url": "http://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
@@ -49,6 +49,66 @@
|
||||
],
|
||||
"time": "2013-08-12T16:35:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "chumper/zipper",
|
||||
"version": "v1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Chumper/Zipper.git",
|
||||
"reference": "6a1733c34d67c3952b8439afb36ad4ea5c3ceacb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Chumper/Zipper/zipball/6a1733c34d67c3952b8439afb36ad4ea5c3ceacb",
|
||||
"reference": "6a1733c34d67c3952b8439afb36ad4ea5c3ceacb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/filesystem": "^5.0",
|
||||
"illuminate/support": "^5.0",
|
||||
"php": ">=5.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9.4",
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Chumper\\Zipper\\ZipperServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Zipper": "Chumper\\Zipper\\Zipper"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Chumper\\Zipper\\": "src/Chumper/Zipper"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache2"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Plaschke",
|
||||
"email": "github@nilsplaschke.de",
|
||||
"homepage": "http://nilsplaschke.de",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "This is a little neat helper for the ZipArchive methods with handy functions",
|
||||
"homepage": "http://github.com/Chumper/zipper",
|
||||
"keywords": [
|
||||
"archive",
|
||||
"laravel",
|
||||
"zip"
|
||||
],
|
||||
"time": "2017-07-17T08:05:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "colosa/MichelangeloFE",
|
||||
"version": "dev-release/3.2.4",
|
||||
@@ -334,7 +394,7 @@
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"notification-url": "http://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
@@ -681,7 +741,7 @@
|
||||
"rest",
|
||||
"server"
|
||||
],
|
||||
"time": "2018-03-16T05:08:02+00:00"
|
||||
"time": "2017-01-11T03:42:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
@@ -901,6 +961,46 @@
|
||||
],
|
||||
"time": "2018-04-04T21:24:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pdepend/pdepend",
|
||||
"version": "2.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pdepend/pdepend.git",
|
||||
"reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pdepend/pdepend/zipball/9daf26d0368d4a12bed1cacae1a9f3a6f0adf239",
|
||||
"reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.7",
|
||||
"symfony/config": "^2.3.0|^3|^4",
|
||||
"symfony/dependency-injection": "^2.3.0|^3|^4",
|
||||
"symfony/filesystem": "^2.3.0|^3|^4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8|^5.7",
|
||||
"squizlabs/php_codesniffer": "^2.0.0"
|
||||
},
|
||||
"bin": [
|
||||
"src/bin/pdepend"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PDepend\\": "src/main/php/PDepend"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "Official version of pdepend to be handled with Composer",
|
||||
"time": "2017-12-13T13:21:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pear/archive_tar",
|
||||
"version": "1.4.3",
|
||||
@@ -1166,6 +1266,55 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"time": "2013-02-21T11:44:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Container\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||
"homepage": "https://github.com/php-fig/container",
|
||||
"keywords": [
|
||||
"PSR-11",
|
||||
"container",
|
||||
"container-interface",
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.0",
|
||||
@@ -1429,6 +1578,69 @@
|
||||
],
|
||||
"time": "2018-01-23T07:37:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v3.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/config.git",
|
||||
"reference": "7c2a9d44f4433863e9bca682e7f03609234657f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/7c2a9d44f4433863e9bca682e7f03609234657f9",
|
||||
"reference": "7c2a9d44f4433863e9bca682e7f03609234657f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/filesystem": "~2.8|~3.0|~4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/dependency-injection": "<3.3",
|
||||
"symfony/finder": "<3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/dependency-injection": "~3.3|~4.0",
|
||||
"symfony/event-dispatcher": "~3.3|~4.0",
|
||||
"symfony/finder": "~3.3|~4.0",
|
||||
"symfony/yaml": "~3.0|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "To use the yaml reference dumper"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Config\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-03-19T22:32:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v3.4.9",
|
||||
@@ -1535,7 +1747,7 @@
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jean-François Simon",
|
||||
"name": "Jean-Fran?ois Simon",
|
||||
"email": "jeanfrancois.simon@sensiolabs.com"
|
||||
},
|
||||
{
|
||||
@@ -1607,6 +1819,77 @@
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-30T16:53:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v3.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dependency-injection.git",
|
||||
"reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54ff9d78b56429f9a1ac12e60bfb6d169c0468e3",
|
||||
"reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/config": "<3.3.7",
|
||||
"symfony/finder": "<3.3",
|
||||
"symfony/proxy-manager-bridge": "<3.4",
|
||||
"symfony/yaml": "<3.4"
|
||||
},
|
||||
"provide": {
|
||||
"psr/container-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": "~3.3|~4.0",
|
||||
"symfony/expression-language": "~2.8|~3.0|~4.0",
|
||||
"symfony/yaml": "~3.4|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "",
|
||||
"symfony/expression-language": "For using expressions in service container configuration",
|
||||
"symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
|
||||
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\DependencyInjection\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-29T14:04:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v3.4.9",
|
||||
@@ -1670,6 +1953,55 @@
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-06T07:35:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v3.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "253a4490b528597aa14d2bf5aeded6f5e5e4a541"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/253a4490b528597aa14d2bf5aeded6f5e5e4a541",
|
||||
"reference": "253a4490b528597aa14d2bf5aeded6f5e5e4a541",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Filesystem\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-02-22T10:48:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v3.4.9",
|
||||
@@ -3249,7 +3581,7 @@
|
||||
"Guzzle": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"notification-url": "http://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
@@ -3521,7 +3853,7 @@
|
||||
"homepage": "https://nette.org/contributors"
|
||||
}
|
||||
],
|
||||
"description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.",
|
||||
"description": "? Nette Caching: library with easy-to-use API and many cache backends.",
|
||||
"homepage": "https://nette.org",
|
||||
"keywords": [
|
||||
"cache",
|
||||
@@ -3714,7 +4046,7 @@
|
||||
"homepage": "https://nette.org/contributors"
|
||||
}
|
||||
],
|
||||
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
||||
"description": "? Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
||||
"homepage": "https://nette.org",
|
||||
"keywords": [
|
||||
"array",
|
||||
@@ -4386,55 +4718,6 @@
|
||||
],
|
||||
"time": "2017-06-30T09:13:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/container.git",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Container\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||
"homepage": "https://github.com/php-fig/container",
|
||||
"keywords": [
|
||||
"PSR-11",
|
||||
"container",
|
||||
"container-interface",
|
||||
"container-interop",
|
||||
"psr"
|
||||
],
|
||||
"time": "2017-02-14T16:28:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
"version": "1.0.1",
|
||||
@@ -5055,189 +5338,6 @@
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-01-03T07:37:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v3.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/config.git",
|
||||
"reference": "7c2a9d44f4433863e9bca682e7f03609234657f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/7c2a9d44f4433863e9bca682e7f03609234657f9",
|
||||
"reference": "7c2a9d44f4433863e9bca682e7f03609234657f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/filesystem": "~2.8|~3.0|~4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/dependency-injection": "<3.3",
|
||||
"symfony/finder": "<3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/dependency-injection": "~3.3|~4.0",
|
||||
"symfony/event-dispatcher": "~3.3|~4.0",
|
||||
"symfony/finder": "~3.3|~4.0",
|
||||
"symfony/yaml": "~3.0|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "To use the yaml reference dumper"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Config\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-03-19T22:32:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v3.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dependency-injection.git",
|
||||
"reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54ff9d78b56429f9a1ac12e60bfb6d169c0468e3",
|
||||
"reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/config": "<3.3.7",
|
||||
"symfony/finder": "<3.3",
|
||||
"symfony/proxy-manager-bridge": "<3.4",
|
||||
"symfony/yaml": "<3.4"
|
||||
},
|
||||
"provide": {
|
||||
"psr/container-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": "~3.3|~4.0",
|
||||
"symfony/expression-language": "~2.8|~3.0|~4.0",
|
||||
"symfony/yaml": "~3.4|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "",
|
||||
"symfony/expression-language": "For using expressions in service container configuration",
|
||||
"symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
|
||||
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\DependencyInjection\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-04-29T14:04:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v3.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "253a4490b528597aa14d2bf5aeded6f5e5e4a541"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/253a4490b528597aa14d2bf5aeded6f5e5e4a541",
|
||||
"reference": "253a4490b528597aa14d2bf5aeded6f5e5e4a541",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Filesystem\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-02-22T10:48:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v3.4.9",
|
||||
@@ -5508,7 +5608,8 @@
|
||||
"colosa/pmui": 20,
|
||||
"colosa/michelangelofe": 20,
|
||||
"colosa/pmdynaform": 20,
|
||||
"geshi/geshi": 20
|
||||
"geshi/geshi": 20,
|
||||
"pdepend/pdepend": 0
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -600,3 +600,74 @@ function setExtStateManagerSetProvider(cache, additionalPrefix) {
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download file with object XMLHttpRequest|ActiveXObject, with response type BLOB
|
||||
*
|
||||
* @param string method POST
|
||||
* @param string url endpoint
|
||||
* @param object headers
|
||||
* @param object formData
|
||||
* @param function callBack
|
||||
*/
|
||||
function downloadFile(method, url, headers, formData, callBack) {
|
||||
|
||||
var xhr,
|
||||
win = window,
|
||||
value = 'blob',
|
||||
loadingFile = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_LOADING')});
|
||||
|
||||
method = method || 'POST';
|
||||
|
||||
loadingFile.show();
|
||||
|
||||
if (win.XMLHttpRequest) {
|
||||
xhr = new XMLHttpRequest();
|
||||
} else if (win.ActiveXObject) {
|
||||
xhr = new ActiveXObject('Microsoft.XMLHTTP');
|
||||
}
|
||||
|
||||
win.URL = win.URL || win.webkitURL;
|
||||
|
||||
xhr.open(method, url, true);
|
||||
xhr.responseType = value;
|
||||
|
||||
Object.keys(headers).forEach(function (key) {
|
||||
xhr.setRequestHeader(key, headers[key]);
|
||||
});
|
||||
|
||||
xhr.onload = function (e) {
|
||||
loadingFile.hide();
|
||||
if (xhr.status === 200) {
|
||||
if (xhr.getResponseHeader("Content-Disposition") !== null) {
|
||||
var fileName = xhr.getResponseHeader("Content-Disposition").match(/\sfilename="([^"]+)"(\s|$)/)[1];
|
||||
var blob = xhr.response;
|
||||
if ((navigator.userAgent.indexOf("MSIE") !== -1) ||
|
||||
(navigator.userAgent.indexOf("Trident") !== -1) ||
|
||||
(navigator.userAgent.indexOf("Edge") !== -1)) {
|
||||
win.navigator.msSaveBlob(blob, fileName);
|
||||
} else {
|
||||
var doc = win.document,
|
||||
a = doc.createElementNS('http://www.w3.org/1999/xhtml', 'a'),
|
||||
event = doc.createEvent('MouseEvents');
|
||||
|
||||
event.initMouseEvent('click', true, false, win, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
|
||||
a.href = win.URL.createObjectURL(blob);
|
||||
a.download = fileName;
|
||||
a.dispatchEvent(event);
|
||||
}
|
||||
if (typeof(callBack) !== 'undefined') {
|
||||
callBack(xhr);
|
||||
}
|
||||
} else {
|
||||
PMExt.error(_('ID_ERROR'), _('ID_UNEXPECTED_ERROR_OCCURRED_PLEASE'));
|
||||
}
|
||||
} else {
|
||||
PMExt.error(_('ID_ERROR'), xhr.statusText);
|
||||
}
|
||||
|
||||
};
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
|
||||
@@ -2654,20 +2654,17 @@ class Bootstrap
|
||||
/**
|
||||
* Stores a message in the log file, if the file size exceeds
|
||||
*
|
||||
* @param string $channel
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @param string $file
|
||||
* @param string $pathData
|
||||
* @param string $ws workspace
|
||||
*
|
||||
* @return void
|
||||
* @param string $channel The logging channel
|
||||
* @param int $level The logging level
|
||||
* @param string $message The log message
|
||||
* @param array $context The log context
|
||||
* @param string $workspace name workspace
|
||||
* @param string $file name file
|
||||
* @param string $pathData path of file
|
||||
*/
|
||||
public static function registerMonolog($channel, $level, $message, $context, $ws, $file = 'cron.log', $pathData = PATH_DATA)
|
||||
public static function registerMonolog($channel, $level, $message, $context, $workspace, $file = 'cron.log', $pathData = PATH_DATA)
|
||||
{
|
||||
$fileLog = $pathData .'sites'. PATH_SEP . $ws . PATH_SEP . 'log' . PATH_SEP . $file;
|
||||
|
||||
$registerLogger = MonologProvider::getSingleton($channel, $fileLog);
|
||||
$registerLogger = MonologProvider::getSingleton($channel, $file);
|
||||
$registerLogger->addLog($level, $message, $context);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,52 +1,366 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* class.monologProvider.php
|
||||
*
|
||||
* @package gulliver.system
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
use Monolog\Formatter\LineFormatter;
|
||||
use Monolog\Handler\RotatingFileHandler;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Processor\IntrospectionProcessor;
|
||||
|
||||
class MonologProvider
|
||||
{
|
||||
/**
|
||||
* @var MonologProvider
|
||||
*/
|
||||
private static $instance = null;
|
||||
public $aWorkspaces = null;
|
||||
public $formatter;
|
||||
public $streamRoutating;
|
||||
public $registerLogger;
|
||||
/**
|
||||
* @var LineFormatter
|
||||
*/
|
||||
private $formatter;
|
||||
/**
|
||||
* @var RotatingFileHandler
|
||||
*/
|
||||
private $streamRoutating;
|
||||
/**
|
||||
* @var Logger
|
||||
*/
|
||||
private $registerLogger;
|
||||
|
||||
//the default format "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n";
|
||||
public $output = "<%level%> %datetime% %channel% %level_name%: %message% %context% %extra%\n";
|
||||
public $dateFormat = "M d H:i:s";
|
||||
public $numOfKeepFiles = 60;
|
||||
public $levelDebug = 100;
|
||||
public $bubble = true;
|
||||
public $filePermission = 0666;
|
||||
private $output = "<%level%> %datetime% %channel% %level_name%: %message% %context% %extra%\n";
|
||||
private $dateFormat = 'M d H:i:s';
|
||||
/**
|
||||
* The maximal amount of files to keep (0 means unlimited)
|
||||
* @var int
|
||||
*/
|
||||
private $maxFilesToKeep;
|
||||
/**
|
||||
* @var int level debug
|
||||
*/
|
||||
private $levelDebug;
|
||||
/**
|
||||
* Whether the messages that are handled can bubble up the stack or not
|
||||
* @var boolean
|
||||
*/
|
||||
private $bubble = true;
|
||||
/**
|
||||
* @var int file permissions
|
||||
*/
|
||||
private $filePermission;
|
||||
/**
|
||||
* @var string path file
|
||||
*/
|
||||
private $pathFile;
|
||||
|
||||
public function __construct ($channel, $fileLog)
|
||||
/**
|
||||
* Logging levels from loo protocol defined in RFC 5424
|
||||
*
|
||||
* @var array $levels Logging levels
|
||||
*/
|
||||
protected static $levels = [
|
||||
'DEBUG' => 100,
|
||||
'INFO' => 200,
|
||||
'NOTICE' => 250,
|
||||
'WARNING' => 300,
|
||||
'ERROR' => 400,
|
||||
'CRITICAL' => 500,
|
||||
'ALERT' => 550,
|
||||
'EMERGENCY' => 600
|
||||
];
|
||||
|
||||
public function __construct($channel, $fileLog)
|
||||
{
|
||||
//Set Formatter
|
||||
$this->formatter = new Monolog\Formatter\LineFormatter($this->output, $this->dateFormat);
|
||||
// getting configuration from env.ini
|
||||
$sysConf = System::getSystemConfiguration();
|
||||
|
||||
//Set level debug
|
||||
$levelDebug = 'DEBUG';
|
||||
|
||||
$this->setLevelDebug($levelDebug);
|
||||
|
||||
//Set path where the file will be saved
|
||||
$defaultPath = $path = PATH_DATA . 'sites' . PATH_SEP . config('system.workspace') . PATH_SEP . 'log' . PATH_SEP;
|
||||
if (isset($sysConf['logs_location'])) {
|
||||
$path = !empty($sysConf['logs_location']) ? $sysConf['logs_location'] : $path;
|
||||
}
|
||||
$this->setPathFile($path);
|
||||
|
||||
//Set maximal amount of files to keep (0 means unlimited)
|
||||
$maxFilesToKeep = 60;
|
||||
if (isset($sysConf['logs_max_files'])) {
|
||||
$maxFilesToKeep = !empty($sysConf['logs_max_files']) ? $sysConf['logs_max_files'] : $maxFilesToKeep;
|
||||
}
|
||||
$this->setMaxFiles($maxFilesToKeep);
|
||||
|
||||
/**
|
||||
* The permissions are normally set at the operating system level, and it's the IT administrator responsibility to set the correct file permissions
|
||||
* It's not recommendable define in the env.ini configuration
|
||||
*/
|
||||
$permissionFile = 0666;
|
||||
$permissionFile = is_int($permissionFile) ? decoct($permissionFile) : $permissionFile;
|
||||
$this->setFilePermission($permissionFile);
|
||||
|
||||
$this->setFormatter();
|
||||
$this->setConfig($channel, $fileLog);
|
||||
|
||||
$this->testWriteLog($channel, $fileLog, [
|
||||
$defaultPath
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test write log
|
||||
*
|
||||
* @param string $channel
|
||||
* @param string $fileLog
|
||||
* @param array $paths
|
||||
*/
|
||||
private function testWriteLog($channel, $fileLog, $paths)
|
||||
{
|
||||
$fileInfo = pathinfo($fileLog);
|
||||
$timedFilename = str_replace(
|
||||
['{filename}', '{date}'],
|
||||
[$fileInfo['filename'], date('Y-m-d')],
|
||||
'{filename}-{date}'
|
||||
);
|
||||
|
||||
if (!empty($fileInfo['extension'])) {
|
||||
$timedFilename .= '.' . $fileInfo['extension'];
|
||||
}
|
||||
|
||||
if (!file_exists($this->getPathFile() . $timedFilename)) {
|
||||
try {
|
||||
$this->getLogger()->addInfo('Start writing the log file');
|
||||
} catch (UnexpectedValueException $exception) {
|
||||
//In case that the file can not be written, it will be written to the standard log file.
|
||||
error_log($exception->getMessage());
|
||||
if ($paths) {
|
||||
$path = array_shift($paths);
|
||||
$this->setPathFile($path);
|
||||
$this->setConfig($channel, $fileLog);
|
||||
$this->testWriteLog($channel, $fileLog, $paths);
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
//In case of an exception, it will be written to the standard log file.
|
||||
error_log($exception->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return Formatter
|
||||
*
|
||||
* @return LineFormatter
|
||||
*/
|
||||
public function getFormatter()
|
||||
{
|
||||
return $this->formatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set LineFormatter $formatter
|
||||
*/
|
||||
public function setFormatter()
|
||||
{
|
||||
$this->formatter = new LineFormatter($this->getOutput(), $this->getDateFormat());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return RotatingFileHandler
|
||||
*/
|
||||
public function getStream()
|
||||
{
|
||||
return $this->streamRoutating;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string File name
|
||||
*/
|
||||
public function setStream($fileLog)
|
||||
{
|
||||
//Set Routating Handler
|
||||
$this->streamRoutating = new Monolog\Handler\RotatingFileHandler($fileLog, $this->numOfKeepFiles, $this->levelDebug, $this->bubble, $this->filePermission);
|
||||
$this->streamRoutating->setFormatter($this->formatter);
|
||||
$this->streamRoutating = new RotatingFileHandler($this->getPathFile() . $fileLog,
|
||||
$this->getMaxFiles(),
|
||||
$this->getLevelDebug(),
|
||||
$this->isBubble(),
|
||||
$this->getFilePermissionOctDec());
|
||||
|
||||
$this->streamRoutating->setFormatter($this->getFormatter());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Logger
|
||||
*/
|
||||
public function getLogger()
|
||||
{
|
||||
return $this->registerLogger;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $channel The logging channel
|
||||
*/
|
||||
public function setLogger($channel)
|
||||
{
|
||||
//Create the channel and register the Logger with StreamRoutating
|
||||
$this->registerLogger = new Monolog\Logger($channel);
|
||||
$this->registerLogger->pushProcessor(new Monolog\Processor\IntrospectionProcessor());
|
||||
$this->registerLogger->pushHandler($this->streamRoutating);
|
||||
$this->registerLogger = new Logger($channel);
|
||||
$this->registerLogger->pushProcessor(new IntrospectionProcessor());
|
||||
$this->registerLogger->pushHandler($this->getStream());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return format output
|
||||
* @return string
|
||||
*/
|
||||
public function getOutput()
|
||||
{
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set format output
|
||||
*
|
||||
* @param string $output
|
||||
*/
|
||||
public function setOutput($output)
|
||||
{
|
||||
$this->output = $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return date format
|
||||
* @return string
|
||||
*/
|
||||
public function getDateFormat()
|
||||
{
|
||||
return $this->dateFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set date format
|
||||
* @param string $dateFormat
|
||||
*/
|
||||
public function setDateFormat($dateFormat)
|
||||
{
|
||||
$this->dateFormat = $dateFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return is can bubble up the stack or not.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isBubble()
|
||||
{
|
||||
return $this->bubble;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set bubble
|
||||
*
|
||||
* @param boolean $bubble
|
||||
*/
|
||||
public function setBubble($bubble)
|
||||
{
|
||||
$this->bubble = $bubble;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return level debug
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getLevelDebug()
|
||||
{
|
||||
return $this->levelDebug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return max files
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxFiles()
|
||||
{
|
||||
return $this->maxFilesToKeep;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set max files
|
||||
*
|
||||
* @param int $maxFilesToKeep
|
||||
*/
|
||||
public function setMaxFiles($maxFilesToKeep)
|
||||
{
|
||||
$this->maxFilesToKeep = $maxFilesToKeep;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return permissions of file
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getFilePermission()
|
||||
{
|
||||
return $this->filePermission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the decimal equivalent of the octal number represented by the octal_string argument.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getFilePermissionOctDec()
|
||||
{
|
||||
return octdec($this->filePermission);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set file permissions
|
||||
*
|
||||
* @param int $filePermission
|
||||
*/
|
||||
public function setFilePermission($filePermission)
|
||||
{
|
||||
$this->filePermission = $filePermission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the path where the file will be saved
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathFile()
|
||||
{
|
||||
return $this->pathFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set path
|
||||
*
|
||||
* @param string $pathFile
|
||||
*/
|
||||
public function setPathFile($pathFile)
|
||||
{
|
||||
$pathSep = '/';
|
||||
if (strpos($pathFile, '\\') !== false) {
|
||||
$pathSep = '\\';
|
||||
}
|
||||
if (substr($pathFile, -1, strlen($pathSep)) !== $pathSep) {
|
||||
$pathFile .= $pathSep;
|
||||
}
|
||||
$this->pathFile = $pathFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set level debug by string
|
||||
*
|
||||
* @param string $levelDebug
|
||||
*/
|
||||
public function setLevelDebug($levelDebug)
|
||||
{
|
||||
$level = static::$levels['DEBUG'];
|
||||
if (isset(static::$levels[$levelDebug])) {
|
||||
$level = static::$levels[$levelDebug];
|
||||
}
|
||||
$this->levelDebug = $level;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,9 +369,9 @@ class MonologProvider
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public static function getSingleton ($channel, $fileLog)
|
||||
public static function getSingleton($channel, $fileLog)
|
||||
{
|
||||
if (self::$instance == null) {
|
||||
if (self::$instance === null) {
|
||||
self::$instance = new MonologProvider($channel, $fileLog);
|
||||
} else {
|
||||
self::$instance->setConfig($channel, $fileLog);
|
||||
@@ -69,55 +383,27 @@ class MonologProvider
|
||||
* Set channel and fileLog
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*
|
||||
* @param string $channel The logging channel
|
||||
* @param string $fileLog name file
|
||||
*/
|
||||
public function setConfig ($channel, $fileLog)
|
||||
public function setConfig($channel, $fileLog)
|
||||
{
|
||||
//Set Routating Handler
|
||||
$this->streamRoutating = new Monolog\Handler\RotatingFileHandler($fileLog, $this->numOfKeepFiles, $this->levelDebug, $this->bubble, $this->filePermission);
|
||||
$this->streamRoutating->setFormatter($this->formatter);
|
||||
|
||||
//Create the channel and register the Logger with StreamRoutating
|
||||
$this->registerLogger = new Monolog\Logger($channel);
|
||||
$this->registerLogger->pushProcessor(new Monolog\Processor\IntrospectionProcessor());
|
||||
$this->registerLogger->pushHandler($this->streamRoutating);
|
||||
$this->setStream($fileLog);
|
||||
$this->setLogger($channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* to register log
|
||||
* Register log
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*
|
||||
* @param int $level The logging level
|
||||
* @param string $message The log message
|
||||
* @param array $context The log context
|
||||
*/
|
||||
public function addLog ($level, $message, $context)
|
||||
public function addLog($level, $message, $context)
|
||||
{
|
||||
switch ($level) {
|
||||
case 100://DEBUG
|
||||
$this->registerLogger->addDebug($message, $context);
|
||||
break;
|
||||
case 200://INFO
|
||||
$this->registerLogger->addInfo($message, $context);
|
||||
break;
|
||||
case 250://NOTICE
|
||||
$this->registerLogger->addNotice($message, $context);
|
||||
break;
|
||||
case 300://WARNING
|
||||
$this->registerLogger->addWarning($message, $context);
|
||||
break;
|
||||
case 400://ERROR
|
||||
$this->registerLogger->addError($message, $context);
|
||||
break;
|
||||
case 500://CRITICAL
|
||||
$this->registerLogger->addCritical($message, $context);
|
||||
break;
|
||||
case 550://ALERT
|
||||
$this->registerLogger->addAlert($message, $context);
|
||||
break;
|
||||
case 600://EMERGENCY
|
||||
$this->registerLogger->addEmergency($message, $context);
|
||||
break;
|
||||
default:
|
||||
$this->registerLogger->addDebug($message, $context);
|
||||
}
|
||||
$this->getLogger()->addRecord($level, $message, $context);
|
||||
}
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ EOREGEX;
|
||||
*/
|
||||
private function process_expr_list ($tokens)
|
||||
{
|
||||
$expr = "";
|
||||
$expr = [];
|
||||
$type = "";
|
||||
$prev_token = "";
|
||||
$skip_next = false;
|
||||
|
||||
@@ -281,7 +281,7 @@ class RBAC
|
||||
* gets the Role and their permissions for Administrator Processmaker
|
||||
*
|
||||
* @access public
|
||||
* @return $this->permissionsAdmin[ $permissionsAdmin ]
|
||||
* @return array $this->permissionsAdmin[ $permissionsAdmin ]
|
||||
*/
|
||||
public function loadPermissionAdmin()
|
||||
{
|
||||
@@ -611,7 +611,13 @@ class RBAC
|
||||
"PER_UID" => "00000000000000000000000000000065",
|
||||
"PER_CODE" => "PM_SETUP_CUSTOM_CASES_LIST",
|
||||
"PER_NAME" => "Setup Custom Cases List"
|
||||
],
|
||||
[
|
||||
'PER_UID' => '00000000000000000000000000000067',
|
||||
'PER_CODE' => 'PM_SETUP_LOG_FILES',
|
||||
'PER_NAME' => 'Log Files'
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
return $permissionsAdmin;
|
||||
|
||||
@@ -64,14 +64,15 @@ INSERT INTO `RBAC_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000063','PM_EDIT_USER_PROFILE_DEFAULT_CASES_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000064','PM_REASSIGNCASE_SUPERVISOR','2016-09-01 00:00:00','2016-09-01 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000065','PM_SETUP_CUSTOM_CASES_LIST','2017-03-27 00:00:00','2017-03-27 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000066','PM_GUEST_CASE','2017-03-27 00:00:00','2017-03-27 00:00:00',1,'00000000000000000000000000000002');
|
||||
('00000000000000000000000000000066','PM_GUEST_CASE','2017-03-27 00:00:00','2017-03-27 00:00:00',1,'00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000067','PM_SETUP_LOG_FILES','2018-02-06 00:00:00','2018-02-06 00:00:00',1,'00000000000000000000000000000002');
|
||||
|
||||
INSERT INTO `RBAC_ROLES` VALUES
|
||||
('00000000000000000000000000000001','','00000000000000000000000000000001','RBAC_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
|
||||
('00000000000000000000000000000002','','00000000000000000000000000000002','PROCESSMAKER_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
|
||||
('00000000000000000000000000000003','','00000000000000000000000000000002','PROCESSMAKER_OPERATOR','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
|
||||
('00000000000000000000000000000004', '', '00000000000000000000000000000002', 'PROCESSMAKER_MANAGER', '2010-03-29 09:14:15', '2010-03-29 09:19:53', 1),
|
||||
('00000000000000000000000000000005', '', '00000000000000000000000000000002', 'PROCESSMAKER_GUEST', '2009-02-01 12:24:36', '2009-02-01 12:24:36', 1);
|
||||
('00000000000000000000000000000004','','00000000000000000000000000000002','PROCESSMAKER_MANAGER','2010-03-29 09:14:15','2010-03-29 09:19:53',1),
|
||||
('00000000000000000000000000000005','','00000000000000000000000000000002','PROCESSMAKER_GUEST','2009-02-01 12:24:36','2009-02-01 12:24:36',1);
|
||||
|
||||
|
||||
INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
|
||||
@@ -140,6 +141,7 @@ INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000002','00000000000000000000000000000063'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000064'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000065'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000067'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000001'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000005'),
|
||||
('00000000000000000000000000000003','00000000000000000000000000000040'),
|
||||
@@ -218,8 +220,14 @@ INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
|
||||
('00000000000000000000000000000004','00000000000000000000000000000063'),
|
||||
('00000000000000000000000000000005','00000000000000000000000000000066');
|
||||
|
||||
INSERT INTO `RBAC_SYSTEMS` VALUES ('00000000000000000000000000000001','RBAC','2007-07-31 19:10:22','2007-08-03 12:24:36',1),('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','',''),
|
||||
('00000000000000000000000000000002','guest','674ba9750749d735ec9787d606170d78','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 ('00000000000000000000000000000001','00000000000000000000000000000002'),
|
||||
INSERT INTO `RBAC_SYSTEMS` VALUES
|
||||
('00000000000000000000000000000001','RBAC','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
|
||||
('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','',''),
|
||||
('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
|
||||
('00000000000000000000000000000001','00000000000000000000000000000002'),
|
||||
('00000000000000000000000000000002','00000000000000000000000000000005');
|
||||
|
||||
@@ -5783,6 +5783,7 @@ class Cases
|
||||
$resultCaseNotes = 0;
|
||||
$resultSummary = 0;
|
||||
$resultMessages = [];
|
||||
$resultReassignCases = [];
|
||||
|
||||
foreach ($permissions as $row) {
|
||||
$userUid = $row['USR_UID'];
|
||||
@@ -5927,7 +5928,7 @@ class Cases
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'MSGS_HISTORY':
|
||||
$listMessage= $objectPermission->objectPermissionMessage(
|
||||
$listMessage = $objectPermission->objectPermissionMessage(
|
||||
$appUid,
|
||||
$proUid,
|
||||
$userUid,
|
||||
@@ -5939,11 +5940,17 @@ class Cases
|
||||
);
|
||||
$resultMessages = array_merge($resultMessages, $listMessage);
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'REASSIGN_MY_CASES':
|
||||
$listReassign = $objectPermission->objectPermissionByReassignCases($appUid, $proUid, $tasUid);
|
||||
$resultReassignCases = array_merge($resultReassignCases, $listReassign);
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array(
|
||||
return [
|
||||
"DYNAFORMS" => $resultDynaforms,
|
||||
"INPUT_DOCUMENTS" => $resultInputs,
|
||||
"ATTACHMENTS" => $resultAttachments,
|
||||
@@ -5951,9 +5958,10 @@ class Cases
|
||||
"CASES_NOTES" => $resultCaseNotes,
|
||||
"MSGS_HISTORY" => $resultMessages
|
||||
/*----------------------------------********---------------------------------*/
|
||||
, "REASSIGN_MY_CASES" => $resultReassignCases
|
||||
, "SUMMARY_FORM" => $resultSummary
|
||||
/*----------------------------------********---------------------------------*/
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -258,22 +258,10 @@ class DbConnections
|
||||
|
||||
$dbServices = array ('mysql' => array ('id' => 'mysql','command' => 'mysqli_connect','name' => 'MySql'
|
||||
),'pgsql' => array ('id' => 'pgsql','command' => 'pg_connect','name' => 'PostgreSql'
|
||||
),'mssql' => array ('id' => 'mssql','command' => 'mssql_connect','name' => 'Microsoft SQL Server'
|
||||
),'mssql' => array ('id' => 'mssql','command' => 'mssql_connect','name' => 'Microsoft SQL Server (mssql extension)'
|
||||
),'sqlsrv' => array ('id' => 'mssql','command' => 'sqlsrv_connect','name' => 'Microsoft SQL Server (sqlsrv extension)'
|
||||
),'oracle' => array ('id' => 'oracle','command' => 'oci_connect','name' => 'Oracle'
|
||||
)
|
||||
);
|
||||
/*,
|
||||
'informix'=> Array(
|
||||
'id' => 'informix',
|
||||
'command' => 'ifx_connect',
|
||||
'name' => 'Informix'
|
||||
),
|
||||
'sqlite' => Array(
|
||||
'id' => 'sqlite',
|
||||
'command' => 'sqlite_open',
|
||||
'name' => 'SQLite'
|
||||
)
|
||||
*/
|
||||
));
|
||||
|
||||
foreach ($dbServices as $service) {
|
||||
if (@function_exists($service['command'])) {
|
||||
|
||||
@@ -253,12 +253,27 @@ class Net
|
||||
break;
|
||||
case 'mssql':
|
||||
//todo
|
||||
if ($this->db_instance != "") {
|
||||
$str_port = "";
|
||||
$link = @mssql_connect($this->ip . "\\" . $this->db_instance, $this->db_user, $this->db_passwd);
|
||||
if (!extension_loaded('sqlsrv')) {
|
||||
if ($this->db_instance != "") {
|
||||
$link = @mssql_connect($this->ip . "\\" . $this->db_instance, $this->db_user, $this->db_passwd);
|
||||
} else {
|
||||
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ":" . $this->db_port;
|
||||
$link = @mssql_connect($this->ip . $port, $this->db_user, $this->db_passwd);
|
||||
}
|
||||
} else {
|
||||
$str_port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ":" . $this->db_port;
|
||||
$link = @mssql_connect($this->ip . $str_port, $this->db_user, $this->db_passwd);
|
||||
if ($this->db_instance != "") {
|
||||
$server = $this->ip . "\\" . $this->db_instance;
|
||||
} else {
|
||||
$server = $this->ip;
|
||||
}
|
||||
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ", " . $this->db_port;
|
||||
$server .= $port;
|
||||
$opt = [
|
||||
'UID' => $this->db_user,
|
||||
'PWD' => $this->db_passwd,
|
||||
'Database' => $this->db_sourcename
|
||||
];
|
||||
$link = @sqlsrv_connect($server, $opt);
|
||||
}
|
||||
|
||||
if ($link) {
|
||||
@@ -382,15 +397,32 @@ class Net
|
||||
}
|
||||
break;
|
||||
case 'mssql':
|
||||
if ($this->db_instance != "") {
|
||||
$str_port = "";
|
||||
$link = @mssql_connect($this->ip . "\\" . $this->db_instance, $this->db_user, $this->db_passwd);
|
||||
if (!extension_loaded('sqlsrv')) {
|
||||
if ($this->db_instance != "") {
|
||||
$link = @mssql_connect($this->ip . "\\" . $this->db_instance, $this->db_user, $this->db_passwd);
|
||||
} else {
|
||||
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ":" . $this->db_port;
|
||||
$link = @mssql_connect($this->ip . $port, $this->db_user, $this->db_passwd);
|
||||
}
|
||||
} else {
|
||||
$str_port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ":" . $this->db_port;
|
||||
$link = @mssql_connect($this->ip . $str_port, $this->db_user, $this->db_passwd);
|
||||
if ($this->db_instance != "") {
|
||||
$server = $this->ip . "\\" . $this->db_instance;
|
||||
} else {
|
||||
$server = $this->ip;
|
||||
}
|
||||
$port = (($this->db_port == "") || ($this->db_port == 0) || ($this->db_port == 1433)) ? "" : ", " . $this->db_port;
|
||||
$server .= $port;
|
||||
$opt = [
|
||||
'UID' => $this->db_user,
|
||||
'PWD' => $this->db_passwd,
|
||||
'Database' => $this->db_sourcename
|
||||
];
|
||||
$link = $db = @sqlsrv_connect($server, $opt);
|
||||
}
|
||||
if ($link) {
|
||||
$db = @mssql_select_db($this->db_sourcename, $link);
|
||||
if (!extension_loaded('sqlsrv')) {
|
||||
$db = @mssql_select_db($this->db_sourcename, $link);
|
||||
}
|
||||
if ($db) {
|
||||
$stat->status = 'SUCCESS';
|
||||
$this->errstr = "";
|
||||
|
||||
@@ -707,7 +707,8 @@ class PmDynaform
|
||||
if ($value[0] === $json->variable) {
|
||||
continue;
|
||||
}
|
||||
$jsonSearch = $this->jsonsf(G::json_decode($this->record["DYN_CONTENT"]), $value[0], $json->variable === "" ? "id" : "variable");
|
||||
$jsonDecode = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
$jsonSearch = $this->jsonsf($jsonDecode, $value[0], $json->variable === "" ? "id" : "variable");
|
||||
$a = $this->getValuesDependentFields($jsonSearch);
|
||||
foreach ($a as $i => $v) {
|
||||
$data[$i] = $v;
|
||||
|
||||
@@ -15,6 +15,9 @@ use ProcessMaker\BusinessModel\Cases\InputDocument;
|
||||
|
||||
class ObjectPermission extends BaseObjectPermission
|
||||
{
|
||||
const OP_PARTICIPATE_NO = 0;
|
||||
const OP_PARTICIPATE_YES = 1;
|
||||
const OP_PARTICIPATE_NONE = 2;
|
||||
/**
|
||||
* Get the fields related to the user uid
|
||||
*
|
||||
@@ -161,32 +164,21 @@ class ObjectPermission extends BaseObjectPermission
|
||||
* @param string $proUid the uid of the process
|
||||
* @param string $tasUid the uid of the task
|
||||
* @param string $action for the object permissions VIEW, BLOCK, RESEND
|
||||
* this parameter is no used for the permission REASSIGN_MY_CASES
|
||||
* @param array $caseData for review the case status DRAFT, TODO, COMPLETED, PAUSED
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function verifyObjectPermissionPerUser ($usrUid, $proUid, $tasUid = '', $action = '', $caseData = array())
|
||||
{
|
||||
$userPermissions = array();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, $usrUid)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::USR_UID, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
$oCriteria->add(ObjectPermissionPeer::PRO_UID, $proUid);
|
||||
$oCriteria->add(ObjectPermissionPeer::OP_ACTION, $action);
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, $tasUid)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
$userPermissions = [];
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(ObjectPermissionPeer::USR_UID, ['','0',$usrUid], Criteria::IN);
|
||||
$criteria->add(ObjectPermissionPeer::PRO_UID, $proUid);
|
||||
$criteria->add(ObjectPermissionPeer::OP_ACTION, ['','0',$action], Criteria::IN);
|
||||
$criteria->add(ObjectPermissionPeer::TAS_UID, ['','0',$tasUid], Criteria::IN);
|
||||
|
||||
$rs = ObjectPermissionPeer::doSelectRS($oCriteria);
|
||||
$rs = ObjectPermissionPeer::doSelectRS($criteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rs->next()) {
|
||||
@@ -219,19 +211,13 @@ class ObjectPermission extends BaseObjectPermission
|
||||
$groupPermissions = array();
|
||||
|
||||
foreach ($records as $group) {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ObjectPermissionPeer::USR_UID, $group);
|
||||
$oCriteria->add(ObjectPermissionPeer::PRO_UID, $proUid);
|
||||
$oCriteria->add(ObjectPermissionPeer::OP_ACTION, $action);
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, $tasUid)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(ObjectPermissionPeer::USR_UID, $group);
|
||||
$criteria->add(ObjectPermissionPeer::PRO_UID, $proUid);
|
||||
$criteria->add(ObjectPermissionPeer::OP_ACTION, ['','0',$action], Criteria::IN);
|
||||
$criteria->add(ObjectPermissionPeer::TAS_UID, ['','0',$tasUid], Criteria::IN);
|
||||
|
||||
$rs = ObjectPermissionPeer::doSelectRS($oCriteria);
|
||||
$rs = ObjectPermissionPeer::doSelectRS($criteria);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
@@ -425,6 +411,44 @@ class ObjectPermission extends BaseObjectPermission
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the access to the permission REASSIGN_MY_CASES over the case
|
||||
* Check if the case is TO_DO and if the $tasUid is not empty we will to consider the thread in this task
|
||||
*
|
||||
* @param string $appUid the uid of the case
|
||||
* @param string $proUid the uid of the process
|
||||
* @param string $tasUid the uid of the target Task
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function objectPermissionByReassignCases($appUid, $proUid, $tasUid = '')
|
||||
{
|
||||
$result = [];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->addSelectColumn(ApplicationPeer::APP_UID);
|
||||
$criteria->add(ApplicationPeer::APP_UID, $appUid, Criteria::EQUAL);
|
||||
$criteria->add(ApplicationPeer::PRO_UID, $proUid, Criteria::EQUAL);
|
||||
$criteria->add(ApplicationPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL);
|
||||
|
||||
//Review if the target task is OPEN
|
||||
if (!empty($tasUid)) {
|
||||
$criteria->addJoin(AppDelegationPeer::APP_NUMBER, ApplicationPeer::APP_NUMBER, Criteria::LEFT_JOIN);
|
||||
$criteria->add(AppDelegationPeer::TAS_UID, $tasUid, Criteria::EQUAL);
|
||||
$criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN', Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$dataset = ApplicationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
if ($row = $dataset->getRow()) {
|
||||
$result[] = $row['APP_UID'];
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the user has a objectPermission for some process
|
||||
*
|
||||
|
||||
@@ -79,7 +79,7 @@ class ObjectPermissionMapBuilder
|
||||
|
||||
$tMap->addColumn('OP_PARTICIPATE', 'OpParticipate', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('OP_OBJ_TYPE', 'OpObjType', 'string', CreoleTypes::VARCHAR, true, 15);
|
||||
$tMap->addColumn('OP_OBJ_TYPE', 'OpObjType', 'string', CreoleTypes::VARCHAR, true, 20);
|
||||
|
||||
$tMap->addColumn('OP_OBJ_UID', 'OpObjUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
@@ -115,7 +115,7 @@ class ObjectPermissionMapBuilder
|
||||
|
||||
$tMap->addValidator('OP_PARTICIPATE', 'required', 'propel.validator.RequiredValidator', '', 'Participation is required.');
|
||||
|
||||
$tMap->addValidator('OP_OBJ_TYPE', 'maxLength', 'propel.validator.MaxLengthValidator', '15', 'Object type can be no larger than 15 in size');
|
||||
$tMap->addValidator('OP_OBJ_TYPE', 'maxLength', 'propel.validator.MaxLengthValidator', '20', 'Object type can be no larger than 20 in size');
|
||||
|
||||
$tMap->addValidator('OP_OBJ_TYPE', 'required', 'propel.validator.RequiredValidator', '', 'Object type is required.');
|
||||
|
||||
|
||||
@@ -1995,7 +1995,7 @@
|
||||
<column name="OP_USER_RELATION" type="INTEGER" required="true" default="0"/>
|
||||
<column name="OP_TASK_SOURCE" type="VARCHAR" size="32" required="" default="0"/>
|
||||
<column name="OP_PARTICIPATE" type="INTEGER" required="true" default="0"/>
|
||||
<column name="OP_OBJ_TYPE" type="VARCHAR" size="15" required="true" default="0"/>
|
||||
<column name="OP_OBJ_TYPE" type="VARCHAR" size="20" required="true" default="0"/>
|
||||
<column name="OP_OBJ_UID" type="VARCHAR" size="32" required="true" default="0"/>
|
||||
<column name="OP_ACTION" type="VARCHAR" size="10" required="true" default="0"/>
|
||||
<column name="OP_CASE_STATUS" type="VARCHAR" size="10" required="false" default="0"/>
|
||||
@@ -2028,7 +2028,7 @@
|
||||
<rule name="required" message="Participation is required."/>
|
||||
</validator>
|
||||
<validator column="OP_OBJ_TYPE">
|
||||
<rule name="maxLength" value="15" message="Object type can be no larger than ${value} in size"/>
|
||||
<rule name="maxLength" value="20" message="Object type can be no larger than ${value} in size"/>
|
||||
<rule name="required" message="Object type is required."/>
|
||||
</validator>
|
||||
<validator column="OP_OBJ_UID">
|
||||
@@ -4165,7 +4165,7 @@
|
||||
<column name="ADDON_NICK" type="VARCHAR" size="255" required="true"/>
|
||||
<column name="ADDON_DOWNLOAD_FILENAME" type="VARCHAR" size="1024" required="false"/>
|
||||
<column name="ADDON_DESCRIPTION" type="VARCHAR" size="2048" required="false"/>
|
||||
<column name="ADDON_STATE" type="VARCHAR" size="255" required="true"/>
|
||||
<column name="ADDON_STATE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="ADDON_STATE_CHANGED" type="TIMESTAMP" required="false"/>
|
||||
<column name="ADDON_STATUS" type="VARCHAR" size="255" required="true"/>
|
||||
<column name="ADDON_VERSION" type="VARCHAR" size="255" required="true"/>
|
||||
|
||||
@@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ProcessMaker (Branch 3.2.3)\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2017-11-22 20:50:02\n"
|
||||
"PO-Revision-Date: 2018-02-19 20:22:41\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Colosa Developers Team <developers@colosa.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -8321,6 +8321,18 @@ msgstr "The file {filename} doesn't contain class: {className}"
|
||||
msgid "File \"{0}\" imported successfully."
|
||||
msgstr "File \"{0}\" imported successfully."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_FILE_LOG_CREATED
|
||||
#: LABEL/ID_FILE_LOG_CREATED
|
||||
msgid "Created on"
|
||||
msgstr "Created on"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_FILE_LOG_SIZE
|
||||
#: LABEL/ID_FILE_LOG_SIZE
|
||||
msgid "File size"
|
||||
msgstr "File size"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_FILE_NAME
|
||||
#: LABEL/ID_FILE_NAME
|
||||
@@ -8783,6 +8795,12 @@ msgstr "Displaying emails {0} - {1} of {2}"
|
||||
msgid "Displaying events {0} - {1} of {2}"
|
||||
msgstr "Displaying events {0} - {1} of {2}"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_GRID_PAGE_DISPLAYING_FILE_LOGS
|
||||
#: LABEL/ID_GRID_PAGE_DISPLAYING_FILE_LOGS
|
||||
msgid "Displaying log files {0} - {1} of {2}"
|
||||
msgstr "Displaying log files {0} - {1} of {2}"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_GRID_PAGE_DISPLAYING_GROUPS_MESSAGE
|
||||
#: LABEL/ID_GRID_PAGE_DISPLAYING_GROUPS_MESSAGE
|
||||
@@ -10199,12 +10217,6 @@ msgstr "Issued to"
|
||||
msgid "is not registered!"
|
||||
msgstr "is not registered!"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_THE_USERNAME_EMAIL_IS_INCORRECT
|
||||
#: LABEL/ID_THE_USERNAME_EMAIL_IS_INCORRECT
|
||||
msgid "The username or email is incorrect"
|
||||
msgstr "The username or email is incorrect"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_IS_REQUIRED
|
||||
#: LABEL/ID_IS_REQUIRED
|
||||
@@ -10949,6 +10961,12 @@ msgstr "toolbar placement"
|
||||
msgid "(HH:MM) Format 24 hrs."
|
||||
msgstr "(HH:MM) Format 24 hrs."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_0a10134c1999989ce854ac519eb97249
|
||||
#: LABEL/ID_MAFE_0a10134c1999989ce854ac519eb97249
|
||||
msgid "Web Entry Anonymous Authentication"
|
||||
msgstr "Web Entry Anonymous Authentication"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_0a33cdf242201623275b9897d8b4d8c4
|
||||
#: LABEL/ID_MAFE_0a33cdf242201623275b9897d8b4d8c4
|
||||
@@ -10997,12 +11015,24 @@ msgstr "View all"
|
||||
msgid "Please configure a script to send a signal."
|
||||
msgstr "Please configure a script to send a signal."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_0b9d04ab06dac3da0142bb369637bfa4
|
||||
#: LABEL/ID_MAFE_0b9d04ab06dac3da0142bb369637bfa4
|
||||
msgid "qr code"
|
||||
msgstr "qr code"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_0bb8309239953b782fec18706fe60b4a
|
||||
#: LABEL/ID_MAFE_0bb8309239953b782fec18706fe60b4a
|
||||
msgid "Digital"
|
||||
msgstr "Digital"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_0bf7c19f7eac3bfa5ad960a50ad602dc
|
||||
#: LABEL/ID_MAFE_0bf7c19f7eac3bfa5ad960a50ad602dc
|
||||
msgid "[LABEL/ID_MAFE_0bf7c19f7eac3bfa5ad960a50ad602dc] subtitle"
|
||||
msgstr "subtitle"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_0c06d45a9f58aba5f4c4d50b03f65b04
|
||||
#: LABEL/ID_MAFE_0c06d45a9f58aba5f4c4d50b03f65b04
|
||||
@@ -11837,6 +11867,12 @@ msgstr "An unexpected error while deleting the step, please try again later."
|
||||
msgid "B5"
|
||||
msgstr "B5"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_2a304a1348456ccd2234cd71a81bd338
|
||||
#: LABEL/ID_MAFE_2a304a1348456ccd2234cd71a81bd338
|
||||
msgid "[LABEL/ID_MAFE_2a304a1348456ccd2234cd71a81bd338] link"
|
||||
msgstr "link"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_2a37d240713f300cf06d390798b0efad
|
||||
#: LABEL/ID_MAFE_2a37d240713f300cf06d390798b0efad
|
||||
@@ -11993,6 +12029,18 @@ msgstr "Store value in"
|
||||
msgid "is duplicated."
|
||||
msgstr "is duplicated."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_30a2dae0a135701b862050465b3e4e97
|
||||
#: LABEL/ID_MAFE_30a2dae0a135701b862050465b3e4e97
|
||||
msgid "Triggers after and before a step are not supported when working offline"
|
||||
msgstr "Triggers after and before a step are not supported when working offline"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_30c40215e6d00c574ca23451003db9b9
|
||||
#: LABEL/ID_MAFE_30c40215e6d00c574ca23451003db9b9
|
||||
msgid "[LABEL/ID_MAFE_30c40215e6d00c574ca23451003db9b9] checkgroup"
|
||||
msgstr "checkgroup"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_3120001274fa32a921770c1b41e6dc0a
|
||||
#: LABEL/ID_MAFE_3120001274fa32a921770c1b41e6dc0a
|
||||
@@ -12467,6 +12515,12 @@ msgstr "August"
|
||||
msgid "Messages"
|
||||
msgstr "Messages"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_41e80c3ce414de15ab19d996f7072429
|
||||
#: LABEL/ID_MAFE_41e80c3ce414de15ab19d996f7072429
|
||||
msgid "fileupload"
|
||||
msgstr "fileupload"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_41fffd09332a35491d3bed5a34f91410
|
||||
#: LABEL/ID_MAFE_41fffd09332a35491d3bed5a34f91410
|
||||
@@ -12479,6 +12533,12 @@ msgstr "http://eonasdan.github.io/bootstrap-datetimepicker/</a>"
|
||||
msgid "[LABEL/ID_MAFE_42184184a95464c63c790acc3a69e564] Routing History"
|
||||
msgstr "Routing History"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_421b47ffd946ca083b65cd668c6b17e6
|
||||
#: LABEL/ID_MAFE_421b47ffd946ca083b65cd668c6b17e6
|
||||
msgid "video"
|
||||
msgstr "video"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_4252b72e6ebcd4d4b4c2e46a786f03d2
|
||||
#: LABEL/ID_MAFE_4252b72e6ebcd4d4b4c2e46a786f03d2
|
||||
@@ -12833,6 +12893,12 @@ msgstr "Generate Link"
|
||||
msgid "Please insert variable before adding to the list."
|
||||
msgstr "Please insert variable before adding to the list."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_5174307b9097d47b1a506bc8171c2bb3
|
||||
#: LABEL/ID_MAFE_5174307b9097d47b1a506bc8171c2bb3
|
||||
msgid "textbox"
|
||||
msgstr "textbox"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_5174d1309f275ba6f275db3af9eb3e18
|
||||
#: LABEL/ID_MAFE_5174d1309f275ba6f275db3af9eb3e18
|
||||
@@ -13607,6 +13673,12 @@ msgstr "Inclusive Gateway"
|
||||
msgid "Assignee saved successfully"
|
||||
msgstr "Assignee saved successfully"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_6be8bfc7078373aa92b3a862b5253e7e
|
||||
#: LABEL/ID_MAFE_6be8bfc7078373aa92b3a862b5253e7e
|
||||
msgid "Mobile controls"
|
||||
msgstr "Mobile controls"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_6c24f6923944d3f9d84bcf924661abff
|
||||
#: LABEL/ID_MAFE_6c24f6923944d3f9d84bcf924661abff
|
||||
@@ -13769,12 +13841,6 @@ msgstr "Properties saved successfully"
|
||||
msgid "Error Update File"
|
||||
msgstr "Error Update File"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_7215ee9c7d9dc229d2921a40e899ec5f
|
||||
#: LABEL/ID_MAFE_7215ee9c7d9dc229d2921a40e899ec5f
|
||||
msgid "[LABEL/ID_MAFE_7215ee9c7d9dc229d2921a40e899ec5f] "
|
||||
msgstr ""
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_725255d7ccc0cf426c1da6abe0afe7e4
|
||||
#: LABEL/ID_MAFE_725255d7ccc0cf426c1da6abe0afe7e4
|
||||
@@ -13907,6 +13973,12 @@ msgstr "Sub-process"
|
||||
msgid "Routing"
|
||||
msgstr "Routing"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_78805a221a988e79ef3f42d7c5bfd418
|
||||
#: LABEL/ID_MAFE_78805a221a988e79ef3f42d7c5bfd418
|
||||
msgid "image"
|
||||
msgstr "image"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_788287625aa640447c5d9fff50644915
|
||||
#: LABEL/ID_MAFE_788287625aa640447c5d9fff50644915
|
||||
@@ -15335,6 +15407,12 @@ msgstr "Do you want to delete this permission?"
|
||||
msgid "setOrientation(): parameter is not valid"
|
||||
msgstr "setOrientation(): parameter is not valid"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_a5ca0b5894324f8bb54bb9fffad29d1e
|
||||
#: LABEL/ID_MAFE_a5ca0b5894324f8bb54bb9fffad29d1e
|
||||
msgid "audio"
|
||||
msgstr "audio"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_a603905470e2a5b8c13e96b579ef0dba
|
||||
#: LABEL/ID_MAFE_a603905470e2a5b8c13e96b579ef0dba
|
||||
@@ -15509,6 +15587,12 @@ msgstr "Text to search"
|
||||
msgid "Create Message Type"
|
||||
msgstr "Create Message Type"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ac201fd270c3b96beab24f2829780ab2
|
||||
#: LABEL/ID_MAFE_ac201fd270c3b96beab24f2829780ab2
|
||||
msgid "signature"
|
||||
msgstr "signature"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ac48a7776ff0e8dc13b0a1300fc0a75f
|
||||
#: LABEL/ID_MAFE_ac48a7776ff0e8dc13b0a1300fc0a75f
|
||||
@@ -15533,6 +15617,12 @@ msgstr "required"
|
||||
msgid "forms"
|
||||
msgstr "forms"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_acd6337dfeb8a29685e3856bfa76756c
|
||||
#: LABEL/ID_MAFE_acd6337dfeb8a29685e3856bfa76756c
|
||||
msgid "History of use"
|
||||
msgstr "History of use"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ad7bdeed2bf3d72e17abe1a8d0508958
|
||||
#: LABEL/ID_MAFE_ad7bdeed2bf3d72e17abe1a8d0508958
|
||||
@@ -15761,6 +15851,12 @@ msgstr "<tr><td><b>Hour</b></td><td>H</td><td>0 1 ... 22 23</td></tr><tr><td></t
|
||||
msgid "[LABEL/ID_MAFE_b5a7adde1af5c87d7fd797b6245c2a39] Description"
|
||||
msgstr "Description"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_b5ceb80c90c6b834060fcd7e0d2c0c28
|
||||
#: LABEL/ID_MAFE_b5ceb80c90c6b834060fcd7e0d2c0c28
|
||||
msgid "subform"
|
||||
msgstr "subform"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_b5d4d25fe3fa9f8263b5f279a372b709
|
||||
#: LABEL/ID_MAFE_b5d4d25fe3fa9f8263b5f279a372b709
|
||||
@@ -16259,6 +16355,12 @@ msgstr "OutPut Document (s)"
|
||||
msgid "Execute a trigger when a case is opened"
|
||||
msgstr "Execute a trigger when a case is opened"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_c79bdf421714f5087fc34b7c538b6807
|
||||
#: LABEL/ID_MAFE_c79bdf421714f5087fc34b7c538b6807
|
||||
msgid "[LABEL/ID_MAFE_c79bdf421714f5087fc34b7c538b6807] submit"
|
||||
msgstr "submit"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_c7f8f8652db6d74e086d297129179d2f
|
||||
#: LABEL/ID_MAFE_c7f8f8652db6d74e086d297129179d2f
|
||||
@@ -16451,6 +16553,12 @@ msgstr "multiple"
|
||||
msgid "[LABEL/ID_MAFE_ce4d4b319a571fda7b689cee71432d5d] Custom Trigger"
|
||||
msgstr "Custom Trigger"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ce50a09343724eb82df11390e2c1de18
|
||||
#: LABEL/ID_MAFE_ce50a09343724eb82df11390e2c1de18
|
||||
msgid "[LABEL/ID_MAFE_ce50a09343724eb82df11390e2c1de18] button"
|
||||
msgstr "button"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ce5f8a0a2fea8e45ddfd3fe51ae60703
|
||||
#: LABEL/ID_MAFE_ce5f8a0a2fea8e45ddfd3fe51ae60703
|
||||
@@ -16901,6 +17009,12 @@ msgstr "Variable for Case priority"
|
||||
msgid "Parallel gateway"
|
||||
msgstr "Parallel gateway"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_dfeaaeb4316477bd556ea5e8c3295887
|
||||
#: LABEL/ID_MAFE_dfeaaeb4316477bd556ea5e8c3295887
|
||||
msgid "datetime"
|
||||
msgstr "datetime"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_e019dd49d439bb6d6765f7d2f6915333
|
||||
#: LABEL/ID_MAFE_e019dd49d439bb6d6765f7d2f6915333
|
||||
@@ -17147,6 +17261,12 @@ msgstr "Days"
|
||||
msgid "- Select an input document -"
|
||||
msgstr "- Select an input document -"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_e889b1ca9624a9fbe23c4f062d7e5f01
|
||||
#: LABEL/ID_MAFE_e889b1ca9624a9fbe23c4f062d7e5f01
|
||||
msgid "geomap"
|
||||
msgstr "geomap"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_e8be55bf3a30501aef09d2e74de97976
|
||||
#: LABEL/ID_MAFE_e8be55bf3a30501aef09d2e74de97976
|
||||
@@ -17435,6 +17555,12 @@ msgstr "Flow"
|
||||
msgid "Step editing successfully."
|
||||
msgstr "Step editing successfully."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_f1e5d7a5fe13498abbdeb0f1f19136a8
|
||||
#: LABEL/ID_MAFE_f1e5d7a5fe13498abbdeb0f1f19136a8
|
||||
msgid "panel"
|
||||
msgstr "panel"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_f217bd2ed27f82d5c856035f95801373
|
||||
#: LABEL/ID_MAFE_f217bd2ed27f82d5c856035f95801373
|
||||
@@ -17765,6 +17891,12 @@ msgstr "Saved correctly"
|
||||
msgid "textfield"
|
||||
msgstr "textfield"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ff4a008470319a22d9cf3d14af485977
|
||||
#: LABEL/ID_MAFE_ff4a008470319a22d9cf3d14af485977
|
||||
msgid "[LABEL/ID_MAFE_ff4a008470319a22d9cf3d14af485977] grid"
|
||||
msgstr "grid"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_ffc1dca70df11105d22d9f427a9e260b
|
||||
#: LABEL/ID_MAFE_ffc1dca70df11105d22d9f427a9e260b
|
||||
@@ -19109,6 +19241,12 @@ msgstr "After routing notify the next assigned user(s)"
|
||||
msgid "Notify users of case"
|
||||
msgstr "Notify users of case"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_NOT_ABLE_REASSIGN
|
||||
#: LABEL/ID_NOT_ABLE_REASSIGN
|
||||
msgid "You are not able to reassign cases of this process."
|
||||
msgstr "You are not able to reassign cases of this process."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_NOT_AVAILABLE_DATABASE
|
||||
#: LABEL/ID_NOT_AVAILABLE_DATABASE
|
||||
@@ -20111,18 +20249,18 @@ msgstr "Photo"
|
||||
msgid "PHP Information"
|
||||
msgstr "PHP Information"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PHP_MYSQLI_NOT_INSTALL
|
||||
#: LABEL/ID_PHP_MYSQLI_NOT_INSTALL
|
||||
msgid "php-mysqli is Not Installed"
|
||||
msgstr "php-mysqli is Not Installed"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PHP_MSSQL_NOT_INSTALLED
|
||||
#: LABEL/ID_PHP_MSSQL_NOT_INSTALLED
|
||||
msgid "php-mssql is Not Installed"
|
||||
msgstr "php-mssql is Not Installed"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PHP_MYSQLI_NOT_INSTALL
|
||||
#: LABEL/ID_PHP_MYSQLI_NOT_INSTALL
|
||||
msgid "php-mysqli is Not Installed"
|
||||
msgstr "php-mysqli is Not Installed"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PHP_MYSQL_NOT _INSTALL
|
||||
#: LABEL/ID_PHP_MYSQL_NOT _INSTALL
|
||||
@@ -21743,6 +21881,12 @@ msgstr "Case #{APP_NUMBER} was reassigned to user {USER}."
|
||||
msgid "Reassign All Cases by Task"
|
||||
msgstr "Reassign All Cases by Task"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_REASSIGN_CASE
|
||||
#: LABEL/ID_REASSIGN_CASE
|
||||
msgid "Reassign Case"
|
||||
msgstr "Reassign Case"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_REASSIGN_CASES
|
||||
#: LABEL/ID_REASSIGN_CASES
|
||||
@@ -21755,6 +21899,12 @@ msgstr "Reassign Cases"
|
||||
msgid "Do you want to reassign the case?"
|
||||
msgstr "Do you want to reassign the case?"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_REASSIGN_MY_CASES
|
||||
#: LABEL/ID_REASSIGN_MY_CASES
|
||||
msgid "Reassign my cases"
|
||||
msgstr "Reassign my cases"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_REASSIGN_TO
|
||||
#: LABEL/ID_REASSIGN_TO
|
||||
@@ -23777,6 +23927,12 @@ msgstr "Stage"
|
||||
msgid "Stages"
|
||||
msgstr "Stages"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_STANDARD_LOGGING
|
||||
#: LABEL/ID_STANDARD_LOGGING
|
||||
msgid "Log Files"
|
||||
msgstr "Log Files"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_STARTED_CASES
|
||||
#: LABEL/ID_STARTED_CASES
|
||||
@@ -24551,6 +24707,12 @@ msgstr "The change might cause data loss in the PM table. Do you want to continu
|
||||
msgid "Please complete the reassign reason."
|
||||
msgstr "Please complete the reassign reason."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_THE_USERNAME_EMAIL_IS_INCORRECT
|
||||
#: LABEL/ID_THE_USERNAME_EMAIL_IS_INCORRECT
|
||||
msgid "The username or email is incorrect"
|
||||
msgstr "The username or email is incorrect"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_THIS_MONTH
|
||||
#: LABEL/ID_THIS_MONTH
|
||||
@@ -28130,7 +28292,7 @@ msgstr "File"
|
||||
# additionalTables/doExport.xml?SIZE
|
||||
# additionalTables/doExport.xml
|
||||
#: caption - SIZE
|
||||
msgid "File size"
|
||||
msgid "[additionalTables/doExport.xml?SIZE] File size"
|
||||
msgstr "File size"
|
||||
|
||||
# additionalTables/doExport.xml?META
|
||||
|
||||
107
workflow/engine/controllers/FileLogs.php
Normal file
107
workflow/engine/controllers/FileLogs.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
/**
|
||||
* File Logs controller
|
||||
* @inherits Controller
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
class FileLogs extends Controller
|
||||
{
|
||||
|
||||
// Class properties
|
||||
private $urlProxy;
|
||||
private $credentials;
|
||||
|
||||
const version = '1.0';
|
||||
|
||||
// Class constructor
|
||||
public function __construct()
|
||||
{
|
||||
global $RBAC;
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LOG_FILES') !== 1) {
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$designer = new Designer();
|
||||
$this->setCredentials(base64_encode(G::json_encode($designer->getCredentials())));
|
||||
$this->setUrlProxy(System::getHttpServerHostnameRequestsFrontEnd() . '/api/' . self::version . '/' . config('system.workspace') . '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return server host
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrlProxy()
|
||||
{
|
||||
return $this->urlProxy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set server host
|
||||
*
|
||||
* @param string $urlProxy
|
||||
*/
|
||||
public function setUrlProxy($urlProxy)
|
||||
{
|
||||
$this->urlProxy = $urlProxy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get credential oauth
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCredentials()
|
||||
{
|
||||
return $this->credentials;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Credentials
|
||||
*
|
||||
* @param string $credentials
|
||||
*/
|
||||
public function setCredentials($credentials)
|
||||
{
|
||||
$this->credentials = $credentials;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render list file logs
|
||||
*/
|
||||
public function fileList()
|
||||
{
|
||||
try {
|
||||
global $RBAC;
|
||||
if (isset($_SESSION['__FILE_LOGS_ERROR__'])) {
|
||||
$this->setJSVar('__FILE_LOGS_ERROR__', $_SESSION['__FILE_LOGS_ERROR__']);
|
||||
unset($_SESSION['__FILE_LOGS_ERROR__']);
|
||||
}
|
||||
|
||||
$this->setView('fileLogs/list');
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration('usersList', 'pageSize', null, $RBAC->aUserInfo['USER_INFO']['USR_UID']);
|
||||
|
||||
$config = [];
|
||||
$config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$this->setJSVar('urlProxy', $this->getUrlProxy());
|
||||
$this->setJSVar('credentials', $this->getCredentials());
|
||||
$this->setJSVar('CONFIG', $config);
|
||||
$this->includeExtJS('fileLogs/list');
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
} catch (Exception $error) {
|
||||
$_SESSION['__FILE_LOGS_ERROR__'] = $error->getMessage();
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -952,7 +952,7 @@ CREATE TABLE `OBJECT_PERMISSION`
|
||||
`OP_USER_RELATION` INTEGER default 0 NOT NULL,
|
||||
`OP_TASK_SOURCE` VARCHAR(32) default '0',
|
||||
`OP_PARTICIPATE` INTEGER default 0 NOT NULL,
|
||||
`OP_OBJ_TYPE` VARCHAR(15) default '0' NOT NULL,
|
||||
`OP_OBJ_TYPE` VARCHAR(20) default '0' NOT NULL,
|
||||
`OP_OBJ_UID` VARCHAR(32) default '0' NOT NULL,
|
||||
`OP_ACTION` VARCHAR(10) default '0' NOT NULL,
|
||||
`OP_CASE_STATUS` VARCHAR(10) default '0',
|
||||
@@ -2297,7 +2297,7 @@ CREATE TABLE `ADDONS_MANAGER`
|
||||
`ADDON_NICK` VARCHAR(255) NOT NULL,
|
||||
`ADDON_DOWNLOAD_FILENAME` VARCHAR(1024),
|
||||
`ADDON_DESCRIPTION` VARCHAR(2048),
|
||||
`ADDON_STATE` VARCHAR(255) NOT NULL,
|
||||
`ADDON_STATE` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`ADDON_STATE_CHANGED` DATETIME,
|
||||
`ADDON_STATUS` VARCHAR(255) NOT NULL,
|
||||
`ADDON_VERSION` VARCHAR(255) NOT NULL,
|
||||
|
||||
@@ -1,27 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* setup.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.
|
||||
*
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
@@ -228,6 +205,16 @@ if ($RBAC->userCanAccess('PM_SETUP') === 1 && $RBAC->userCanAccess('PM_SETUP_LOG
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess('PM_SETUP_LOG_FILES') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'STANDARD_LOGGING', '../FileLogs/fileList',
|
||||
G::LoadTranslation('ID_STANDARD_LOGGING'), '', '', 'logs'
|
||||
);
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'PM_REQUIREMENTS', '../setup/systemInfo',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\BusinessModel\Cases as BmCases;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
@@ -23,27 +24,41 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == "verifySession") {
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
|
||||
//Check if the user is a supervisor to this Process
|
||||
/** Action: Reassign from openCase */
|
||||
global $RBAC;
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) {
|
||||
$proUid = $_SESSION['PROCESS'];
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
$tasUid = $_SESSION['TASK'];
|
||||
|
||||
$response = new stdclass();
|
||||
$cases = new BmCases();
|
||||
$userAuthorization = $cases->userAuthorization(
|
||||
$RBAC->aUserInfo['USER_INFO']['USR_UID'],
|
||||
$proUid,
|
||||
$appUid,
|
||||
['PM_REASSIGNCASE', 'PM_REASSIGNCASE_SUPERVISOR'],
|
||||
['REASSIGN_MY_CASES' => ''],
|
||||
true,
|
||||
$tasUid
|
||||
);
|
||||
|
||||
if (
|
||||
$userAuthorization['rolesPermissions']['PM_REASSIGNCASE'] ||
|
||||
($userAuthorization['rolesPermissions']['PM_REASSIGNCASE_SUPERVISOR'] && $userAuthorization['supervisor']) ||
|
||||
in_array($appUid, $userAuthorization['objectPermissions']['REASSIGN_MY_CASES'])
|
||||
) {
|
||||
$response->reassigncase = true;
|
||||
$response->message = '';
|
||||
} elseif ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
} else {
|
||||
$response->reassigncase = false;
|
||||
$response->message = G::LoadTranslation('ID_NOT_ABLE_REASSIGN');
|
||||
$processUser = new ProcessUser();
|
||||
$listProcess = $processUser->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
if (in_array($_SESSION['PROCESS'], $listProcess)) {
|
||||
$response->reassigncase = true;
|
||||
}
|
||||
}
|
||||
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
class Ajax
|
||||
{
|
||||
public function getCaseMenu($params)
|
||||
@@ -144,61 +159,83 @@ class Ajax
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the options menu from action
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getActionOptions()
|
||||
{
|
||||
$APP_UID = $_SESSION['APPLICATION'];
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
$index = $_SESSION['INDEX'];
|
||||
$proUid = $_SESSION['PROCESS'];
|
||||
$tasUid = $_SESSION['TASK'];
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(AppThreadPeer::APP_THREAD_PARENT);
|
||||
$c->add(AppThreadPeer::APP_UID, $APP_UID);
|
||||
$c->add(AppThreadPeer::APP_UID, $appUid);
|
||||
$c->add(AppThreadPeer::APP_THREAD_STATUS, 'OPEN');
|
||||
$cant = AppThreadPeer::doCount($c);
|
||||
|
||||
$oCase = new Cases();
|
||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX']);
|
||||
$aFields = $oCase->loadCase($appUid, $index);
|
||||
|
||||
global $RBAC;
|
||||
|
||||
$options = array();
|
||||
$options = [];
|
||||
|
||||
switch ($aFields['APP_STATUS']) {
|
||||
case 'DRAFT':
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate');
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate'];
|
||||
} else {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase'];
|
||||
}
|
||||
|
||||
$options[] = array('text' => G::LoadTranslation('ID_DELETE'), 'fn' => 'deleteCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_DELETE'), 'fn' => 'deleteCase'];
|
||||
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign');
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'TO_DO':
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate');
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate'];
|
||||
if ($cant == 1) {
|
||||
if ($RBAC->userCanAccess('PM_CANCELCASE') == 1) {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase'];
|
||||
} else {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase', 'hide' => 'hiden');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase', 'hide' => 'hiden'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase'];
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign');
|
||||
$cases = new BmCases();
|
||||
$userAuthorization = $cases->userAuthorization(
|
||||
$RBAC->aUserInfo['USER_INFO']['USR_UID'],
|
||||
$proUid,
|
||||
$appUid,
|
||||
[],
|
||||
['REASSIGN_MY_CASES' => ''],
|
||||
false,
|
||||
$tasUid
|
||||
);
|
||||
if (
|
||||
$RBAC->userCanAccess('PM_REASSIGNCASE') == 1
|
||||
|| $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1
|
||||
|| in_array($appUid, $userAuthorization['objectPermissions']['REASSIGN_MY_CASES'])
|
||||
) {
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'CANCELLED':
|
||||
$options[] = array('text' => G::LoadTranslation('ID_REACTIVATE'), 'fn' => 'reactivateCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REACTIVATE'), 'fn' => 'reactivateCase'];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -217,9 +254,10 @@ class Ajax
|
||||
}
|
||||
|
||||
if ($aTask['TAS_TYPE'] == 'ADHOC') {
|
||||
$options[] = array('text' => G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn' => 'adhocAssignmentUsers');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn' => 'adhocAssignmentUsers'];
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
@@ -550,7 +588,7 @@ class Ajax
|
||||
$response = [];
|
||||
|
||||
try {
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$case = new BmCases();
|
||||
|
||||
$result = $case->getUsersToReassign($_SESSION['USER_LOGGED'], $taskUid, ['filter' => $search], $sortField, $sortDir, $start, $limit);
|
||||
|
||||
|
||||
@@ -184,12 +184,13 @@ if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjB
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//menu permissions
|
||||
/** Define actions menu in the cases list */
|
||||
$cnt = '';
|
||||
$reassignCase = ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) ? 'true' : 'false';
|
||||
$reassignCaseSup = ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) ? 'true':'false';
|
||||
$reassignCase = ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) ? 'true' : 'false';
|
||||
$reassignCaseSup = ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) ? 'true' : 'false';
|
||||
$oHeadPublisher->assign('varReassignCase', $reassignCase);
|
||||
$oHeadPublisher->assign('varReassignCaseSupervisor', $reassignCaseSup);
|
||||
|
||||
$c = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript('app/main', true);
|
||||
$oHeadPublisher->addExtJsScript('cases/casesList', false); //adding a javascript file .js
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdClass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
@@ -146,8 +147,10 @@ if ($actionAjax == "verifySession") {
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
/** Action: Reassign from casesList */
|
||||
GLOBAL $RBAC;
|
||||
$response = new stdclass();
|
||||
|
||||
//Check if the user is a supervisor to this Process
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) {
|
||||
$response->reassigncase = true;
|
||||
@@ -160,7 +163,6 @@ if ($actionAjax == "verifySession") {
|
||||
$listProcess = $processUser->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
$response->processeslist = G::json_encode($listProcess);
|
||||
}
|
||||
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\AuditLog\AuditLog;
|
||||
|
||||
global $RBAC;
|
||||
|
||||
if ($RBAC->userCanAccess("PM_SETUP") != 1) {
|
||||
@@ -6,166 +9,11 @@ if ($RBAC->userCanAccess("PM_SETUP") != 1) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration("auditLogList", "pageSize", null, $_SESSION["USER_LOGGED"]);
|
||||
|
||||
$config = array();
|
||||
$config["pageSize"] = (isset($configPage["pageSize"])) ? $configPage["pageSize"] : 20;
|
||||
|
||||
$arrayAction = array(
|
||||
"CreateUser" => G::LoadTranslation("ID_CREATE_USER"),
|
||||
"UpdateUser" => G::LoadTranslation("ID_UPDATE_USER"),
|
||||
"DeleteUser" => G::LoadTranslation("ID_DELETE_USER"),
|
||||
"EnableUser" => G::LoadTranslation("ID_ENABLE_USER"),
|
||||
"DisableUser" => G::LoadTranslation("ID_DISABLE_USER"),
|
||||
"AssignAuthenticationSource" => G::LoadTranslation("ID_ASSIGN_AUTHENTICATION_SOURCE"),
|
||||
"AssignUserToGroup" => G::LoadTranslation("ID_ASSIGN_USER_TO_GROUP"),
|
||||
"CreateAuthSource" => G::LoadTranslation("ID_CREATE_AUTH_SOURCE"),
|
||||
"UpdateAuthSource" => G::LoadTranslation("ID_UPDATE_AUTH_SOURCE"),
|
||||
"DeleteAuthSource" => G::LoadTranslation("ID_DELETE_AUTH_SOURCE"),
|
||||
"CreateRole" => G::LoadTranslation("ID_CREATE_ROLE"),
|
||||
"UpdateRole" => G::LoadTranslation("ID_UPDATE_ROLE"),
|
||||
"DeleteRole" => G::LoadTranslation("ID_DELETE_ROLE"),
|
||||
"AssignUserToRole" => G::LoadTranslation("ID_ASSIGN_USER_TO_ROLE"),
|
||||
"DeleteUserToRole" => G::LoadTranslation("ID_DELETE_USER_TO_ROLE"),
|
||||
"AddPermissionToRole" => G::LoadTranslation("ID_ADD_PERMISSION_TO_ROLE"),
|
||||
"DeletePermissionToRole" => G::LoadTranslation("ID_DELETE_PERMISSION_TO_ROLE"),
|
||||
"CreateSkin" => G::LoadTranslation("ID_CREATE_SKIN"),
|
||||
"ImportSkin" => G::LoadTranslation("ID_IMPORT_SKIN"),
|
||||
"ExportSkin" => G::LoadTranslation("ID_EXPORT_SKIN"),
|
||||
"DeleteSkin" => G::LoadTranslation("ID_DELETE_SKIN"),
|
||||
"CreateGroup" => G::LoadTranslation("ID_CREATE_GROUP"),
|
||||
"UpdateGroup" => G::LoadTranslation("ID_UPDATE_GROUP"),
|
||||
"DeleteGroup" => G::LoadTranslation("ID_DELETE_GROUP"),
|
||||
"CreateCategory" => G::LoadTranslation("ID_CREATE_CATEGORY"),
|
||||
"UpdateCategory" => G::LoadTranslation("ID_UPDATE_CATEGORY"),
|
||||
"DeleteCategory" => G::LoadTranslation("ID_DELETE_CATEGORY"),
|
||||
"BuildCache" => G::LoadTranslation("ID_BUILD_CACHE"),
|
||||
"ClearCache" => G::LoadTranslation("ID_CLEAR_CACHE"),
|
||||
"ClearCron" => G::LoadTranslation("ID_CLEAR_CRON"),
|
||||
"UpdateEnvironmentSettings" => G::LoadTranslation("ID_UPDATE_ENVIRONMENT_SETTINGS"),
|
||||
"UpdateLoginSettings" => G::LoadTranslation("ID_UPDATE_LOGIN_SETTINGS"),
|
||||
"EnableHeartBeat" => G::LoadTranslation("ID_ENABLE_HEART_BEAT"),
|
||||
"DisableHeartBeat" => G::LoadTranslation("ID_DISABLE_HEART_BEAT"),
|
||||
"CreatePmtable" => G::LoadTranslation("ID_CREATE_PMTABLE"),
|
||||
"UpdatePmtable" => G::LoadTranslation("ID_UPDATE_PMTABLE"),
|
||||
"DeletePmtable" => G::LoadTranslation("ID_DELETE_PMTABLE"),
|
||||
"AddDataPmtable" => G::LoadTranslation("ID_ADD_DATA_PMTABLE"),
|
||||
"UpdateDataPmtable" => G::LoadTranslation("ID_UPDATE_DATA_PMTABLE"),
|
||||
"DeleteDataPmtable" => G::LoadTranslation("ID_DELETE_DATA_PMTABLE"),
|
||||
"ImportTable" => G::LoadTranslation("ID_IMPORT_TABLE"),
|
||||
"ExportTable" => G::LoadTranslation("ID_EXPORT_TABLE"),
|
||||
"CreateCalendar" => G::LoadTranslation("ID_CREATE_CALENDAR"),
|
||||
"UpdateCalendar" => G::LoadTranslation("ID_UPDATE_CALENDAR"),
|
||||
"DeleteCalendar" => G::LoadTranslation("ID_DELETE_CALENDAR"),
|
||||
"CreateDashletInstance" => G::LoadTranslation("ID_CREATE_DASHLET_INSTANCE"),
|
||||
"UpdateDashletInstance" => G::LoadTranslation("ID_UPDATE_DASHLET_INSTANCE"),
|
||||
"DeleteDashletInstance" => G::LoadTranslation("ID_DELETE_DASHLET_INSTANCE"),
|
||||
"CreateDepartament" => G::LoadTranslation("ID_CREATE_DEPARTAMENT"),
|
||||
"CreateSubDepartament" => G::LoadTranslation("ID_CREATE_SUB_DEPARTAMENT"),
|
||||
"UpdateDepartament" => G::LoadTranslation("ID_UPDATE_DEPARTAMENT"),
|
||||
"UpdateSubDepartament" => G::LoadTranslation("ID_UPDATE_SUB_DEPARTAMENT"),
|
||||
"DeleteDepartament" => G::LoadTranslation("ID_DELETE_DEPARTAMENT"),
|
||||
"AssignManagerToDepartament" => G::LoadTranslation("ID_ASSIGN_MANAGER_TO_DEPARTAMENT"),
|
||||
"AssignUserToDepartament" => G::LoadTranslation("ID_ASSIGN_USER_TO_DEPARTAMENT"),
|
||||
"RemoveUsersFromDepartament" => G::LoadTranslation("ID_REMOVE_USERS_FROM_DEPARTAMENT"),
|
||||
"AssignUserToGroup" => G::LoadTranslation("ID_ASSIGN_USER_TO_GROUP"),
|
||||
"UploadLanguage" => G::LoadTranslation("ID_UPLOAD_LANGUAGE"),
|
||||
"ExportLanguage" => G::LoadTranslation("ID_EXPORT_LANGUAGE"),
|
||||
"DeleteLanguage" => G::LoadTranslation("ID_DELETE_LAGUAGE"),
|
||||
"UploadSystemSettings" => G::LoadTranslation("ID_UPLOAD_SYSTEM_SETTINGS"),
|
||||
"UpdateEmailSettings" => G::LoadTranslation("ID_UPDATE_EMAIL_SETTINGS"),
|
||||
"CreateEmailSettings" => G::LoadTranslation("ID_CREATE_EMAIL_SETTINGS"),
|
||||
"UploadLogo" => G::LoadTranslation("ID_UPLOAD_LOGO"),
|
||||
"DeleteLogo" => G::LoadTranslation("ID_DELETE_LOGO"),
|
||||
"RestoreLogo" => G::LoadTranslation("ID_RESTORE_LOGO"),
|
||||
"ReplaceLogo" => G::LoadTranslation("ID_REPLACE_LOGO"),
|
||||
"InstallPlugin" => G::LoadTranslation("ID_INSTALL_PLUGIN"),
|
||||
"EnablePlugin" => G::LoadTranslation("ID_ENABLE_PLUGIN"),
|
||||
"DisablePlugin" => G::LoadTranslation("ID_DISABLE_PLUGIN"),
|
||||
"RemovePlugin" => G::LoadTranslation("ID_REMOVE_PLUGIN"),
|
||||
"SetColumns" => G::LoadTranslation("ID_SET_COLUMNS"),
|
||||
"EnableAuditLog" => G::LoadTranslation("ID_ENABLE_AUDIT_LOG"),
|
||||
"DisableAuditLog" => G::LoadTranslation("ID_DISABLE_AUDIT_LOG"),
|
||||
"EditProcess" => G::LoadTranslation("ID_EDIT_PROCESS"),
|
||||
"ExportProcess" => G::LoadTranslation("ID_EXPORT_PROCESS"),
|
||||
"WebEntry" => G::LoadTranslation("ID_WEB_ENTRY"),
|
||||
"AssignRole" => G::LoadTranslation("ID_ASSIGN_ROLE"),
|
||||
"RemoveUser" => G::LoadTranslation("ID_REMOVE_USER"),
|
||||
"AddTask" => G::LoadTranslation("ID_ADD_TASK"),
|
||||
"AddSubProcess" => G::LoadTranslation("ID_ADD_SUB_PROCESS"),
|
||||
"SaveTaskPosition" => G::LoadTranslation("ID_SAVE_TASK_POSITION"),
|
||||
"AddHorizontalLine" => G::LoadTranslation("ID_ADD_HORIZONTAL_LINE"),
|
||||
"AddVerticalLine" => G::LoadTranslation("ID_ADD_VERTICAL_LINE"),
|
||||
"SaveGuidePosition" => G::LoadTranslation("ID_SAVE_GUIDE_POSITION"),
|
||||
"DeleteLine" => G::LoadTranslation("ID_DELETE_LINE"),
|
||||
"DeleteLines" => G::LoadTranslation("ID_DELETE_LINES"),
|
||||
"AddText" => G::LoadTranslation("ID_ADD_TEXT"),
|
||||
"UpdateText" => G::LoadTranslation("ID_UPDATE_TEXT"),
|
||||
"SaveTextPosition" => G::LoadTranslation("ID_SAVE_TEXT_POSITION"),
|
||||
"DeleteText" => G::LoadTranslation("ID_DELETE_TEXT"),
|
||||
"ProcessFileManager" => G::LoadTranslation("ID_PROCESS_FILE_MANAGER"),
|
||||
"ProcessPermissions" => G::LoadTranslation("ID_PROCESS_PERMISSIONS"),
|
||||
"DeletePermissions" => G::LoadTranslation("ID_DELETE_PERMISSIONS"),
|
||||
"AssignSupervisorDynaform" => G::LoadTranslation("ID_ASSIGN_SUPERVISOR_DYNAFORM"),
|
||||
"RemoveSupervisorDynaform" => G::LoadTranslation("ID_REMOVE_SUPERVISOR_DYNAFORM"),
|
||||
"AssignSupervisorInput" => G::LoadTranslation("ID_ASSIGN_SUPERVISOR_INPUT"),
|
||||
"RemoveSupervisorInput" => G::LoadTranslation("ID_REMOVE_SUPERVISOR_INPUT"),
|
||||
"CaseTrackers" => G::LoadTranslation("ID_CASE_TRACKERS"),
|
||||
"EditEvent" => G::LoadTranslation("ID_EDIT_EVENT"),
|
||||
"DeleteEvent" => G::LoadTranslation("ID_EVENT_DELETED"),
|
||||
"CreateDynaform" => G::LoadTranslation("ID_CREATE_DYNAFORM"),
|
||||
"UpdateDynaform" => G::LoadTranslation("ID_UPDATE_DYNAFORM"),
|
||||
"DeleteDynaform" => G::LoadTranslation("ID_DELETE_DYNAFORM"),
|
||||
"ConditionsEditorDynaform" => G::LoadTranslation("ID_CONDITIONS_EDITOR_DYNAFORM"),
|
||||
"CreateCaseScheduler" => G::LoadTranslation("ID_CREATE_CASE_SCHEDULER"),
|
||||
"UpdateCaseScheduler" => G::LoadTranslation("ID_UPDATE_CASE_SCHEDULER"),
|
||||
"DeleteCaseScheduler" => G::LoadTranslation("ID_DELETE_CASE_SCHEDULER"),
|
||||
"CreateDatabaseConnection" => G::LoadTranslation("ID_CREATE_DATABASE_CONNECTION"),
|
||||
"UpdateDatabaseConnection" => G::LoadTranslation("ID_UPDATE_DATABASE_CONNECTION"),
|
||||
"DeleteDatabaseConnection" => G::LoadTranslation("ID_DELETE_DATABASE_CONNECTION"),
|
||||
"CreateInputDocument" => G::LoadTranslation("ID_CREATE_INPUT_DOCUMENT"),
|
||||
"UpdateInputDocument" => G::LoadTranslation("ID_UPDATE_INPUT_DOCUMENT"),
|
||||
"DeleteInputDocument" => G::LoadTranslation("ID_DELETE_INPUT_DOCUMENT"),
|
||||
"CreateOutputDocument" => G::LoadTranslation("ID_CREATE_OUTPUT_DOCUMENT"),
|
||||
"UpdateOutputDocument" => G::LoadTranslation("ID_UPDATE_OUTPUT_DOCUMENT"),
|
||||
"DeleteOutputDocument" => G::LoadTranslation("ID_DELETE_OUTPUT_DOCUMENT"),
|
||||
"CreateTrigger" => G::LoadTranslation("ID_CREATE_TRIGGER"),
|
||||
"UpdateTrigger" => G::LoadTranslation("ID_UPDATE_TRIGGER"),
|
||||
"DeleteTrigger" => G::LoadTranslation("ID_DELETE_TRIGGER"),
|
||||
"DerivationRule" => G::LoadTranslation("ID_DERIVATION_RULE"),
|
||||
"DeleteTask" => G::LoadTranslation("ID_DELETE_TASK"),
|
||||
"DeleteSubProcess" => G::LoadTranslation("ID_DELETE_SUB_PROCESS"),
|
||||
"OptionsMenuTask" => G::LoadTranslation("ID_OPTIONS_MENU_TASK"),
|
||||
"SaveTaskProperties" => G::LoadTranslation("ID_SAVE_TASK_PROPERTIES"),
|
||||
"DeleteRoutes" => G::LoadTranslation("ID_DELETE_ROUTES"),
|
||||
"NewConditionFromStep" => G::LoadTranslation("ID_NEW_CONDITION_FROM_STEP"),
|
||||
"AssignTrigger" => G::LoadTranslation("ID_ASSIGN_TRIGGER"),
|
||||
"UpTrigger" => G::LoadTranslation("ID_UP_TRIGGER"),
|
||||
"DownTrigger" => G::LoadTranslation("ID_DOWN_TRIGGER"),
|
||||
"StepDelete" => G::LoadTranslation("ID_STEP_DELETE"),
|
||||
"StepUp" => G::LoadTranslation("ID_STEP_UP"),
|
||||
"StepDown" => G::LoadTranslation("ID_STEP_DOWN"),
|
||||
"SaveNewStep" => G::LoadTranslation("ID_SAVE_NEW_STEP"),
|
||||
"AssignUserTask" => G::LoadTranslation("ID_ASSIGN_USER_TASK"),
|
||||
"AssignGroupTask" => G::LoadTranslation("ID_ASSIGN_GROUP_TASK"),
|
||||
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
|
||||
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK"),
|
||||
"ImportProcess" => G::LoadTranslation("ID_IMPORT_PROCESS"),
|
||||
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS")
|
||||
);
|
||||
|
||||
asort($arrayAction);
|
||||
|
||||
$arrayActionAux = $arrayAction;
|
||||
$arrayAction = array(array("ALL", G::LoadTranslation("ID_ALL")));
|
||||
|
||||
foreach ($arrayActionAux as $key => $value) {
|
||||
$arrayAction[] = array($key, $value);
|
||||
}
|
||||
$auditLog = new AuditLog();
|
||||
$auditLog->setUserLogged($_SESSION["USER_LOGGED"]);
|
||||
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript("setup/auditLog", true);
|
||||
$oHeadPublisher->assign("CONFIG", $config);
|
||||
$oHeadPublisher->assign("ACTION", $arrayAction);
|
||||
$oHeadPublisher->assign("CONFIG", $auditLog->getConfig());
|
||||
$oHeadPublisher->assign("ACTION", $auditLog->getActions());
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
@@ -1,111 +1,13 @@
|
||||
<?php
|
||||
|
||||
function mktimeDate ($date)
|
||||
{
|
||||
$arrayAux = getdate( strtotime( $date ) );
|
||||
$mktDate = mktime( $arrayAux["hours"], $arrayAux["minutes"], $arrayAux["seconds"], $arrayAux["mon"], $arrayAux["mday"], $arrayAux["year"] );
|
||||
return $mktDate;
|
||||
}
|
||||
use ProcessMaker\AuditLog\AuditLog;
|
||||
|
||||
function auditLogArraySet ($str, $filter)
|
||||
{
|
||||
$arrayAux = explode( "|", $str );
|
||||
$date = "";
|
||||
$workspace = "";
|
||||
$action = "";
|
||||
$ip = "";
|
||||
$user = "";
|
||||
$description = "";
|
||||
|
||||
if (count( $arrayAux ) > 1) {
|
||||
$date = (isset( $arrayAux[0] )) ? trim( $arrayAux[0] ) : "";
|
||||
$workspace = (isset( $arrayAux[1] )) ? trim( $arrayAux[1] ) : "";
|
||||
$ip = (isset( $arrayAux[2] )) ? trim( $arrayAux[2] ) : "";
|
||||
$user = (isset( $arrayAux[4] )) ? trim( $arrayAux[4] ) : "";
|
||||
$action = (isset( $arrayAux[5] )) ? trim( $arrayAux[5] ) : "";
|
||||
$description = (isset( $arrayAux[6] )) ? trim( $arrayAux[6] ) : "";
|
||||
}
|
||||
$auditLog = new AuditLog();
|
||||
$auditLog->setUserLogged($_SESSION["USER_LOGGED"]);
|
||||
|
||||
$mktDate = (! empty( $date )) ? mktimeDate( $date ) : 0;
|
||||
|
||||
//Filter
|
||||
$sw = 1;
|
||||
if ($workspace != $filter["workspace"]) {
|
||||
$sw = 0;
|
||||
}
|
||||
$response = [];
|
||||
|
||||
if ($filter["action"] != "ALL") {
|
||||
if ($action != $filter["action"]) {
|
||||
$sw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["dateFrom"] && $mktDate > 0) {
|
||||
if (! (mktimeDate( $filter["dateFrom"] ) <= $mktDate)) {
|
||||
$sw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["dateTo"] && $mktDate > 0) {
|
||||
if (! ($mktDate <= mktimeDate( $filter["dateTo"] . " 23:59:59" ))) {
|
||||
$sw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["description"]) {
|
||||
$sw = 0;
|
||||
$string = $filter["description"];
|
||||
|
||||
if ( (stristr($date, $string) !== false) || (stristr($ip, $string) !== false) || (stristr($user, $string) !== false) || (stristr($action, $string) !== false) || (stristr($description, $string) !== false) ) {
|
||||
$sw = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$arrayData = array ();
|
||||
$newAction = preg_replace('/([A-Z])/', '_$1', $action);
|
||||
$newAction = "ID".strtoupper($newAction);
|
||||
|
||||
if ($sw == 1) {
|
||||
$arrayData = array ("DATE" => $date, "USER" => $user, "IP" =>$ip, "ACTION" => G::LoadTranslation($newAction), "DESCRIPTION" => $description);
|
||||
}
|
||||
|
||||
return $arrayData;
|
||||
}
|
||||
|
||||
function getAuditLogData ($filter, $r, $i)
|
||||
{
|
||||
$arrayData = array ();
|
||||
$strAux = null;
|
||||
$count = 0;
|
||||
|
||||
$file = PATH_DATA . "log" . PATH_SEP . "audit.log";
|
||||
|
||||
if (file_exists($file)) {
|
||||
$arrayFileData = file($file);
|
||||
|
||||
for ($k = 0; $k < count($arrayFileData); $k++) {
|
||||
|
||||
$strAux = $arrayFileData[$k];
|
||||
|
||||
if ($strAux) {
|
||||
$arrayAux = auditLogArraySet($strAux, $filter);
|
||||
if (count($arrayAux) > 0) {
|
||||
$count = $count + 1;
|
||||
|
||||
if ($count > $i && count($arrayData) < $r) {
|
||||
$arrayData[] = $arrayAux;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array($count, $arrayData);
|
||||
}
|
||||
|
||||
$option = (isset( $_REQUEST["option"] )) ? $_REQUEST["option"] : null;
|
||||
|
||||
$response = array ();
|
||||
$option = (isset($_REQUEST["option"])) ? $_REQUEST["option"] : null;
|
||||
|
||||
switch ($option) {
|
||||
case "LST":
|
||||
@@ -116,15 +18,23 @@ switch ($option) {
|
||||
$dateFrom = $_REQUEST["dateFrom"];
|
||||
$dateTo = $_REQUEST["dateTo"];
|
||||
|
||||
$arrayFilter = array ("workspace" => $workspace, "action" => $action, "description" => $description,"dateFrom" => str_replace( "T00:00:00", null, $dateFrom ),"dateTo" => str_replace( "T00:00:00", null, $dateTo )
|
||||
);
|
||||
$arrayFilter = [
|
||||
"workspace" => $workspace,
|
||||
"action" => $action,
|
||||
"description" => $description,
|
||||
"dateFrom" => str_replace("T00:00:00", null, $dateFrom),
|
||||
"dateTo" => str_replace("T00:00:00", null, $dateTo)
|
||||
];
|
||||
|
||||
$limit = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : $pageSize;
|
||||
$start = isset( $_REQUEST["start"] ) ? $_REQUEST["start"] : 0;
|
||||
$limit = isset($_REQUEST["limit"]) ? $_REQUEST["limit"] : $pageSize;
|
||||
$start = isset($_REQUEST["start"]) ? $_REQUEST["start"] : 0;
|
||||
|
||||
list ($count, $data) = getAuditLogData( $arrayFilter, $limit, $start );
|
||||
$response = array ("success" => true,"resultTotal" => $count,"resultRoot" => $data
|
||||
);
|
||||
list ($count, $data) = $auditLog->getAuditLogData($arrayFilter, $limit, $start);
|
||||
$response = [
|
||||
"success" => true,
|
||||
"resultTotal" => $count,
|
||||
"resultRoot" => $data
|
||||
];
|
||||
break;
|
||||
case "EMPTY":
|
||||
$status = 1;
|
||||
@@ -132,8 +42,8 @@ switch ($option) {
|
||||
try {
|
||||
$file = PATH_DATA . "log" . PATH_SEP . "cron.log";
|
||||
|
||||
if (file_exists( $file )) {
|
||||
unlink( $file );
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
$response["status"] = "OK";
|
||||
@@ -148,4 +58,4 @@ switch ($option) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo G::json_encode( $response );
|
||||
echo G::json_encode($response);
|
||||
|
||||
@@ -890,6 +890,10 @@ antes funcionaba.
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
}
|
||||
|
||||
.ICON_STANDARD_LOGGING{
|
||||
background-image: url(/images/import.gif) !important;
|
||||
}
|
||||
.ICON_EMAILS {
|
||||
/*ss_email_edit*/
|
||||
|
||||
|
||||
485
workflow/engine/src/ProcessMaker/AuditLog/AuditLog.php
Normal file
485
workflow/engine/src/ProcessMaker/AuditLog/AuditLog.php
Normal file
@@ -0,0 +1,485 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\AuditLog;
|
||||
|
||||
use Bootstrap;
|
||||
use Configurations;
|
||||
use Exception;
|
||||
use G;
|
||||
use ProcessMaker\Core\System;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
class AuditLog
|
||||
{
|
||||
private $actions = [];
|
||||
private $columns;
|
||||
private $pageSizeDefault = 20;
|
||||
private $pathGlobalLog;
|
||||
private $userFullname = "";
|
||||
private $userLogged = "";
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->pathGlobalLog = PATH_DATA . 'log';
|
||||
$this->columns = ['date', 'workspace', 'ip', 'id', 'user', 'action', 'description'];
|
||||
|
||||
$this->actions = [
|
||||
"CreateUser" => G::LoadTranslation("ID_CREATE_USER"),
|
||||
"UpdateUser" => G::LoadTranslation("ID_UPDATE_USER"),
|
||||
"DeleteUser" => G::LoadTranslation("ID_DELETE_USER"),
|
||||
"EnableUser" => G::LoadTranslation("ID_ENABLE_USER"),
|
||||
"DisableUser" => G::LoadTranslation("ID_DISABLE_USER"),
|
||||
"AssignAuthenticationSource" => G::LoadTranslation("ID_ASSIGN_AUTHENTICATION_SOURCE"),
|
||||
"AssignUserToGroup" => G::LoadTranslation("ID_ASSIGN_USER_TO_GROUP"),
|
||||
"CreateAuthSource" => G::LoadTranslation("ID_CREATE_AUTH_SOURCE"),
|
||||
"UpdateAuthSource" => G::LoadTranslation("ID_UPDATE_AUTH_SOURCE"),
|
||||
"DeleteAuthSource" => G::LoadTranslation("ID_DELETE_AUTH_SOURCE"),
|
||||
"CreateRole" => G::LoadTranslation("ID_CREATE_ROLE"),
|
||||
"UpdateRole" => G::LoadTranslation("ID_UPDATE_ROLE"),
|
||||
"DeleteRole" => G::LoadTranslation("ID_DELETE_ROLE"),
|
||||
"AssignUserToRole" => G::LoadTranslation("ID_ASSIGN_USER_TO_ROLE"),
|
||||
"DeleteUserToRole" => G::LoadTranslation("ID_DELETE_USER_TO_ROLE"),
|
||||
"AddPermissionToRole" => G::LoadTranslation("ID_ADD_PERMISSION_TO_ROLE"),
|
||||
"DeletePermissionToRole" => G::LoadTranslation("ID_DELETE_PERMISSION_TO_ROLE"),
|
||||
"CreateSkin" => G::LoadTranslation("ID_CREATE_SKIN"),
|
||||
"ImportSkin" => G::LoadTranslation("ID_IMPORT_SKIN"),
|
||||
"ExportSkin" => G::LoadTranslation("ID_EXPORT_SKIN"),
|
||||
"DeleteSkin" => G::LoadTranslation("ID_DELETE_SKIN"),
|
||||
"CreateGroup" => G::LoadTranslation("ID_CREATE_GROUP"),
|
||||
"UpdateGroup" => G::LoadTranslation("ID_UPDATE_GROUP"),
|
||||
"DeleteGroup" => G::LoadTranslation("ID_DELETE_GROUP"),
|
||||
"CreateCategory" => G::LoadTranslation("ID_CREATE_CATEGORY"),
|
||||
"UpdateCategory" => G::LoadTranslation("ID_UPDATE_CATEGORY"),
|
||||
"DeleteCategory" => G::LoadTranslation("ID_DELETE_CATEGORY"),
|
||||
"BuildCache" => G::LoadTranslation("ID_BUILD_CACHE"),
|
||||
"ClearCache" => G::LoadTranslation("ID_CLEAR_CACHE"),
|
||||
"ClearCron" => G::LoadTranslation("ID_CLEAR_CRON"),
|
||||
"UpdateEnvironmentSettings" => G::LoadTranslation("ID_UPDATE_ENVIRONMENT_SETTINGS"),
|
||||
"UpdateLoginSettings" => G::LoadTranslation("ID_UPDATE_LOGIN_SETTINGS"),
|
||||
"EnableHeartBeat" => G::LoadTranslation("ID_ENABLE_HEART_BEAT"),
|
||||
"DisableHeartBeat" => G::LoadTranslation("ID_DISABLE_HEART_BEAT"),
|
||||
"CreatePmtable" => G::LoadTranslation("ID_CREATE_PMTABLE"),
|
||||
"UpdatePmtable" => G::LoadTranslation("ID_UPDATE_PMTABLE"),
|
||||
"DeletePmtable" => G::LoadTranslation("ID_DELETE_PMTABLE"),
|
||||
"AddDataPmtable" => G::LoadTranslation("ID_ADD_DATA_PMTABLE"),
|
||||
"UpdateDataPmtable" => G::LoadTranslation("ID_UPDATE_DATA_PMTABLE"),
|
||||
"DeleteDataPmtable" => G::LoadTranslation("ID_DELETE_DATA_PMTABLE"),
|
||||
"ImportTable" => G::LoadTranslation("ID_IMPORT_TABLE"),
|
||||
"ExportTable" => G::LoadTranslation("ID_EXPORT_TABLE"),
|
||||
"CreateCalendar" => G::LoadTranslation("ID_CREATE_CALENDAR"),
|
||||
"UpdateCalendar" => G::LoadTranslation("ID_UPDATE_CALENDAR"),
|
||||
"DeleteCalendar" => G::LoadTranslation("ID_DELETE_CALENDAR"),
|
||||
"CreateDashletInstance" => G::LoadTranslation("ID_CREATE_DASHLET_INSTANCE"),
|
||||
"UpdateDashletInstance" => G::LoadTranslation("ID_UPDATE_DASHLET_INSTANCE"),
|
||||
"DeleteDashletInstance" => G::LoadTranslation("ID_DELETE_DASHLET_INSTANCE"),
|
||||
"CreateDepartament" => G::LoadTranslation("ID_CREATE_DEPARTAMENT"),
|
||||
"CreateSubDepartament" => G::LoadTranslation("ID_CREATE_SUB_DEPARTAMENT"),
|
||||
"UpdateDepartament" => G::LoadTranslation("ID_UPDATE_DEPARTAMENT"),
|
||||
"UpdateSubDepartament" => G::LoadTranslation("ID_UPDATE_SUB_DEPARTAMENT"),
|
||||
"DeleteDepartament" => G::LoadTranslation("ID_DELETE_DEPARTAMENT"),
|
||||
"AssignManagerToDepartament" => G::LoadTranslation("ID_ASSIGN_MANAGER_TO_DEPARTAMENT"),
|
||||
"AssignUserToDepartament" => G::LoadTranslation("ID_ASSIGN_USER_TO_DEPARTAMENT"),
|
||||
"RemoveUsersFromDepartament" => G::LoadTranslation("ID_REMOVE_USERS_FROM_DEPARTAMENT"),
|
||||
"AssignUserToGroup" => G::LoadTranslation("ID_ASSIGN_USER_TO_GROUP"),
|
||||
"UploadLanguage" => G::LoadTranslation("ID_UPLOAD_LANGUAGE"),
|
||||
"ExportLanguage" => G::LoadTranslation("ID_EXPORT_LANGUAGE"),
|
||||
"DeleteLanguage" => G::LoadTranslation("ID_DELETE_LAGUAGE"),
|
||||
"UploadSystemSettings" => G::LoadTranslation("ID_UPLOAD_SYSTEM_SETTINGS"),
|
||||
"UpdateEmailSettings" => G::LoadTranslation("ID_UPDATE_EMAIL_SETTINGS"),
|
||||
"CreateEmailSettings" => G::LoadTranslation("ID_CREATE_EMAIL_SETTINGS"),
|
||||
"UploadLogo" => G::LoadTranslation("ID_UPLOAD_LOGO"),
|
||||
"DeleteLogo" => G::LoadTranslation("ID_DELETE_LOGO"),
|
||||
"RestoreLogo" => G::LoadTranslation("ID_RESTORE_LOGO"),
|
||||
"ReplaceLogo" => G::LoadTranslation("ID_REPLACE_LOGO"),
|
||||
"InstallPlugin" => G::LoadTranslation("ID_INSTALL_PLUGIN"),
|
||||
"EnablePlugin" => G::LoadTranslation("ID_ENABLE_PLUGIN"),
|
||||
"DisablePlugin" => G::LoadTranslation("ID_DISABLE_PLUGIN"),
|
||||
"RemovePlugin" => G::LoadTranslation("ID_REMOVE_PLUGIN"),
|
||||
"SetColumns" => G::LoadTranslation("ID_SET_COLUMNS"),
|
||||
"EnableAuditLog" => G::LoadTranslation("ID_ENABLE_AUDIT_LOG"),
|
||||
"DisableAuditLog" => G::LoadTranslation("ID_DISABLE_AUDIT_LOG"),
|
||||
"EditProcess" => G::LoadTranslation("ID_EDIT_PROCESS"),
|
||||
"ExportProcess" => G::LoadTranslation("ID_EXPORT_PROCESS"),
|
||||
"WebEntry" => G::LoadTranslation("ID_WEB_ENTRY"),
|
||||
"AssignRole" => G::LoadTranslation("ID_ASSIGN_ROLE"),
|
||||
"RemoveUser" => G::LoadTranslation("ID_REMOVE_USER"),
|
||||
"AddTask" => G::LoadTranslation("ID_ADD_TASK"),
|
||||
"AddSubProcess" => G::LoadTranslation("ID_ADD_SUB_PROCESS"),
|
||||
"SaveTaskPosition" => G::LoadTranslation("ID_SAVE_TASK_POSITION"),
|
||||
"AddHorizontalLine" => G::LoadTranslation("ID_ADD_HORIZONTAL_LINE"),
|
||||
"AddVerticalLine" => G::LoadTranslation("ID_ADD_VERTICAL_LINE"),
|
||||
"SaveGuidePosition" => G::LoadTranslation("ID_SAVE_GUIDE_POSITION"),
|
||||
"DeleteLine" => G::LoadTranslation("ID_DELETE_LINE"),
|
||||
"DeleteLines" => G::LoadTranslation("ID_DELETE_LINES"),
|
||||
"AddText" => G::LoadTranslation("ID_ADD_TEXT"),
|
||||
"UpdateText" => G::LoadTranslation("ID_UPDATE_TEXT"),
|
||||
"SaveTextPosition" => G::LoadTranslation("ID_SAVE_TEXT_POSITION"),
|
||||
"DeleteText" => G::LoadTranslation("ID_DELETE_TEXT"),
|
||||
"ProcessFileManager" => G::LoadTranslation("ID_PROCESS_FILE_MANAGER"),
|
||||
"ProcessPermissions" => G::LoadTranslation("ID_PROCESS_PERMISSIONS"),
|
||||
"DeletePermissions" => G::LoadTranslation("ID_DELETE_PERMISSIONS"),
|
||||
"AssignSupervisorDynaform" => G::LoadTranslation("ID_ASSIGN_SUPERVISOR_DYNAFORM"),
|
||||
"RemoveSupervisorDynaform" => G::LoadTranslation("ID_REMOVE_SUPERVISOR_DYNAFORM"),
|
||||
"AssignSupervisorInput" => G::LoadTranslation("ID_ASSIGN_SUPERVISOR_INPUT"),
|
||||
"RemoveSupervisorInput" => G::LoadTranslation("ID_REMOVE_SUPERVISOR_INPUT"),
|
||||
"CaseTrackers" => G::LoadTranslation("ID_CASE_TRACKERS"),
|
||||
"EditEvent" => G::LoadTranslation("ID_EDIT_EVENT"),
|
||||
"DeleteEvent" => G::LoadTranslation("ID_EVENT_DELETED"),
|
||||
"CreateDynaform" => G::LoadTranslation("ID_CREATE_DYNAFORM"),
|
||||
"UpdateDynaform" => G::LoadTranslation("ID_UPDATE_DYNAFORM"),
|
||||
"DeleteDynaform" => G::LoadTranslation("ID_DELETE_DYNAFORM"),
|
||||
"ConditionsEditorDynaform" => G::LoadTranslation("ID_CONDITIONS_EDITOR_DYNAFORM"),
|
||||
"CreateCaseScheduler" => G::LoadTranslation("ID_CREATE_CASE_SCHEDULER"),
|
||||
"UpdateCaseScheduler" => G::LoadTranslation("ID_UPDATE_CASE_SCHEDULER"),
|
||||
"DeleteCaseScheduler" => G::LoadTranslation("ID_DELETE_CASE_SCHEDULER"),
|
||||
"CreateDatabaseConnection" => G::LoadTranslation("ID_CREATE_DATABASE_CONNECTION"),
|
||||
"UpdateDatabaseConnection" => G::LoadTranslation("ID_UPDATE_DATABASE_CONNECTION"),
|
||||
"DeleteDatabaseConnection" => G::LoadTranslation("ID_DELETE_DATABASE_CONNECTION"),
|
||||
"CreateInputDocument" => G::LoadTranslation("ID_CREATE_INPUT_DOCUMENT"),
|
||||
"UpdateInputDocument" => G::LoadTranslation("ID_UPDATE_INPUT_DOCUMENT"),
|
||||
"DeleteInputDocument" => G::LoadTranslation("ID_DELETE_INPUT_DOCUMENT"),
|
||||
"CreateOutputDocument" => G::LoadTranslation("ID_CREATE_OUTPUT_DOCUMENT"),
|
||||
"UpdateOutputDocument" => G::LoadTranslation("ID_UPDATE_OUTPUT_DOCUMENT"),
|
||||
"DeleteOutputDocument" => G::LoadTranslation("ID_DELETE_OUTPUT_DOCUMENT"),
|
||||
"CreateTrigger" => G::LoadTranslation("ID_CREATE_TRIGGER"),
|
||||
"UpdateTrigger" => G::LoadTranslation("ID_UPDATE_TRIGGER"),
|
||||
"DeleteTrigger" => G::LoadTranslation("ID_DELETE_TRIGGER"),
|
||||
"DerivationRule" => G::LoadTranslation("ID_DERIVATION_RULE"),
|
||||
"DeleteTask" => G::LoadTranslation("ID_DELETE_TASK"),
|
||||
"DeleteSubProcess" => G::LoadTranslation("ID_DELETE_SUB_PROCESS"),
|
||||
"OptionsMenuTask" => G::LoadTranslation("ID_OPTIONS_MENU_TASK"),
|
||||
"SaveTaskProperties" => G::LoadTranslation("ID_SAVE_TASK_PROPERTIES"),
|
||||
"DeleteRoutes" => G::LoadTranslation("ID_DELETE_ROUTES"),
|
||||
"NewConditionFromStep" => G::LoadTranslation("ID_NEW_CONDITION_FROM_STEP"),
|
||||
"AssignTrigger" => G::LoadTranslation("ID_ASSIGN_TRIGGER"),
|
||||
"UpTrigger" => G::LoadTranslation("ID_UP_TRIGGER"),
|
||||
"DownTrigger" => G::LoadTranslation("ID_DOWN_TRIGGER"),
|
||||
"StepDelete" => G::LoadTranslation("ID_STEP_DELETE"),
|
||||
"StepUp" => G::LoadTranslation("ID_STEP_UP"),
|
||||
"StepDown" => G::LoadTranslation("ID_STEP_DOWN"),
|
||||
"SaveNewStep" => G::LoadTranslation("ID_SAVE_NEW_STEP"),
|
||||
"AssignUserTask" => G::LoadTranslation("ID_ASSIGN_USER_TASK"),
|
||||
"AssignGroupTask" => G::LoadTranslation("ID_ASSIGN_GROUP_TASK"),
|
||||
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
|
||||
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK"),
|
||||
"ImportProcess" => G::LoadTranslation("ID_IMPORT_PROCESS"),
|
||||
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS")
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the identifier of the logged user.
|
||||
*
|
||||
* @param string $userLogged
|
||||
*/
|
||||
function setUserLogged($userLogged)
|
||||
{
|
||||
$this->userLogged = $userLogged;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the full name of the logged user.
|
||||
*
|
||||
* @param string $userFullname
|
||||
*/
|
||||
function setUserFullname($userFullname)
|
||||
{
|
||||
$this->userFullname = $userFullname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the configuration for the Audit Log.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$configurations = new Configurations();
|
||||
$configPage = $configurations->getConfiguration("auditLogList", "pageSize", null, $this->userLogged);
|
||||
|
||||
$config = [];
|
||||
$config["pageSize"] = isset($configPage["pageSize"]) ? $configPage["pageSize"] : $this->pageSizeDefault;
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actions for Audit Log.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getActions()
|
||||
{
|
||||
$actions = [];
|
||||
$actions[] = ["ALL", G::LoadTranslation("ID_ALL")];
|
||||
/**
|
||||
* We arrange the arrangement to create an ordered list and that the option
|
||||
* 'All' be found at the beginning.
|
||||
*/
|
||||
asort($this->actions);
|
||||
foreach ($this->actions as $key => $value) {
|
||||
$actions[] = [$key, $value];
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data of the files registered by Audit Log.
|
||||
*
|
||||
* @param array $filter
|
||||
* @param int $limit
|
||||
* @param int $start
|
||||
* @return array
|
||||
*/
|
||||
public function getAuditLogData($filter, $limit, $start)
|
||||
{
|
||||
$result = [];
|
||||
$count = 0;
|
||||
|
||||
$files = $this->getFiles($this->pathGlobalLog, 'audit*.log');
|
||||
foreach ($files as $file) {
|
||||
$lines = file($file->getPathname());
|
||||
foreach ($lines as $line) {
|
||||
if ($start <= $count && count($result) < $limit) {
|
||||
$data = $this->lineToObject($line);
|
||||
if ($this->validate($filter, $data)) {
|
||||
$result[] = $this->lineToArray($data);
|
||||
}
|
||||
}
|
||||
$count = $count + 1;
|
||||
}
|
||||
}
|
||||
|
||||
//from workspace
|
||||
$system = System::getSystemConfiguration();
|
||||
$path = PATH_DATA . 'sites' . PATH_SEP . config('system.workspace') . PATH_SEP . 'log' . PATH_SEP;
|
||||
if (isset($system['logs_location']) && !empty($system['logs_location']) && is_dir($system['logs_location'])) {
|
||||
$path = $system['logs_location'];
|
||||
}
|
||||
$files = $this->getFiles($path, 'audit*.log');
|
||||
foreach ($files as $file) {
|
||||
$lines = file($file->getPathname());
|
||||
foreach ($lines as $line) {
|
||||
if ($start <= $count && count($result) < $limit) {
|
||||
/**
|
||||
* processmaker/gulliver/system/class.monologProvider.php
|
||||
* "<%level%> %datetime% %channel% %level_name%: %message% %context% %extra%\n"
|
||||
*/
|
||||
$data = $this->lineToObject($line, '/([A-Z][a-z][a-z]\s{1,2}\d{1,2}\s\d{2}[:]\d{2}[:]\d{2})\s([\w][\w\d\.@-]*)\s(.*)$/');
|
||||
if ($this->validate($filter, $data)) {
|
||||
$result[] = $this->lineToArray($data);
|
||||
}
|
||||
}
|
||||
$count = $count + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return [$count, $result];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an action for Audit Log.
|
||||
*
|
||||
* @param string $action
|
||||
* @param string $value
|
||||
*/
|
||||
public function register($action, $value = '')
|
||||
{
|
||||
$context = Bootstrap::getDefaultContextLog();
|
||||
$context['usrUid'] = $this->userLogged;
|
||||
$context['usrName'] = $this->userFullname;
|
||||
$context['action'] = $action;
|
||||
$context['description'] = $value;
|
||||
Bootstrap::registerMonolog($action, 200, $action, $context, $context['workspace'], 'audit.log');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Audit Log files.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $pattern
|
||||
* @param string $dir
|
||||
* @return array
|
||||
*/
|
||||
private function getFiles($path, $pattern = '', $dir = 'ASC')
|
||||
{
|
||||
$finder = new Finder();
|
||||
$finder->files()
|
||||
->in($path)
|
||||
->name($pattern);
|
||||
$files = iterator_to_array($finder->getIterator());
|
||||
uasort($files, function ($a, $b) use ($dir) {
|
||||
$name1 = $a->getFilename();
|
||||
$name2 = $b->getFilename();
|
||||
if ($dir === 'ASC') {
|
||||
return strcmp($name1, $name2);
|
||||
} else {
|
||||
return strcmp($name2, $name1);
|
||||
}
|
||||
});
|
||||
return $files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a line of content from the file into an object.
|
||||
*
|
||||
* @param string $line
|
||||
* @param string $pattern
|
||||
* @return object
|
||||
*/
|
||||
private function lineToObject($line, $pattern = '|')
|
||||
{
|
||||
$result = [];
|
||||
$data = [];
|
||||
if ($pattern === '|') {
|
||||
$data = explode("|", $line);
|
||||
} else {
|
||||
$data = $this->getDataFromJson($line, $pattern);
|
||||
}
|
||||
|
||||
foreach ($this->columns as $index => $column) {
|
||||
$result[$column] = isset($data[$index]) ? trim($data[$index]) : '';
|
||||
}
|
||||
return (object) $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Json data stored from a line of contents of Audit Log files.
|
||||
*
|
||||
* @param string $line
|
||||
* @param string $pattern
|
||||
* @return array
|
||||
*/
|
||||
private function getDataFromJson($line, $pattern)
|
||||
{
|
||||
/**
|
||||
* $matches[0]: datetime
|
||||
* $matches[1]: channel
|
||||
* $matches[2]: level_name + message + context
|
||||
*/
|
||||
preg_match($pattern, $line, $matches);
|
||||
array_shift($matches);
|
||||
|
||||
if (!isset($matches[2])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$data = $matches[2];
|
||||
$position = strpos($data, ' {');
|
||||
if ($position === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$data = substr($data, $position);
|
||||
$data = str_replace('} {', '}, {', $data);
|
||||
$data = '[' . $data . ']';
|
||||
try {
|
||||
$data = G::json_decode($data);
|
||||
} catch (Exception $e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$join = [];
|
||||
foreach ($data as $value) {
|
||||
$value = (array) $value;
|
||||
$join = array_merge($join, $value);
|
||||
}
|
||||
$join = (object) $join;
|
||||
|
||||
return [
|
||||
empty($join->timeZone) ? '' : $join->timeZone,
|
||||
empty($join->workspace) ? '' : $join->workspace,
|
||||
empty($join->ip) ? '' : $join->ip,
|
||||
empty($join->usrUid) ? '' : $join->usrUid,
|
||||
empty($join->usrName) ? '' : $join->usrName,
|
||||
empty($join->action) ? '' : $join->action,
|
||||
empty($join->description) ? '' : $join->description
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filters to an Audit Log record.
|
||||
*
|
||||
* @param array $filter
|
||||
* @param object $data
|
||||
* @return boolean
|
||||
*/
|
||||
private function validate($filter, $data)
|
||||
{
|
||||
$result = true;
|
||||
$date = !empty($data->date) ? $this->mktimeDate($data->date) : 0;
|
||||
if ($filter["workspace"] != $data->workspace) {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if ($filter["action"] != "ALL") {
|
||||
if ($data->action != $filter["action"]) {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["dateFrom"] && $date > 0) {
|
||||
if (!($this->mktimeDate($filter["dateFrom"]) <= $date)) {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["dateTo"] && $date > 0) {
|
||||
if (!($date <= $this->mktimeDate($filter["dateTo"] . " 23:59:59"))) {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["description"]) {
|
||||
$result = false;
|
||||
$string = $filter["description"];
|
||||
|
||||
if ((stristr($data->date, $string) !== false) ||
|
||||
(stristr($data->ip, $string) !== false) ||
|
||||
(stristr($data->user, $string) !== false) ||
|
||||
(stristr($data->action, $string) !== false) ||
|
||||
(stristr($data->description, $string) !== false)) {
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the timestamp of the date given.
|
||||
*
|
||||
* @param string $date
|
||||
* @return int
|
||||
*/
|
||||
private function mktimeDate($date)
|
||||
{
|
||||
$array = getdate(strtotime($date));
|
||||
$mktime = mktime($array["hours"], $array["minutes"], $array["seconds"], $array["mon"], $array["mday"], $array["year"]);
|
||||
return $mktime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the corresponding arrangement for the columns of the Audit Log user
|
||||
* interface.
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
private function lineToArray($data)
|
||||
{
|
||||
$action = $data->action;
|
||||
$action = preg_replace('/([A-Z])/', '_$1', $data->action);
|
||||
$action = "ID" . strtoupper($action);
|
||||
$action = G::LoadTranslation($action);
|
||||
return [
|
||||
"DATE" => $data->date,
|
||||
"USER" => $data->user,
|
||||
"IP" => $data->ip,
|
||||
"ACTION" => $action,
|
||||
"DESCRIPTION" => $data->description
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -3349,6 +3349,7 @@ class Cases
|
||||
* @param array $rolesPermissions, the roles that we need to review
|
||||
* @param array $objectPermissions, the permissions that we need to review
|
||||
* @param boolean $objectSupervisor, if we need to get all the objects supervisor
|
||||
* @param string $tasUid
|
||||
* @return array
|
||||
*/
|
||||
public function userAuthorization(
|
||||
@@ -3357,7 +3358,8 @@ class Cases
|
||||
$appUid,
|
||||
$rolesPermissions = [],
|
||||
$objectPermissions = [],
|
||||
$objectSupervisor = false
|
||||
$objectSupervisor = false,
|
||||
$tasUid = ''
|
||||
) {
|
||||
$arrayAccess = [];
|
||||
|
||||
@@ -3389,7 +3391,7 @@ class Cases
|
||||
if (count($objectPermissions) > 0) {
|
||||
$case = new ClassesCases();
|
||||
foreach ($objectPermissions as $key => $value) {
|
||||
$resPermission = $case->getAllObjectsFrom($proUid, $appUid, '', $usrUid, $value);
|
||||
$resPermission = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, $value);
|
||||
if (isset($resPermission[$key])) {
|
||||
$arrayAccess['objectPermissions'][$key] = $resPermission[$key];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\BusinessModel\Files;
|
||||
|
||||
abstract class Files
|
||||
{
|
||||
/**
|
||||
* @var string Path of the directory where the files are stored.
|
||||
*/
|
||||
protected $pathFiles;
|
||||
|
||||
/**
|
||||
* Files constructor.
|
||||
*
|
||||
* @param $path
|
||||
*/
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->pathFiles = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get path files
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathFiles()
|
||||
{
|
||||
return $this->pathFiles;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function get the list of the log files
|
||||
*
|
||||
* @param string $filter
|
||||
* @param string $sort
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $dir related to order the column
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract public function getAllFiles(
|
||||
$filter = '',
|
||||
$sort = '',
|
||||
$start = 0,
|
||||
$limit = 20,
|
||||
$dir = 'ASC'
|
||||
);
|
||||
|
||||
/**
|
||||
* Download file
|
||||
*
|
||||
* @param array files
|
||||
*/
|
||||
abstract public function download($files);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\BusinessModel\Files;
|
||||
|
||||
use Chumper\Zipper\Zipper;
|
||||
use Configurations;
|
||||
use Exception;
|
||||
use G;
|
||||
use ProcessMaker\Core\System;
|
||||
use SplFileInfo;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
class FilesLogs extends Files
|
||||
{
|
||||
/**
|
||||
* Date format in list
|
||||
* @var string
|
||||
*/
|
||||
private $dateFormat = 'Y-m-d H:i:s';
|
||||
|
||||
/**
|
||||
* Path of the directory where the files are stored.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $pathData = '';
|
||||
|
||||
/**
|
||||
* FilesLogs constructor .
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$system = System::getSystemConfiguration();
|
||||
$configuration = new Configurations();
|
||||
$generalConfig = $configuration->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
if (isset($generalConfig['casesListDateFormat']) && !empty($generalConfig['casesListDateFormat'])) {
|
||||
$this->setDateFormat($generalConfig['casesListDateFormat']);
|
||||
}
|
||||
$path = PATH_DATA . 'sites' . PATH_SEP . config('system.workspace') . PATH_SEP . 'log' . PATH_SEP;
|
||||
if (isset($system['logs_location']) && !empty($system['logs_location']) && is_dir($system['logs_location'])) {
|
||||
$path = $system['logs_location'];
|
||||
}
|
||||
$this->setPathDataSaveFile(PATH_DATA_PUBLIC);
|
||||
parent::__construct($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Date Format
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDateFormat()
|
||||
{
|
||||
return $this->dateFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Date Format
|
||||
*
|
||||
* @param string $dateFormat
|
||||
*/
|
||||
public function setDateFormat($dateFormat)
|
||||
{
|
||||
$this->dateFormat = $dateFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Path data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPathDataSaveFile()
|
||||
{
|
||||
return $this->pathData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set path data
|
||||
*
|
||||
* @param string $pathData
|
||||
*/
|
||||
public function setPathDataSaveFile($pathData)
|
||||
{
|
||||
G::mk_dir($pathData);
|
||||
$this->pathData = $pathData;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function get the list of the log files
|
||||
*
|
||||
* @param string $filter
|
||||
* @param string $sort
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $dir related to order the column
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAllFiles($filter = '', $sort = 'fileCreated', $start = 0, $limit = 20, $dir = 'DESC')
|
||||
{
|
||||
if (!file_exists($this->getPathFiles())) {
|
||||
return [
|
||||
'totalRows' => 0,
|
||||
'data' => []
|
||||
];
|
||||
}
|
||||
|
||||
$finder = new Finder();
|
||||
$finder->files()
|
||||
->in($this->getPathFiles())
|
||||
->name('processmaker*.log')
|
||||
->name('audit*.log');
|
||||
|
||||
if (!empty($filter)) {
|
||||
$finder->filter(function (SplFileInfo $file) use ($filter) {
|
||||
if (stristr($file->getFilename(), $filter) === false &&
|
||||
stristr($file->getSize(), $filter) === false &&
|
||||
stristr($file->getMTime(), $filter) === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//get files
|
||||
$iterator = $finder->getIterator();
|
||||
$files = iterator_to_array($iterator);
|
||||
|
||||
//sort files
|
||||
switch ($sort) {
|
||||
case 'fileSize':
|
||||
uasort($files, function (SplFileInfo $a, SplFileInfo $b) use ($dir) {
|
||||
$size1 = $a->getSize();
|
||||
$size2 = $b->getSize();
|
||||
if ($dir === 'ASC') {
|
||||
return $size1 > $size2;
|
||||
} else {
|
||||
return $size1 < $size2;
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'fileCreated':
|
||||
uasort($files, function ($a, $b) use ($dir) {
|
||||
$time1 = $a->getMTime();
|
||||
$time2 = $b->getMTime();
|
||||
if ($dir === 'ASC') {
|
||||
return $time1 > $time2;
|
||||
} else {
|
||||
return $time1 < $time2;
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'fileName':
|
||||
default:
|
||||
uasort($files, function ($a, $b) use ($dir) {
|
||||
$name1 = $a->getFilename();
|
||||
$name2 = $b->getFilename();
|
||||
if ($dir === 'ASC') {
|
||||
return strcmp($name1, $name2);
|
||||
} else {
|
||||
return strcmp($name2, $name1);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
//count files
|
||||
$total = count($files);
|
||||
|
||||
//limit files
|
||||
$files = array_slice(
|
||||
$files, !empty($start) ? $start : 0, !empty($limit) ? $limit : 20
|
||||
);
|
||||
|
||||
//create out element
|
||||
$result = [];
|
||||
foreach ($files as $file) {
|
||||
$result[] = [
|
||||
'fileName' => $file->getFilename(),
|
||||
'fileSize' => $this->size($file->getSize()),
|
||||
'fileCreated' => date($this->getDateFormat(), $file->getMTime())
|
||||
];
|
||||
}
|
||||
return [
|
||||
'totalRows' => $total,
|
||||
'data' => $result
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the size of a file in bytes to its literal equivalent
|
||||
*
|
||||
* @param int $size file size in bytes
|
||||
* @param string $format
|
||||
* @return string
|
||||
*/
|
||||
private function size($size, $format = null)
|
||||
{
|
||||
$sizes = ['Bytes', 'Kbytes', 'Mbytes', 'Gbytes', 'Tbytes', 'Pbytes', 'Ebytes', 'Zbytes', 'Ybytes'];
|
||||
if ($format === null) {
|
||||
$format = ' % 01.2f % s';
|
||||
}
|
||||
$lastSizesLabel = end($sizes);
|
||||
foreach ($sizes as $sizeLabel) {
|
||||
if ($size < 1024) {
|
||||
break;
|
||||
}
|
||||
if ($sizeLabel !== $lastSizesLabel) {
|
||||
$size /= 1024;
|
||||
}
|
||||
}
|
||||
if ($sizeLabel === $sizes[0]) {
|
||||
// Format bytes
|
||||
$format = '%01d %s';
|
||||
}
|
||||
return sprintf($format, $size, $sizeLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create file zip
|
||||
*
|
||||
* @param array $files file name
|
||||
*
|
||||
* @return string path file
|
||||
* @throws Exception
|
||||
*/
|
||||
private function createZip($files)
|
||||
{
|
||||
try {
|
||||
$zipper = new Zipper();
|
||||
$name = str_replace('.log', '.zip', $files[0]);
|
||||
if (count($files) > 1) {
|
||||
$name = 'processmaker_logs.zip';
|
||||
}
|
||||
|
||||
$zipper->zip($this->getPathDataSaveFile() . $name);
|
||||
|
||||
$pathFileLogs = $this->getPathFiles();
|
||||
$pathSep = '/';
|
||||
if (strpos($pathFileLogs, '\\') !== false) {
|
||||
$pathSep = '\\';
|
||||
}
|
||||
if (substr($pathFileLogs, -1, strlen($pathSep)) !== $pathSep) {
|
||||
$pathFileLogs .= $pathSep;
|
||||
}
|
||||
|
||||
foreach ($files as $key => $file) {
|
||||
$info = pathinfo($file);
|
||||
if (file_exists($pathFileLogs . $info['basename'])) {
|
||||
$zipper->add($pathFileLogs . $info['basename']);
|
||||
}
|
||||
}
|
||||
$zipper->close();
|
||||
|
||||
return $this->getPathDataSaveFile() . $name;
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download log files compressed in a Zip format
|
||||
*
|
||||
* @param array $files files names
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function download($files)
|
||||
{
|
||||
try {
|
||||
$fileZip = $this->createZip($files);
|
||||
|
||||
if (file_exists($fileZip)) {
|
||||
G::streamFile($fileZip, true);
|
||||
} else {
|
||||
throw new Exception('File not exist.');
|
||||
}
|
||||
G::rm_dir($fileZip);
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use Behat\Behat\Exception\Exception;
|
||||
use \G;
|
||||
use \Criteria;
|
||||
use \ObjectPermissionPeer;
|
||||
use \Exception as StandardException;
|
||||
use BasePeer;
|
||||
use Criteria;
|
||||
use G;
|
||||
use ObjectPermission;
|
||||
use ObjectPermissionPeer;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
@@ -13,6 +14,7 @@ use \Exception as StandardException;
|
||||
*/
|
||||
class ProcessPermissions
|
||||
{
|
||||
const DOES_NOT_APPLY = 'N/A';
|
||||
/**
|
||||
* Get list for Process Permissions
|
||||
*
|
||||
@@ -20,8 +22,6 @@ class ProcessPermissions
|
||||
* @var string $op_uid. Uid for Process Permission
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -42,6 +42,14 @@ class ProcessPermissions
|
||||
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
//Participated
|
||||
if ($aRow['OP_PARTICIPATE'] == 0) {
|
||||
$participated = G::LoadTranslation('ID_NO');
|
||||
} else {
|
||||
$participated = G::LoadTranslation('ID_YES');
|
||||
}
|
||||
//Obtain action (permission)
|
||||
$action = G::LoadTranslation('ID_' . $aRow['OP_ACTION']);
|
||||
//Obtain task target
|
||||
if (($aRow['TAS_UID'] != '') && ($aRow['TAS_UID'] != '0')) {
|
||||
try {
|
||||
@@ -87,97 +95,87 @@ class ProcessPermissions
|
||||
//Obtain object and type
|
||||
switch ($aRow['OP_OBJ_TYPE']) {
|
||||
case 'ALL':
|
||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$objectType = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
case 'ANY': //For backward compatibility (some process with ANY instead of ALL
|
||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$objectType = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
/* case 'ANY_DYNAFORM':
|
||||
$sObjectType = G::LoadTranslation('ID_ANY_DYNAFORM');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
case 'ANY_INPUT':
|
||||
$sObjectType = G::LoadTranslation('ID_ANY_INPUT');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
case 'ANY_OUTPUT':
|
||||
$sObjectType = G::LoadTranslation('ID_ANY_OUTPUT');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
break; */
|
||||
case 'DYNAFORM':
|
||||
$sObjectType = G::LoadTranslation('ID_DYNAFORM');
|
||||
$objectType = G::LoadTranslation('ID_DYNAFORM');
|
||||
if (($aRow['OP_OBJ_UID'] != '') && ($aRow['OP_OBJ_UID'] != '0')) {
|
||||
$oDynaform = new \Dynaform();
|
||||
try {
|
||||
$aFields = $oDynaform->load($aRow['OP_OBJ_UID']);
|
||||
$sObject = $aFields['DYN_TITLE'];
|
||||
$object = $aFields['DYN_TITLE'];
|
||||
} catch (\Exception $errorNotExists) {
|
||||
error_log($errorNotExists->getMessage() . ' - ' . G::LoadTranslation('ID_PROCESS_PERMISSIONS') .
|
||||
error_log($errorNotExists->getMessage() . ' - ' . G::LoadTranslation('ID_PROCESS_PERMISSIONS') .
|
||||
' - ' . $aRow['OP_OBJ_TYPE'] . ' - ' . $aRow['OP_OBJ_UID']);
|
||||
$oDataset->next();
|
||||
continue 2;
|
||||
}
|
||||
} else {
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
}
|
||||
break;
|
||||
case 'INPUT':
|
||||
$sObjectType = G::LoadTranslation('ID_INPUT_DOCUMENT');
|
||||
$objectType = G::LoadTranslation('ID_INPUT_DOCUMENT');
|
||||
if (($aRow['OP_OBJ_UID'] != '') && ($aRow['OP_OBJ_UID'] != '0')) {
|
||||
$oInputDocument = new \InputDocument();
|
||||
try {
|
||||
$aFields = $oInputDocument->load($aRow['OP_OBJ_UID']);
|
||||
$sObject = $aFields['INP_DOC_TITLE'];
|
||||
$object = $aFields['INP_DOC_TITLE'];
|
||||
} catch (\Exception $errorNotExists) {
|
||||
error_log($errorNotExists->getMessage() . ' - ' . G::LoadTranslation('ID_PROCESS_PERMISSIONS') .
|
||||
error_log($errorNotExists->getMessage() . ' - ' . G::LoadTranslation('ID_PROCESS_PERMISSIONS') .
|
||||
' - ' . $aRow['OP_OBJ_TYPE'] . ' - ' . $aRow['OP_OBJ_UID']);
|
||||
$oDataset->next();
|
||||
continue 2;
|
||||
}
|
||||
} else {
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
}
|
||||
break;
|
||||
case 'OUTPUT':
|
||||
$sObjectType = G::LoadTranslation('ID_OUTPUT_DOCUMENT');
|
||||
$objectType = G::LoadTranslation('ID_OUTPUT_DOCUMENT');
|
||||
if (($aRow['OP_OBJ_UID'] != '') && ($aRow['OP_OBJ_UID'] != '0')) {
|
||||
$oOutputDocument = new \OutputDocument();
|
||||
try {
|
||||
$aFields = $oOutputDocument->load($aRow['OP_OBJ_UID']);
|
||||
$sObject = $aFields['OUT_DOC_TITLE'];
|
||||
$object = $aFields['OUT_DOC_TITLE'];
|
||||
} catch (\Exception $errorNotExists) {
|
||||
error_log($errorNotExists->getMessage() . ' - ' . G::LoadTranslation('ID_PROCESS_PERMISSIONS') .
|
||||
error_log($errorNotExists->getMessage() . ' - ' . G::LoadTranslation('ID_PROCESS_PERMISSIONS') .
|
||||
' - ' . $aRow['OP_OBJ_TYPE'] . ' - ' . $aRow['OP_OBJ_UID']);
|
||||
$oDataset->next();
|
||||
continue 2;
|
||||
}
|
||||
} else {
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
}
|
||||
break;
|
||||
case 'CASES_NOTES':
|
||||
$sObjectType = G::LoadTranslation('ID_CASES_NOTES');
|
||||
$sObject = 'N/A';
|
||||
$objectType = G::LoadTranslation('ID_CASES_NOTES');
|
||||
$object = self::DOES_NOT_APPLY;
|
||||
break;
|
||||
case 'MSGS_HISTORY':
|
||||
$sObjectType = G::LoadTranslation('MSGS_HISTORY');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$objectType = G::LoadTranslation('MSGS_HISTORY');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
case 'REASSIGN_MY_CASES':
|
||||
$objectType = G::LoadTranslation('ID_REASSIGN_MY_CASES');
|
||||
$object = self::DOES_NOT_APPLY;
|
||||
$aRow['OP_ACTION'] = self::DOES_NOT_APPLY;
|
||||
$participated = self::DOES_NOT_APPLY;
|
||||
break;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
default:
|
||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
$objectType = G::LoadTranslation('ID_ALL');
|
||||
$object = G::LoadTranslation('ID_ALL');
|
||||
|
||||
break;
|
||||
}
|
||||
//Participated
|
||||
if ($aRow['OP_PARTICIPATE'] == 0) {
|
||||
$sParticipated = G::LoadTranslation('ID_NO');
|
||||
} else {
|
||||
$sParticipated = G::LoadTranslation('ID_YES');
|
||||
}
|
||||
//Obtain action (permission)
|
||||
$sAction = G::LoadTranslation('ID_' . $aRow['OP_ACTION']);
|
||||
|
||||
//Add to array
|
||||
$arrayTemp = array();
|
||||
$arrayTemp = array_merge($aRow, array(
|
||||
@@ -185,10 +183,10 @@ class ProcessPermissions
|
||||
'TASK_TARGET' => $sTaskTarget,
|
||||
'GROUP_USER' => $sUserGroup,
|
||||
'TASK_SOURCE' => $sTaskSource,
|
||||
'OBJECT_TYPE' => $sObjectType,
|
||||
'OBJECT' => $sObject,
|
||||
'PARTICIPATED' => $sParticipated,
|
||||
'ACTION' => $sAction,
|
||||
'OBJECT_TYPE' => $objectType,
|
||||
'OBJECT' => $object,
|
||||
'PARTICIPATED' => $participated,
|
||||
'ACTION' => $action,
|
||||
'OP_CASE_STATUS' => $aRow['OP_CASE_STATUS'])
|
||||
);
|
||||
$aObjectsPermissions[] = array_change_key_case($arrayTemp, CASE_LOWER);
|
||||
@@ -213,7 +211,7 @@ class ProcessPermissions
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @return void
|
||||
* @return void|array
|
||||
* @throws Exception
|
||||
*/
|
||||
public function saveProcessPermission($data, $opUid = '')
|
||||
@@ -226,7 +224,7 @@ class ProcessPermissions
|
||||
$opUid = $this->validateOpUid($opUid);
|
||||
}
|
||||
if (empty($data['USR_UID']) || (isset($data['USR_UID']) && $data['USR_UID'] === "null")) {
|
||||
throw (new StandardException(G::LoadTranslation("ID_SELECT_USER_OR_GROUP")));
|
||||
throw (new Exception(G::LoadTranslation("ID_SELECT_USER_OR_GROUP")));
|
||||
}
|
||||
if ($data['OP_USER_RELATION'] == "1") {
|
||||
$this->validateUsrUid($data['USR_UID']);
|
||||
@@ -244,50 +242,59 @@ class ProcessPermissions
|
||||
$data['OP_TASK_SOURCE'] = '';
|
||||
}
|
||||
|
||||
$sObjectUID = '';
|
||||
$opCaseStatus = !empty($data['OP_CASE_STATUS']) ? $data['OP_CASE_STATUS'] : '0';
|
||||
$opObjectUid = '';
|
||||
switch ($data['OP_OBJ_TYPE']) {
|
||||
case 'ANY':
|
||||
//case 'ANY_DYNAFORM':CASES_NOTES
|
||||
//case 'ANY_INPUT':
|
||||
//case 'ANY_OUTPUT':
|
||||
$sObjectUID = '';
|
||||
$opObjectUid = '';
|
||||
break;
|
||||
case 'DYNAFORM':
|
||||
$data['DYNAFORMS'] = $data['DYNAFORMS'] == 0 ? '': $data['DYNAFORMS'];
|
||||
if ($data['DYNAFORMS'] != '') {
|
||||
$this->validateDynUid($data['DYNAFORMS']);
|
||||
}
|
||||
$sObjectUID = $data['DYNAFORMS'];
|
||||
$opObjectUid = $data['DYNAFORMS'];
|
||||
break;
|
||||
case 'ATTACHED':
|
||||
$sObjectUID = '';
|
||||
$opObjectUid = '';
|
||||
break;
|
||||
case 'INPUT':
|
||||
$data['INPUTS'] = $data['INPUTS'] == 0 ? '': $data['INPUTS'];
|
||||
if ($data['INPUTS'] != '') {
|
||||
$this->validateInpUid($data['INPUTS']);
|
||||
}
|
||||
$sObjectUID = $data['INPUTS'];
|
||||
$opObjectUid = $data['INPUTS'];
|
||||
break;
|
||||
case 'OUTPUT':
|
||||
$data['OUTPUTS'] = $data['OUTPUTS'] == 0 ? '': $data['OUTPUTS'];
|
||||
if ($data['OUTPUTS'] != '') {
|
||||
$this->validateOutUid($data['OUTPUTS']);
|
||||
}
|
||||
$sObjectUID = $data['OUTPUTS'];
|
||||
$opObjectUid = $data['OUTPUTS'];
|
||||
break;
|
||||
case 'REASSIGN_MY_CASES':
|
||||
$opCaseStatus = 'TO_DO';
|
||||
$data['OP_ACTION'] = '';
|
||||
break;
|
||||
}
|
||||
$oOP = new \ObjectPermission();
|
||||
$objectPermission = new ObjectPermission();
|
||||
$permissionUid = ($opUid != '') ? $opUid : G::generateUniqueID();
|
||||
$data['OP_UID'] = $permissionUid;
|
||||
$data['OP_OBJ_UID'] = $sObjectUID;
|
||||
$opParticipate = empty($data['OP_PARTICIPATE']) ? ObjectPermission::OP_PARTICIPATE_NO : $data['OP_PARTICIPATE'];
|
||||
$data['OP_PARTICIPATE'] = $opParticipate;
|
||||
$data['OP_CASE_STATUS'] = $opCaseStatus;
|
||||
$data['OP_OBJ_UID'] = $opObjectUid;
|
||||
|
||||
if ($opUid == '') {
|
||||
$oOP->fromArray( $data, \BasePeer::TYPE_FIELDNAME );
|
||||
$oOP->save();
|
||||
$daraRes = $oOP->load($permissionUid);
|
||||
$daraRes = array_change_key_case($daraRes, CASE_LOWER);
|
||||
return $daraRes;
|
||||
if (empty($opUid)) {
|
||||
$objectPermission->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||
$objectPermission->save();
|
||||
$newPermission = $objectPermission->load($permissionUid);
|
||||
$newPermission = array_change_key_case($newPermission, CASE_LOWER);
|
||||
|
||||
return $newPermission;
|
||||
} else {
|
||||
$data['TAS_UID'] = $data['TAS_UID'] != '' ? $data['TAS_UID'] : '0';
|
||||
$data['OP_TASK_SOURCE'] = $data['OP_TASK_SOURCE'] != '' ? $data['OP_TASK_SOURCE'] : '0';
|
||||
@@ -296,7 +303,8 @@ class ProcessPermissions
|
||||
$data['OP_OBJ_UID'] = $data['OP_OBJ_UID'] != '' ? $data['OP_OBJ_UID'] : '0';
|
||||
$data['OP_ACTION'] = $data['OP_ACTION'] != '' ? $data['OP_ACTION'] : '0';
|
||||
$data['OP_CASE_STATUS'] = $data['OP_CASE_STATUS'] != '' ? $data['OP_CASE_STATUS'] : '0';
|
||||
$oOP->update($data);
|
||||
|
||||
$objectPermission->update($data);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Core;
|
||||
|
||||
use Configurations;
|
||||
use DomDocument;
|
||||
use Exception;
|
||||
@@ -59,7 +60,8 @@ class System
|
||||
'load_headers_ie' => 0,
|
||||
'redirect_to_mobile' => 0,
|
||||
'disable_php_upload_execution' => 0,
|
||||
'disable_download_documents_session_validation' => 0
|
||||
'disable_download_documents_session_validation' => 0,
|
||||
'logs_max_files' => 60
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1129,18 +1131,26 @@ class System
|
||||
}
|
||||
|
||||
if (empty($wsIniFile)) {
|
||||
|
||||
if (defined('PATH_DB')) {
|
||||
// if we're on a valid workspace env.
|
||||
if (empty($wsName)) {
|
||||
$uriParts = explode('/', getenv("REQUEST_URI"));
|
||||
|
||||
if (isset($uriParts[1])) {
|
||||
if (substr($uriParts[1], 0, 3) == 'sys') {
|
||||
$wsName = substr($uriParts[1], 3);
|
||||
try {
|
||||
if (function_exists('config')) {
|
||||
$wsName = config("system.workspace");
|
||||
}
|
||||
} catch (Exception $exception) {
|
||||
$wsName = '';
|
||||
}
|
||||
if (empty($wsName)) {
|
||||
$uriParts = explode('/', getenv("REQUEST_URI"));
|
||||
if (isset($uriParts[1])) {
|
||||
if (substr($uriParts[1], 0, 3) === 'sys') {
|
||||
$wsName = substr($uriParts[1], 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$wsIniFile = PATH_DB . $wsName . PATH_SEP . 'env.ini';
|
||||
}
|
||||
}
|
||||
|
||||
73
workflow/engine/src/ProcessMaker/Services/Api/FileLogs.php
Normal file
73
workflow/engine/src/ProcessMaker/Services/Api/FileLogs.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Services\Api;
|
||||
|
||||
use Exception;
|
||||
use G;
|
||||
use ProcessMaker\BusinessModel\Files\FilesLogs;
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
|
||||
/**
|
||||
* Log Files Api Controller
|
||||
*
|
||||
* @protected
|
||||
*/
|
||||
class FileLogs extends Api
|
||||
{
|
||||
/**
|
||||
* Get the list of the log files
|
||||
*
|
||||
* @url GET /list
|
||||
*
|
||||
* @param int $start {@from path}
|
||||
* @param int $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $filter {@from path}
|
||||
*
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_LOG_FILES}
|
||||
*/
|
||||
public function doGetListFileLogs(
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'fileCreated',
|
||||
$dir = 'DESC',
|
||||
$filter = ''
|
||||
)
|
||||
{
|
||||
try {
|
||||
$file = new FilesLogs();
|
||||
return $file->getAllFiles($filter, $sort, $start, $limit, $dir);
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Download file.
|
||||
*
|
||||
* @url POST /download
|
||||
*
|
||||
* @param array $request_data name of the files
|
||||
*
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_LOG_FILES}
|
||||
*/
|
||||
public function doPostDownload($request_data)
|
||||
{
|
||||
try {
|
||||
$file = new FilesLogs();
|
||||
$file->download(G::json_decode($request_data['files']));
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Services\Api\Project;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
use Exception;
|
||||
use Luracast\Restler\RestException;
|
||||
use ProcessMaker\BusinessModel\ProcessPermissions as BmProcessPermissions;
|
||||
use ProcessMaker\Services\Api;
|
||||
|
||||
/**
|
||||
* Project\ProcessPermissions Api Controller
|
||||
@@ -17,20 +19,18 @@ class ProcessPermissions extends Api
|
||||
/**
|
||||
* @param string $prj_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @url GET /:prj_uid/process-permissions
|
||||
*/
|
||||
public function doGetProcessPermissions($prj_uid)
|
||||
{
|
||||
try {
|
||||
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
|
||||
$processPermissions = new BmProcessPermissions();
|
||||
$response = $processPermissions->getProcessPermissions($prj_uid);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
@@ -39,20 +39,18 @@ class ProcessPermissions extends Api
|
||||
* @param string $prj_uid {@min 1} {@max 32}
|
||||
* @param string $ob_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @url GET /:prj_uid/process-permission/:ob_uid
|
||||
*/
|
||||
public function doGetProcessPermission($prj_uid, $ob_uid)
|
||||
{
|
||||
try {
|
||||
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
|
||||
$processPermissions = new BmProcessPermissions();
|
||||
$response = $processPermissions->getProcessPermissions($prj_uid, $ob_uid);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
@@ -75,11 +73,11 @@ class ProcessPermissions extends Api
|
||||
public function doPostProcessPermission($prj_uid, $request_data)
|
||||
{
|
||||
try {
|
||||
$hiddenFields = array('task_target', 'group_user', 'task_source',
|
||||
$hiddenFields = ['task_target', 'group_user', 'task_source',
|
||||
'object_type', 'object', 'participated', 'action'
|
||||
);
|
||||
];
|
||||
$request_data['pro_uid'] = $prj_uid;
|
||||
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
|
||||
$processPermissions = new BmProcessPermissions();
|
||||
$response = $processPermissions->saveProcessPermission($request_data);
|
||||
foreach ($response as $key => $eventData) {
|
||||
if (in_array($key, $hiddenFields)) {
|
||||
@@ -87,13 +85,13 @@ class ProcessPermissions extends Api
|
||||
}
|
||||
}
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update process permisson.
|
||||
* Update process permission.
|
||||
*
|
||||
* @url PUT /:prj_uid/process-permission/:ob_uid
|
||||
*
|
||||
@@ -104,7 +102,7 @@ class ProcessPermissions extends Api
|
||||
* @param string $op_user_relation {@from body} {@choice 1,2}
|
||||
* @param string $op_case_status {@from body} {@choice ALL,DRAFT,TO_DO,PAUSED,COMPLETED}
|
||||
* @param string $op_participate {@from body} {@choice 0,1}
|
||||
* @param string $op_obj_type {@from body} {@choice ANY,DYNAFORM,ATTACHMENT,INPUT,OUTPUT,CASES_NOTES,MSGS_HISTORY,SUMMARY_FORM}
|
||||
* @param string $op_obj_type {@from body} {@choice ANY,DYNAFORM,ATTACHMENT,INPUT,OUTPUT,CASES_NOTES,MSGS_HISTORY,SUMMARY_FORM,REASSIGN_MY_CASES}
|
||||
* @param string $op_action {@from body} {@choice VIEW,BLOCK,DELETE,RESEND}
|
||||
* @param string $tas_uid {@from body}
|
||||
* @param string $op_task_source {@from body}
|
||||
@@ -124,10 +122,10 @@ class ProcessPermissions extends Api
|
||||
$request_data,
|
||||
$usr_uid,
|
||||
$op_user_relation,
|
||||
$op_case_status,
|
||||
$op_participate,
|
||||
$op_case_status = 'ALL',
|
||||
$op_participate = '0',
|
||||
$op_obj_type,
|
||||
$op_action,
|
||||
$op_action = 'VIEW',
|
||||
$tas_uid = '',
|
||||
$op_task_source = '',
|
||||
$dynaforms = '',
|
||||
@@ -136,10 +134,11 @@ class ProcessPermissions extends Api
|
||||
) {
|
||||
try {
|
||||
$request_data['pro_uid'] = $prj_uid;
|
||||
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
|
||||
$request_data['op_action'] = $op_action;
|
||||
$processPermissions = new BmProcessPermissions();
|
||||
$response = $processPermissions->saveProcessPermission($request_data, $ob_uid);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
@@ -153,14 +152,14 @@ class ProcessPermissions extends Api
|
||||
* @param string $ob_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @return void
|
||||
* @throws RestException
|
||||
*/
|
||||
public function doDeleteProcessPermission($prj_uid, $ob_uid)
|
||||
{
|
||||
try {
|
||||
$processPermissions = new \ProcessMaker\BusinessModel\ProcessPermissions();
|
||||
$response = $processPermissions->deleteProcessPermission($ob_uid, $prj_uid);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
$processPermissions = new BmProcessPermissions();
|
||||
$processPermissions->deleteProcessPermission($ob_uid, $prj_uid);
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +121,11 @@ debug = 1
|
||||
authentication = "ProcessMaker\Services\Api\Google\Authentication"
|
||||
|
||||
[alias: gmailIntegration]
|
||||
gmailIntegration = "ProcessMaker\Services\Api\GmailIntegration"
|
||||
token = "ProcessMaker\Services\Api\GmailToken"
|
||||
gmailIntegration = "ProcessMaker\Services\Api\GmailIntegration"
|
||||
token = "ProcessMaker\Services\Api\GmailToken"
|
||||
|
||||
[alias: reportingIndicators]
|
||||
reportingIndicators = "ProcessMaker\Services\Api\ReportingIndicators"
|
||||
reportingIndicators = "ProcessMaker\Services\Api\ReportingIndicators"
|
||||
|
||||
[alias: logs]
|
||||
log = "ProcessMaker\Services\Api\FileLogs"
|
||||
@@ -1824,7 +1824,7 @@ Ext.onReady ( function() {
|
||||
});
|
||||
|
||||
winReassignInCasesList = new Ext.Window({
|
||||
title: '',
|
||||
title: _('ID_REASSIGN_CASE'),
|
||||
width: 450,
|
||||
height: 350,
|
||||
layout:'auto',
|
||||
|
||||
@@ -1127,7 +1127,7 @@ Ext.onReady(function(){
|
||||
});
|
||||
|
||||
var winReassignInCasesList = new Ext.Window({
|
||||
title: '',
|
||||
title: _('ID_REASSIGN_CASE'),
|
||||
width: 450,
|
||||
height: 350,
|
||||
layout: 'auto',
|
||||
|
||||
4
workflow/engine/templates/fileLogs/list.html
Normal file
4
workflow/engine/templates/fileLogs/list.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<script type="text/javascript" src="/lib/js/restclient.min.js"></script>
|
||||
<div style="padding: 15px">
|
||||
<div id="list-panel"></div>
|
||||
</div>
|
||||
174
workflow/engine/templates/fileLogs/list.js
Normal file
174
workflow/engine/templates/fileLogs/list.js
Normal file
@@ -0,0 +1,174 @@
|
||||
Ext.namespace('fileLogs');
|
||||
|
||||
fileLogs.application = {
|
||||
init: function () {
|
||||
var loading = new Ext.LoadMask(Ext.getBody(), {msg: _('ID_LOADING_GRID')});
|
||||
|
||||
var downloadFiles = function () {
|
||||
var records = gridFileLog.getSelectionModel().getSelections(),
|
||||
data = [], headers = {}, fd = new FormData();
|
||||
|
||||
records.forEach(function (row) {
|
||||
data.push(row.data.fileName)
|
||||
});
|
||||
|
||||
fd.append('files', JSON.stringify(data));
|
||||
headers['Authorization'] = 'Bearer ' + getToken();
|
||||
|
||||
downloadFile('POST', urlProxy + 'filelogs/download', headers, fd);
|
||||
};
|
||||
|
||||
var pageSize = parseInt(CONFIG.pageSize);
|
||||
var token = '';
|
||||
|
||||
var getToken = function () {
|
||||
if (token === '') {
|
||||
credentials = RCBase64.decode(credentials);
|
||||
token = (credentials === '') ? "" : JSON.parse(credentials);
|
||||
}
|
||||
return token.access_token;
|
||||
};
|
||||
|
||||
var storeFileLogs = new Ext.data.GroupingStore({
|
||||
remoteSort: true,
|
||||
proxy: new Ext.data.HttpProxy({
|
||||
api: {
|
||||
read: urlProxy + 'filelogs/list'
|
||||
},
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': 'Bearer ' + getToken()
|
||||
}
|
||||
}),
|
||||
reader: new Ext.data.JsonReader({
|
||||
root: 'data',
|
||||
totalProperty: 'totalRows',
|
||||
fields: [
|
||||
{name: 'fileName'},
|
||||
{name: 'fileCreated'},
|
||||
{name: 'fileSize'}
|
||||
]
|
||||
}),
|
||||
sortInfo: {
|
||||
field: 'fileCreated',
|
||||
direction: 'DESC'
|
||||
},
|
||||
listeners: {
|
||||
beforeload: function (store) {
|
||||
loading.show();
|
||||
},
|
||||
load: function (store, record, opt) {
|
||||
loading.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var storePageSize = new Ext.data.SimpleStore({
|
||||
fields: ['size'],
|
||||
data: [['20'], ['30'], ['40'], ['50'], ['100']],
|
||||
autoLoad: true
|
||||
});
|
||||
|
||||
var cboPageSize = new Ext.form.ComboBox({
|
||||
id: 'cboPageSize',
|
||||
|
||||
mode: 'local',
|
||||
triggerAction: 'all',
|
||||
store: storePageSize,
|
||||
valueField: 'size',
|
||||
displayField: 'size',
|
||||
width: 50,
|
||||
editable: false,
|
||||
listeners: {
|
||||
select: function (combo, record, index) {
|
||||
pageSize = parseInt(record.data['size']);
|
||||
paging.pageSize = pageSize;
|
||||
paging.moveFirst();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var paging = new Ext.PagingToolbar({
|
||||
id: 'paging',
|
||||
pageSize: pageSize,
|
||||
store: storeFileLogs,
|
||||
displayInfo: true,
|
||||
displayMsg: _('ID_GRID_PAGE_DISPLAYING_FILE_LOGS'),
|
||||
emptyMsg: _('ID_NO_RECORDS_FOUND'),
|
||||
items: ['-', _('ID_PAGE_SIZE') + ' ', cboPageSize]
|
||||
});
|
||||
|
||||
var cmodel = new Ext.grid.ColumnModel({
|
||||
defaults: {
|
||||
width: 50,
|
||||
sortable: true
|
||||
},
|
||||
columns: [
|
||||
{header: _('ID_FILE_NAME'), dataIndex: 'fileName', width: 15},
|
||||
{header: _('ID_FILE_LOG_CREATED'), dataIndex: 'fileCreated', width: 15},
|
||||
{header: _('ID_FILE_LOG_SIZE'), dataIndex: 'fileSize', width: 10}
|
||||
]
|
||||
});
|
||||
|
||||
var smodel = new Ext.grid.RowSelectionModel({
|
||||
singleSelect: false,
|
||||
disableSelection: true,
|
||||
listeners: {
|
||||
beforerowselect: function (sm, rowIndex, keepExisting, record) {
|
||||
sm.suspendEvents();
|
||||
if (sm.isSelected(rowIndex)) {
|
||||
// row already selected, deselect it
|
||||
sm.deselectRow(rowIndex);
|
||||
} else {
|
||||
Ext.getCmp('btnDownload').enable();
|
||||
sm.selectRow(rowIndex, true)
|
||||
}
|
||||
sm.resumeEvents();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var gridFileLog = new Ext.grid.GridPanel({
|
||||
id: 'gridFileLog',
|
||||
title: _('ID_STANDARD_LOGGING'),
|
||||
|
||||
store: storeFileLogs,
|
||||
colModel: cmodel,
|
||||
selModel: smodel,
|
||||
cls: 'grid_with_checkbox',
|
||||
columnLines: true,
|
||||
viewConfig: {forceFit: true},
|
||||
enableColumnResize: true,
|
||||
enableHdMenu: false,
|
||||
tbar: [
|
||||
{
|
||||
id: 'btnDownload',
|
||||
text: _('ID_DOWNLOAD') + ' ',
|
||||
iconCls: 'button_menu_ext ICON_STANDARD_LOGGING',
|
||||
disabled: true,
|
||||
handler: downloadFiles
|
||||
}
|
||||
],
|
||||
bbar: paging,
|
||||
border: true
|
||||
});
|
||||
|
||||
storeFileLogs.load();
|
||||
|
||||
cboPageSize.setValue(pageSize);
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
layout: 'fit',
|
||||
autoScroll: false,
|
||||
items: [gridFileLog]
|
||||
});
|
||||
|
||||
if (typeof(__FILE_LOGS_ERROR__) !== 'undefined') {
|
||||
PMExt.notify(_('ID_STANDARD_LOGGING'), __FILE_LOGS_ERROR__);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Ext.onReady(fileLogs.application.init, fileLogs.application);
|
||||
Reference in New Issue
Block a user