Merged in release/3.4.4 (pull request #7197)
3.4.4: Update the feature with the last official build Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -42,3 +42,4 @@ test_shared/
|
|||||||
**/cache/
|
**/cache/
|
||||||
storage/
|
storage/
|
||||||
phpunit.xml
|
phpunit.xml
|
||||||
|
!/workflow/engine/plugins/.gitignore
|
||||||
@@ -82,6 +82,11 @@ workflow/engine/methods/setup/webServices.php
|
|||||||
workflow/engine/methods/setup/webServicesAjax.php
|
workflow/engine/methods/setup/webServicesAjax.php
|
||||||
workflow/engine/methods/setup/webServicesList.php
|
workflow/engine/methods/setup/webServicesList.php
|
||||||
workflow/engine/methods/users/data_usersList.php
|
workflow/engine/methods/users/data_usersList.php
|
||||||
|
workflow/engine/plugins/charts.php
|
||||||
|
workflow/engine/plugins/charts/class.charts.php
|
||||||
|
workflow/engine/plugins/charts/config/setup.conf
|
||||||
|
workflow/engine/plugins/charts/genericCharts.php
|
||||||
|
workflow/engine/plugins/charts/setupPage.xml
|
||||||
workflow/engine/plugins/openFlash.php
|
workflow/engine/plugins/openFlash.php
|
||||||
workflow/engine/plugins/openFlash/chart-data.php
|
workflow/engine/plugins/openFlash/chart-data.php
|
||||||
workflow/engine/plugins/openFlash/chart.php
|
workflow/engine/plugins/openFlash/chart.php
|
||||||
@@ -103,6 +108,8 @@ workflow/engine/plugins/pmosCommunity/open_flash_chart_object.php
|
|||||||
workflow/engine/plugins/pmosCommunity/public_html/open-flash-chart.swf
|
workflow/engine/plugins/pmosCommunity/public_html/open-flash-chart.swf
|
||||||
workflow/engine/plugins/pmosCommunity/public_html/swfobject.js
|
workflow/engine/plugins/pmosCommunity/public_html/swfobject.js
|
||||||
workflow/engine/plugins/pmosCommunity/setupPage.xml
|
workflow/engine/plugins/pmosCommunity/setupPage.xml
|
||||||
|
workflow/engine/plugins/processTemplate.php
|
||||||
|
workflow/engine/plugins/processTemplate/class.processTemplate.php
|
||||||
workflow/engine/skinEngine/base/images/updating/page_background.png
|
workflow/engine/skinEngine/base/images/updating/page_background.png
|
||||||
workflow/engine/skinEngine/neoclassic/images/updating/page_background.png
|
workflow/engine/skinEngine/neoclassic/images/updating/page_background.png
|
||||||
workflow/engine/src/ProcessMaker/Services/Api/Test2.php
|
workflow/engine/src/ProcessMaker/Services/Api/Test2.php
|
||||||
@@ -122,4 +129,4 @@ workflow/engine/xmlform/cases/cases_ReassignBy.xml
|
|||||||
workflow/engine/xmlform/users/users_List.xml
|
workflow/engine/xmlform/users/users_List.xml
|
||||||
workflow/engine/xmlform/users/users_Options.xml
|
workflow/engine/xmlform/users/users_Options.xml
|
||||||
workflow/public_html/skins/JSForms.js
|
workflow/public_html/skins/JSForms.js
|
||||||
workflow/public_html/skins/ajax.js
|
workflow/public_html/skins/ajax.js
|
||||||
@@ -87,7 +87,9 @@ class CodeScanner
|
|||||||
|
|
||||||
if (file_exists($fileDisabledCode)) {
|
if (file_exists($fileDisabledCode)) {
|
||||||
$arrayAux = array_filter(array_map("trim", file($fileDisabledCode, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)));
|
$arrayAux = array_filter(array_map("trim", file($fileDisabledCode, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)));
|
||||||
$arrayAux = array_filter($arrayAux, create_function("\$line", "return !preg_match(\"/^;.*\$/\", \$line);"));
|
$arrayAux = array_filter($arrayAux, function ($line) {
|
||||||
|
return !preg_match("/^;.*\$/", $line);
|
||||||
|
});
|
||||||
|
|
||||||
$this->arrayDisabledCode = array_unique(array_merge($this->arrayDisabledCode, $arrayAux));
|
$this->arrayDisabledCode = array_unique(array_merge($this->arrayDisabledCode, $arrayAux));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,12 +77,13 @@ class Controller
|
|||||||
*/
|
*/
|
||||||
public function __get($name)
|
public function __get($name)
|
||||||
{
|
{
|
||||||
|
$message = 'Undefined property via __get(): ' . $name . ' in ';
|
||||||
if (array_key_exists($name, $this->__data__)) {
|
if (array_key_exists($name, $this->__data__)) {
|
||||||
return $this->__data__[$name];
|
return $this->__data__[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
|
trigger_error($message . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,8 +178,8 @@ class Controller
|
|||||||
$this->__request__ = new stdclass();
|
$this->__request__ = new stdclass();
|
||||||
}
|
}
|
||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
while ($var = each($data)) {
|
foreach ($data as $key => $value) {
|
||||||
$this->__request__->{$var['key']} = $var['value'];
|
$this->__request__->{$key} = $value;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->__request__ = $data;
|
$this->__request__ = $data;
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ class Form extends XmlForm
|
|||||||
|
|
||||||
//Execute just if a query was set, it should be not empty
|
//Execute just if a query was set, it should be not empty
|
||||||
if (trim($query) == "") {
|
if (trim($query) == "") {
|
||||||
continue; //if it is empty string skip it
|
break; //if it is empty string skip it
|
||||||
}
|
}
|
||||||
|
|
||||||
//We do the query to the external connection and we've got the label
|
//We do the query to the external connection and we've got the label
|
||||||
@@ -438,7 +438,7 @@ class Form extends XmlForm
|
|||||||
|
|
||||||
// execute just if a query was set, it should be not empty
|
// execute just if a query was set, it should be not empty
|
||||||
if (trim( $query ) == '') {
|
if (trim( $query ) == '') {
|
||||||
continue; //if it is empty string skip it
|
break; //if it is empty string skip it
|
||||||
}
|
}
|
||||||
|
|
||||||
//we do the query to the external connection and we've got the label
|
//we do the query to the external connection and we've got the label
|
||||||
@@ -491,7 +491,7 @@ class Form extends XmlForm
|
|||||||
//Execute just if a query was set, it should be not empty
|
//Execute just if a query was set, it should be not empty
|
||||||
if (trim( $query ) == "") {
|
if (trim( $query ) == "") {
|
||||||
//if it is empty string skip it
|
//if it is empty string skip it
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rs = $stmt->executeQuery( ResultSet::FETCHMODE_NUM );
|
$rs = $stmt->executeQuery( ResultSet::FETCHMODE_NUM );
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ class headPublisher
|
|||||||
$sjson = $oServerConf->getProperty($keyState);
|
$sjson = $oServerConf->getProperty($keyState);
|
||||||
if ($sjson !== "") {
|
if ($sjson !== "") {
|
||||||
$json = G::json_decode($sjson);
|
$json = G::json_decode($sjson);
|
||||||
if ((is_array($json) || is_object($json)) && sizeof($json)){
|
if (is_iterable($json)) {
|
||||||
foreach ($json as $key => $value) {
|
foreach ($json as $key => $value) {
|
||||||
$views[$key] = $value;
|
$views[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ class HttpProxyController
|
|||||||
public function setHttpRequestData($data)
|
public function setHttpRequestData($data)
|
||||||
{
|
{
|
||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
while ($var = each($data)) {
|
foreach ($data as $key => $value) {
|
||||||
$this->__request__->{$var['key']} = $var['value'];
|
$this->__request__->{$key} = $value;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->__request__ = $data;
|
$this->__request__ = $data;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Menu
|
|||||||
{
|
{
|
||||||
|
|
||||||
public $Id = null;
|
public $Id = null;
|
||||||
public $Options = null;
|
public $Options = [];
|
||||||
public $Labels = null;
|
public $Labels = null;
|
||||||
public $Icons = null;
|
public $Icons = null;
|
||||||
public $JS = null;
|
public $JS = null;
|
||||||
|
|||||||
@@ -876,6 +876,8 @@ EOREGEX;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$shouldItContinue = false;
|
||||||
switch ($upper) {
|
switch ($upper) {
|
||||||
case 'AS':
|
case 'AS':
|
||||||
$token_count ++;
|
$token_count ++;
|
||||||
@@ -886,7 +888,7 @@ EOREGEX;
|
|||||||
++ $n;
|
++ $n;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
$shouldItContinue = true;
|
||||||
break;
|
break;
|
||||||
case 'INDEX':
|
case 'INDEX':
|
||||||
if ($token_category == 'CREATE') {
|
if ($token_category == 'CREATE') {
|
||||||
@@ -908,12 +910,12 @@ EOREGEX;
|
|||||||
case 'OUTER':
|
case 'OUTER':
|
||||||
# $expression .= $token;
|
# $expression .= $token;
|
||||||
$token_count ++;
|
$token_count ++;
|
||||||
continue;
|
$shouldItContinue = true;
|
||||||
break;
|
break;
|
||||||
case 'FOR':
|
case 'FOR':
|
||||||
$token_count ++;
|
$token_count ++;
|
||||||
$skip_next = true;
|
$skip_next = true;
|
||||||
continue;
|
$shouldItContinue = true;
|
||||||
break;
|
break;
|
||||||
case 'LEFT':
|
case 'LEFT':
|
||||||
case 'RIGHT':
|
case 'RIGHT':
|
||||||
@@ -969,7 +971,8 @@ EOREGEX;
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ($token === false || empty( $token ) || $token === "") {
|
if ($token === false || empty( $token ) || $token === "") {
|
||||||
continue;
|
$shouldItContinue = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($token_count == 0) {
|
if ($token_count == 0) {
|
||||||
@@ -982,6 +985,9 @@ EOREGEX;
|
|||||||
$token_count ++;
|
$token_count ++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ($shouldItContinue === true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
++ $i;
|
++ $i;
|
||||||
}
|
}
|
||||||
if (substr( trim( $table ), 0, 1 ) == '(') {
|
if (substr( trim( $table ), 0, 1 ) == '(') {
|
||||||
|
|||||||
@@ -2,7 +2,17 @@
|
|||||||
|
|
||||||
namespace Tests\unit\workflow\engine\classes;
|
namespace Tests\unit\workflow\engine\classes;
|
||||||
|
|
||||||
use \Derivation;
|
use Cases;
|
||||||
|
use Derivation;
|
||||||
|
use G;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use ProcessMaker\Model\Application;
|
||||||
|
use ProcessMaker\Model\Delegation;
|
||||||
|
use ProcessMaker\Model\Process;
|
||||||
|
use ProcessMaker\Model\Route;
|
||||||
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\TaskUser;
|
||||||
|
use ProcessMaker\Model\User;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class DerivationTest extends TestCase
|
class DerivationTest extends TestCase
|
||||||
@@ -15,6 +25,41 @@ class DerivationTest extends TestCase
|
|||||||
{
|
{
|
||||||
parent::setUp(); // TODO: Change the autogenerated stub
|
parent::setUp(); // TODO: Change the autogenerated stub
|
||||||
|
|
||||||
|
// Truncate the APP_SEQUENCE table
|
||||||
|
DB::table('APP_SEQUENCE')->truncate();
|
||||||
|
|
||||||
|
config(["system.workspace" => "test"]);
|
||||||
|
$workspace = config("system.workspace");
|
||||||
|
|
||||||
|
if (!file_exists(PATH_DB . $workspace)) {
|
||||||
|
G::mk_dir(PATH_DB . $workspace);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
|
||||||
|
$myfile = fopen(PATH_DB . $workspace . PATH_SEP . "db.php", "w");
|
||||||
|
fwrite($myfile, "<?php
|
||||||
|
define ('DB_ADAPTER', 'mysql' );
|
||||||
|
define ('DB_HOST', '" . env('DB_HOST') . "' );
|
||||||
|
define ('DB_NAME', '" . env('DB_DATABASE') . "' );
|
||||||
|
define ('DB_USER', '" . env('DB_USERNAME') . "' );
|
||||||
|
define ('DB_PASS', '" . env('DB_PASSWORD') . "' );
|
||||||
|
define ('DB_RBAC_HOST', '" . env('DB_HOST') . "' );
|
||||||
|
define ('DB_RBAC_NAME', '" . env('DB_DATABASE') . "' );
|
||||||
|
define ('DB_RBAC_USER', '" . env('DB_USERNAME') . "' );
|
||||||
|
define ('DB_RBAC_PASS', '" . env('DB_PASSWORD') . "' );
|
||||||
|
define ('DB_REPORT_HOST', '" . env('DB_HOST') . "' );
|
||||||
|
define ('DB_REPORT_NAME', '" . env('DB_DATABASE') . "' );
|
||||||
|
define ('DB_REPORT_USER', '" . env('DB_USERNAME') . "' );
|
||||||
|
define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call the tearDown method
|
||||||
|
*/
|
||||||
|
public function tearDown()
|
||||||
|
{
|
||||||
|
parent::tearDown(); // TODO: Change the autogenerated stub
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,4 +125,139 @@ class DerivationTest extends TestCase
|
|||||||
$this->assertObjectHasAttribute('name', $res['var3_label']);
|
$this->assertObjectHasAttribute('name', $res['var3_label']);
|
||||||
$this->assertEquals($res['var3_label'], (object)['Street' => 'test', 'name' => 'Something']);
|
$this->assertEquals($res['var3_label'], (object)['Street' => 'test', 'name' => 'Something']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It tests the doDerivation method sending variables synchronously
|
||||||
|
*
|
||||||
|
* @covers Derivation::doDerivation()
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_should_test_the_do_derivation_method_sending_variables_synchronously()
|
||||||
|
{
|
||||||
|
// Create the models
|
||||||
|
$user = factory(User::class)->create();
|
||||||
|
$process = factory(Process::class)->create([
|
||||||
|
'PRO_CREATE_USER' => $user->USR_UID
|
||||||
|
]);
|
||||||
|
$task = factory(Task::class)->create([
|
||||||
|
'PRO_UID' => $process->PRO_UID,
|
||||||
|
]);
|
||||||
|
$application = factory(Application::class)->create();
|
||||||
|
$appDelegation = factory(Delegation::class)->create();
|
||||||
|
|
||||||
|
// Create the parameters
|
||||||
|
$currentDelegation = [
|
||||||
|
'APP_UID' => $application->APP_UID,
|
||||||
|
'DEL_INDEX' => $appDelegation->DEL_INDEX,
|
||||||
|
'ROU_TYPE' => ''
|
||||||
|
];
|
||||||
|
$nextDel = [
|
||||||
|
'TAS_UID' => $task->TAS_UID,
|
||||||
|
'USR_UID' => $user->USR_UID,
|
||||||
|
'DEL_PRIORITY' => $appDelegation->DEL_PRIORITY,
|
||||||
|
'TAS_ASSIGN_TYPE' => $task->TAS_ASSIGN_TYPE,
|
||||||
|
'TAS_ID' => $task->TAS_ID
|
||||||
|
];
|
||||||
|
$appFields = [
|
||||||
|
'APP_NUMBER' => $application->APP_NUMBER,
|
||||||
|
'DEL_THREAD' => $appDelegation->DEL_THREAD,
|
||||||
|
'PRO_UID' => $process->PRO_UID,
|
||||||
|
'PRO_ID' => $process->PRO_ID,
|
||||||
|
'APP_DATA' => [],
|
||||||
|
'APP_TITLE' => $application->APP_TITLE,
|
||||||
|
'APP_UID' => $application->APP_UID
|
||||||
|
];
|
||||||
|
$sp = [
|
||||||
|
'SP_VARIABLES_OUT' => 'a:1:{s:6:"@&var1";s:6:"@&var2";}',
|
||||||
|
'SP_VARIABLES_IN' => 'a:1:{s:6:"@&var2";s:6:"@&var3";}',
|
||||||
|
'SP_SYNCHRONOUS' => '1',
|
||||||
|
'SP_TYPE' => '',
|
||||||
|
'TAS_UID' => $task->TAS_UID,
|
||||||
|
'USR_UID' => $user->USR_UID,
|
||||||
|
];
|
||||||
|
|
||||||
|
// Create the Derivation object
|
||||||
|
$der = new Derivation();
|
||||||
|
$der->case = new Cases;
|
||||||
|
|
||||||
|
// Call the doDerivation method
|
||||||
|
$res = $der->doDerivation($currentDelegation, $nextDel, $appFields, $sp);
|
||||||
|
|
||||||
|
// Assert the new delegation index is 1
|
||||||
|
$this->assertEquals(1, $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It tests the doDerivation method sending variables asynchronously
|
||||||
|
*
|
||||||
|
* @covers Derivation::doDerivation()
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_should_test_the_do_derivation_method_sending_variables_asynchronously()
|
||||||
|
{
|
||||||
|
// Create the models
|
||||||
|
$user = factory(User::class)->create();
|
||||||
|
$process = factory(Process::class)->create([
|
||||||
|
'PRO_CREATE_USER' => $user->USR_UID
|
||||||
|
]);
|
||||||
|
$task = factory(Task::class)->create([
|
||||||
|
'PRO_UID' => $process->PRO_UID,
|
||||||
|
'TAS_USER' => $user->USR_UID
|
||||||
|
]);
|
||||||
|
factory(TaskUser::class)->create([
|
||||||
|
'TAS_UID' => $task->TAS_UID,
|
||||||
|
'USR_UID' => $user->USR_UID,
|
||||||
|
]);
|
||||||
|
$application = factory(Application::class)->create();
|
||||||
|
$appDelegation = factory(Delegation::class)->create([
|
||||||
|
'TAS_UID' => $task->TAS_UID
|
||||||
|
]);
|
||||||
|
factory(Route::class)->create([
|
||||||
|
'TAS_UID' => $task->TAS_UID,
|
||||||
|
'ROU_NEXT_TASK' => $task->TAS_UID,
|
||||||
|
'PRO_UID' => $process->PRO_UID
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Create the parameters
|
||||||
|
$currentDelegation = [
|
||||||
|
'APP_UID' => $application->APP_UID,
|
||||||
|
'DEL_INDEX' => $appDelegation->DEL_INDEX,
|
||||||
|
'ROU_TYPE' => '',
|
||||||
|
'TAS_UID' => $task->TAS_UID
|
||||||
|
];
|
||||||
|
$nextDel = [
|
||||||
|
'TAS_UID' => $task->TAS_UID,
|
||||||
|
'USR_UID' => $user->USR_UID,
|
||||||
|
'DEL_PRIORITY' => $appDelegation->DEL_PRIORITY,
|
||||||
|
'TAS_ASSIGN_TYPE' => $task->TAS_ASSIGN_TYPE,
|
||||||
|
'TAS_ID' => $task->TAS_ID
|
||||||
|
];
|
||||||
|
$appFields = [
|
||||||
|
'APP_NUMBER' => $application->APP_NUMBER,
|
||||||
|
'DEL_THREAD' => $appDelegation->DEL_THREAD,
|
||||||
|
'PRO_UID' => $process->PRO_UID,
|
||||||
|
'PRO_ID' => $process->PRO_ID,
|
||||||
|
'APP_DATA' => [],
|
||||||
|
'APP_TITLE' => $application->APP_TITLE,
|
||||||
|
'APP_UID' => $application->APP_UID
|
||||||
|
];
|
||||||
|
$sp = [
|
||||||
|
'SP_VARIABLES_OUT' => 'a:1:{s:6:"@&var1";s:6:"@&var2";}',
|
||||||
|
'SP_VARIABLES_IN' => 'a:1:{s:6:"@&var2";s:6:"@&var3";}',
|
||||||
|
'SP_SYNCHRONOUS' => '0',
|
||||||
|
'SP_TYPE' => '',
|
||||||
|
'TAS_UID' => $task->TAS_UID,
|
||||||
|
'USR_UID' => $user->USR_UID,
|
||||||
|
];
|
||||||
|
|
||||||
|
// Create the Derivation object
|
||||||
|
$der = new Derivation();
|
||||||
|
$der->case = new Cases;
|
||||||
|
|
||||||
|
// Call the doDerivation method
|
||||||
|
$res = $der->doDerivation($currentDelegation, $nextDel, $appFields, $sp);
|
||||||
|
|
||||||
|
// Assert the new delegation index is 1
|
||||||
|
$this->assertEquals(1, $res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
2
thirdparty/pear/DB.php
vendored
2
thirdparty/pear/DB.php
vendored
@@ -610,7 +610,7 @@ class DB
|
|||||||
$parsed['dbsyntax'] = $str;
|
$parsed['dbsyntax'] = $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!count($dsn)) {
|
if (!is_string($dsn)) {
|
||||||
return $parsed;
|
return $parsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
thirdparty/phing/types/Path.php
vendored
2
thirdparty/phing/types/Path.php
vendored
@@ -318,7 +318,7 @@ class Path extends DataType {
|
|||||||
try {
|
try {
|
||||||
$element .= self::resolveFile($project, $pathElement);
|
$element .= self::resolveFile($project, $pathElement);
|
||||||
} catch (BuildException $e) {
|
} catch (BuildException $e) {
|
||||||
$this->project->log("Dropping path element " . $pathElement
|
self::$project->log("Dropping path element " . $pathElement
|
||||||
. " as it is not valid relative to the project",
|
. " as it is not valid relative to the project",
|
||||||
PROJECT_MSG_VERBOSE);
|
PROJECT_MSG_VERBOSE);
|
||||||
}
|
}
|
||||||
|
|||||||
2
thirdparty/phing/util/StringHelper.php
vendored
2
thirdparty/phing/util/StringHelper.php
vendored
@@ -106,7 +106,7 @@ class StringHelper {
|
|||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public static function hashCode($string) {
|
public static function hashCode($string) {
|
||||||
return $this->encryptCrc32($string);
|
return self::encryptCrc32($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
70
thirdparty/tcpdf/tcpdf.php
vendored
70
thirdparty/tcpdf/tcpdf.php
vendored
@@ -8301,9 +8301,6 @@ class TCPDF {
|
|||||||
$version = PHP_VERSION;
|
$version = PHP_VERSION;
|
||||||
define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
|
define('PHP_VERSION_ID', (($version{0} * 10000) + ($version{2} * 100) + $version{4}));
|
||||||
}
|
}
|
||||||
if (PHP_VERSION_ID < 50300) {
|
|
||||||
@set_magic_quotes_runtime($mqr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21418,7 +21415,7 @@ class TCPDF {
|
|||||||
// define self-closing tags
|
// define self-closing tags
|
||||||
$selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta');
|
$selfclosingtags = array('area','base','basefont','br','hr','input','img','link','meta');
|
||||||
// remove all unsupported tags (the line below lists all supported tags)
|
// remove all unsupported tags (the line below lists all supported tags)
|
||||||
$html = strip_tags($html, '<marker/><a><b><blockquote><body><br><br/><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><hr/><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
|
$html = strip_tags($html, '<marker><a><b><blockquote><body><br><dd><del><div><dl><dt><em><font><form><h1><h2><h3><h4><h5><h6><hr><i><img><input><label><li><ol><option><p><pre><s><select><small><span><strike><strong><sub><sup><table><tablehead><tcpdf><td><textarea><th><thead><tr><tt><u><ul>');
|
||||||
//replace some blank characters
|
//replace some blank characters
|
||||||
$html = preg_replace('/<pre/', '<xre', $html); // preserve pre tag
|
$html = preg_replace('/<pre/', '<xre', $html); // preserve pre tag
|
||||||
$html = preg_replace('/<(table|tr|td|th|tcpdf|blockquote|dd|div|dl|dt|form|h1|h2|h3|h4|h5|h6|br|hr|li|ol|ul|p)([^\>]*)>[\n\r\t]+/', '<\\1\\2>', $html);
|
$html = preg_replace('/<(table|tr|td|th|tcpdf|blockquote|dd|div|dl|dt|form|h1|h2|h3|h4|h5|h6|br|hr|li|ol|ul|p)([^\>]*)>[\n\r\t]+/', '<\\1\\2>', $html);
|
||||||
@@ -22789,6 +22786,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
}
|
}
|
||||||
global $spacew;
|
global $spacew;
|
||||||
while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) {
|
while (preg_match('/([0-9\.\+\-]*)[\s](Td|cm|m|l|c|re)[\s]/x', $pmid, $strpiece, PREG_OFFSET_CAPTURE, $offset) == 1) {
|
||||||
|
$flagContinue = true;
|
||||||
// check if we are inside a string section '[( ... )]'
|
// check if we are inside a string section '[( ... )]'
|
||||||
$stroffset = strpos($pmid, '[(', $offset);
|
$stroffset = strpos($pmid, '[(', $offset);
|
||||||
if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) {
|
if (($stroffset !== false) AND ($stroffset <= $strpiece[2][1])) {
|
||||||
@@ -22853,7 +22851,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
// justify block
|
// justify block
|
||||||
if (!$this->empty_string($this->lispacer)) {
|
if (!$this->empty_string($this->lispacer)) {
|
||||||
$this->lispacer = '';
|
$this->lispacer = '';
|
||||||
continue;
|
$flagContinue = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches);
|
preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches);
|
||||||
$currentxpos = $xmatches[1];
|
$currentxpos = $xmatches[1];
|
||||||
@@ -22906,36 +22905,39 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// shift the annotations and links
|
if ($flagContinue) {
|
||||||
$cxpos = ($currentxpos / $this->k);
|
// shift the annotations and links
|
||||||
$lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps);
|
$cxpos = ($currentxpos / $this->k);
|
||||||
if ($this->inxobj) {
|
$lmpos = ($this->lMargin + $this->cell_padding['L'] + $this->feps);
|
||||||
// we are inside an XObject template
|
if ($this->inxobj) {
|
||||||
foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) {
|
// we are inside an XObject template
|
||||||
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
foreach ($this->xobjects[$this->xobjid]['annotations'] as $pak => $pac) {
|
||||||
if ($cxpos > $lmpos) {
|
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
||||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k);
|
if ($cxpos > $lmpos) {
|
||||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
$this->xobjects[$this->xobjid]['annotations'][$pak]['x'] += ($spacew / $this->k);
|
||||||
} else {
|
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||||
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
} else {
|
||||||
}
|
$this->xobjects[$this->xobjid]['annotations'][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
} elseif (isset($this->PageAnnots[$this->page])) {
|
}
|
||||||
foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
|
} elseif (isset($this->PageAnnots[$this->page])) {
|
||||||
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
foreach ($this->PageAnnots[$this->page] as $pak => $pac) {
|
||||||
if ($cxpos > $lmpos) {
|
if (($pac['y'] >= $minstartliney) AND (($pac['x'] * $this->k) >= ($currentxpos - $this->feps)) AND (($pac['x'] * $this->k) <= ($currentxpos + $this->feps))) {
|
||||||
$this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k);
|
if ($cxpos > $lmpos) {
|
||||||
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
$this->PageAnnots[$this->page][$pak]['x'] += ($spacew / $this->k);
|
||||||
} else {
|
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||||
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
} else {
|
||||||
}
|
$this->PageAnnots[$this->page][$pak]['w'] += (($spacewidth * $pac['numspaces']) / $this->k);
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // end of while
|
}
|
||||||
|
// end of while
|
||||||
// remove markers
|
// remove markers
|
||||||
$pmid = str_replace('x*#!#*x', '', $pmid);
|
$pmid = str_replace('x*#!#*x', '', $pmid);
|
||||||
if ($this->isUnicodeFont()) {
|
if ($this->isUnicodeFont()) {
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ use ProcessMaker\Core\JobsManager;
|
|||||||
use ProcessMaker\Core\System;
|
use ProcessMaker\Core\System;
|
||||||
use ProcessMaker\Plugins\PluginRegistry;
|
use ProcessMaker\Plugins\PluginRegistry;
|
||||||
|
|
||||||
$fn = '
|
register_shutdown_function(function () {
|
||||||
if (class_exists("Propel")) {
|
if (class_exists("Propel")) {
|
||||||
Propel::close();
|
Propel::close();
|
||||||
}
|
}
|
||||||
';
|
});
|
||||||
register_shutdown_function(create_function('', $fn));
|
|
||||||
|
|
||||||
ini_set('memory_limit', '512M');
|
ini_set('memory_limit', '512M');
|
||||||
|
|
||||||
|
|||||||
@@ -797,7 +797,7 @@ class Cases
|
|||||||
public function array_key_intersect(&$a, &$b)
|
public function array_key_intersect(&$a, &$b)
|
||||||
{
|
{
|
||||||
$array = array();
|
$array = array();
|
||||||
while (list($key, $value) = each($a)) {
|
foreach ($a as $key => $value) {
|
||||||
if (isset($b[$key])) {
|
if (isset($b[$key])) {
|
||||||
if (is_object($b[$key]) && is_object($value)) {
|
if (is_object($b[$key]) && is_object($value)) {
|
||||||
if (serialize($b[$key]) === serialize($value)) {
|
if (serialize($b[$key]) === serialize($value)) {
|
||||||
@@ -1034,6 +1034,7 @@ class Cases
|
|||||||
public function removeCase($sAppUid, $deleteDelegation = true)
|
public function removeCase($sAppUid, $deleteDelegation = true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$appUidCopy = $sAppUid;
|
||||||
$this->getExecuteTriggerProcess($sAppUid, 'DELETED');
|
$this->getExecuteTriggerProcess($sAppUid, 'DELETED');
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
@@ -1152,7 +1153,7 @@ class Cases
|
|||||||
|
|
||||||
/** ProcessMaker log*/
|
/** ProcessMaker log*/
|
||||||
$context = Bootstrap::getDefaultContextLog();
|
$context = Bootstrap::getDefaultContextLog();
|
||||||
$context['appUid'] = $sAppUid;
|
$context['appUid'] = $appUidCopy;
|
||||||
$context['request'] = $nameFiles;
|
$context['request'] = $nameFiles;
|
||||||
Bootstrap::registerMonolog('DeleteCases', 200, 'Delete Case', $context);
|
Bootstrap::registerMonolog('DeleteCases', 200, 'Delete Case', $context);
|
||||||
|
|
||||||
|
|||||||
@@ -466,7 +466,7 @@ class PmTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($line)) {
|
if (empty($line)) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($line, "#") === 0) {
|
if (strpos($line, "#") === 0) {
|
||||||
@@ -474,7 +474,7 @@ class PmTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($line)) {
|
if (empty($line)) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Concatenate the previous line, if any, with the current
|
// Concatenate the previous line, if any, with the current
|
||||||
@@ -487,7 +487,7 @@ class PmTable
|
|||||||
// with the next one, thus supporting multi-line statements.
|
// with the next one, thus supporting multi-line statements.
|
||||||
if (strrpos($line, ";") != strlen($line) - 1) {
|
if (strrpos($line, ";") != strlen($line) - 1) {
|
||||||
$previous = $line;
|
$previous = $line;
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$line = substr($line, 0, strrpos($line, ";"));
|
$line = substr($line, 0, strrpos($line, ";"));
|
||||||
@@ -513,7 +513,7 @@ class PmTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($line)) {
|
if (empty($line)) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($line, "#") === 0) {
|
if (strpos($line, "#") === 0) {
|
||||||
@@ -521,7 +521,7 @@ class PmTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($line)) {
|
if (empty($line)) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Concatenate the previous line, if any, with the current
|
// Concatenate the previous line, if any, with the current
|
||||||
@@ -534,13 +534,13 @@ class PmTable
|
|||||||
// with the next one, thus supporting multi-line statements.
|
// with the next one, thus supporting multi-line statements.
|
||||||
if (strrpos($line, ";") != strlen($line) - 1) {
|
if (strrpos($line, ";") != strlen($line) - 1) {
|
||||||
$previous = $line;
|
$previous = $line;
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$line = substr($line, 0, strrpos($line, ";"));
|
$line = substr($line, 0, strrpos($line, ";"));
|
||||||
|
|
||||||
if (strpos($line, $this->tableName) == false) {
|
if (strpos($line, $this->tableName) == false) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$auxCreate = explode('CREATE', $line);
|
$auxCreate = explode('CREATE', $line);
|
||||||
@@ -553,7 +553,7 @@ class PmTable
|
|||||||
case 'oracle':
|
case 'oracle':
|
||||||
$line = trim($line); // Remove comments from the script
|
$line = trim($line); // Remove comments from the script
|
||||||
if (empty($line)) {
|
if (empty($line)) {
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case preg_match("/^CREATE TABLE\s/i", $line):
|
case preg_match("/^CREATE TABLE\s/i", $line):
|
||||||
|
|||||||
@@ -729,6 +729,7 @@ class ProcessMap
|
|||||||
$urlEdit = '';
|
$urlEdit = '';
|
||||||
$linkEditValue = '';
|
$linkEditValue = '';
|
||||||
|
|
||||||
|
$shouldItContinue = false;
|
||||||
switch ($aRow['STEP_TYPE_OBJ']) {
|
switch ($aRow['STEP_TYPE_OBJ']) {
|
||||||
case 'DYNAFORM':
|
case 'DYNAFORM':
|
||||||
$oDynaform = new Dynaform();
|
$oDynaform = new Dynaform();
|
||||||
@@ -748,7 +749,8 @@ class ProcessMap
|
|||||||
$oInputDocument = new InputDocument();
|
$oInputDocument = new InputDocument();
|
||||||
$aFields = $oInputDocument->getByUid($aRow['STEP_UID_OBJ']);
|
$aFields = $oInputDocument->getByUid($aRow['STEP_UID_OBJ']);
|
||||||
if ($aFields === false) {
|
if ($aFields === false) {
|
||||||
continue;
|
$shouldItContinue = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$sTitle = $aFields['INP_DOC_TITLE'];
|
$sTitle = $aFields['INP_DOC_TITLE'];
|
||||||
break;
|
break;
|
||||||
@@ -757,7 +759,8 @@ class ProcessMap
|
|||||||
$aFields = $oOutputDocument->getByUid($aRow['STEP_UID_OBJ']);
|
$aFields = $oOutputDocument->getByUid($aRow['STEP_UID_OBJ']);
|
||||||
|
|
||||||
if ($aFields === false) {
|
if ($aFields === false) {
|
||||||
continue;
|
$shouldItContinue = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$sTitle = $aFields['OUT_DOC_TITLE'];
|
$sTitle = $aFields['OUT_DOC_TITLE'];
|
||||||
break;
|
break;
|
||||||
@@ -777,6 +780,9 @@ class ProcessMap
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ($shouldItContinue === true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$aSteps[] = array('STEP_TITLE' => $sTitle, 'STEP_UID' => $aRow['STEP_UID'], 'STEP_TYPE_OBJ' => $aRow['STEP_TYPE_OBJ'], 'STEP_MODE' => $aRow['STEP_MODE'], 'STEP_CONDITION' => $aRow['STEP_CONDITION'], 'STEP_POSITION' => $aRow['STEP_POSITION'], 'urlEdit' => $urlEdit, 'linkEditValue' => $linkEditValue, 'PRO_UID' => $aRow['PRO_UID']
|
$aSteps[] = array('STEP_TITLE' => $sTitle, 'STEP_UID' => $aRow['STEP_UID'], 'STEP_TYPE_OBJ' => $aRow['STEP_TYPE_OBJ'], 'STEP_MODE' => $aRow['STEP_MODE'], 'STEP_CONDITION' => $aRow['STEP_CONDITION'], 'STEP_POSITION' => $aRow['STEP_POSITION'], 'urlEdit' => $urlEdit, 'linkEditValue' => $linkEditValue, 'PRO_UID' => $aRow['PRO_UID']
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
use ProcessMaker\Plugins\PluginRegistry;
|
use ProcessMaker\Plugins\PluginRegistry;
|
||||||
|
|
||||||
function __autoload($sClassName)
|
spl_autoload_register(function($sClassName) {
|
||||||
{
|
|
||||||
if (!empty(config("system.workspace"))) {
|
if (!empty(config("system.workspace"))) {
|
||||||
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
|
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
|
||||||
if (file_exists($sPath . $sClassName . '.php')) {
|
if (file_exists($sPath . $sClassName . '.php')) {
|
||||||
require_once $sPath . $sClassName . '.php';
|
require_once $sPath . $sClassName . '.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
if (!empty(config("system.workspace")) && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
|
if (!empty(config("system.workspace")) && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
|
||||||
Bootstrap::setConstantsRelatedWs(config("system.workspace"));
|
Bootstrap::setConstantsRelatedWs(config("system.workspace"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class Configuration extends BaseConfiguration
|
|||||||
public function exists($CfgUid, $ObjUid = "", $ProUid = "", $UsrUid = "", $AppUid = "")
|
public function exists($CfgUid, $ObjUid = "", $ProUid = "", $UsrUid = "", $AppUid = "")
|
||||||
{
|
{
|
||||||
$oRow = ConfigurationPeer::retrieveByPK( $CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid );
|
$oRow = ConfigurationPeer::retrieveByPK( $CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid );
|
||||||
return (( get_class ($oRow) == 'Configuration' )&&(!is_null($oRow)));
|
return (!is_null($oRow) && get_class($oRow) === 'Configuration');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAll ()
|
public function getAll ()
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ class Translation extends BaseTranslation
|
|||||||
}
|
}
|
||||||
|
|
||||||
$res['cacheFileMafe'] = $cacheFileMafe;
|
$res['cacheFileMafe'] = $cacheFileMafe;
|
||||||
$res['languague'] = count($cacheFileMafe);
|
$res['languague'] = (is_array($cacheFileMafe) || $cacheFileMafe instanceof Countable) ? count($cacheFileMafe) : 0;
|
||||||
$res['rowsMafeJS'] = count( $translation );
|
$res['rowsMafeJS'] = count( $translation );
|
||||||
return $res;
|
return $res;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -21674,8 +21674,8 @@ msgstr "Open SSL is optional"
|
|||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
||||||
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
#: LABEL/ID_PROCESSMAKER_REQUIREMENTS_PHP
|
||||||
msgid "PHP recommended version 7.1 or higher, PHP 7.2 is not yet supported"
|
msgid "PHP recommended version 7.3, we maintain compatibility starting with PHP 7.1"
|
||||||
msgstr "PHP recommended version 7.1 or higher, PHP 7.2 is not yet supported"
|
msgstr "PHP recommended version 7.3, we maintain compatibility starting with PHP 7.1"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_SOAP
|
# LABEL/ID_PROCESSMAKER_REQUIREMENTS_SOAP
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ include PATH_LANGUAGECONT . "translation." . SYS_LANG;
|
|||||||
|
|
||||||
class InstallerModule extends Controller
|
class InstallerModule extends Controller
|
||||||
{
|
{
|
||||||
const PHP_VERSION_MINIMUM_SUPPORTED = '7.1';
|
const PHP_VERSION_MINIMUM_SUPPORTED = "7.1";
|
||||||
const PHP_VERSION_NOT_SUPPORTED = '7.2';
|
const PHP_VERSION_NOT_SUPPORTED = "7.4";
|
||||||
public $path_config;
|
public $path_config;
|
||||||
public $path_languages;
|
public $path_languages;
|
||||||
public $path_plugins;
|
public $path_plugins;
|
||||||
|
|||||||
@@ -60488,7 +60488,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
|
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
|
||||||
|
|
||||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_OPENSSL_OPTIONAL','en','Open SSL is optional','2014-01-15') ,
|
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_OPENSSL_OPTIONAL','en','Open SSL is optional','2014-01-15') ,
|
||||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_PHP','en','PHP recommended version 7.1 or higher, PHP 7.2 is not yet supported','2018-06-13') ,
|
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_PHP','en','PHP recommended version 7.3, we maintain compatibility starting with PHP 7.1','2019-12-02') ,
|
||||||
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_SOAP','en','Soap Support','2014-01-15') ,
|
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_SOAP','en','Soap Support','2014-01-15') ,
|
||||||
( 'LABEL','ID_PROCESSMAKER_SLOGAN1','en','This Business Process is Powered By ProcessMaker','2014-01-15') ,
|
( 'LABEL','ID_PROCESSMAKER_SLOGAN1','en','This Business Process is Powered By ProcessMaker','2014-01-15') ,
|
||||||
( 'LABEL','ID_PROCESSMAKER_SUCCESS_INSTALLED','en','ProcessMaker was successfully installed<br/>Workspace <b>" {0} " </b> was installed correctly.','2014-01-15') ,
|
( 'LABEL','ID_PROCESSMAKER_SUCCESS_INSTALLED','en','ProcessMaker was successfully installed<br/>Workspace <b>" {0} " </b> was installed correctly.','2014-01-15') ,
|
||||||
|
|||||||
@@ -737,10 +737,12 @@ function sortContent()
|
|||||||
|
|
||||||
function openPMFolder()
|
function openPMFolder()
|
||||||
{
|
{
|
||||||
|
$oPMFolder = new AppFolder();
|
||||||
|
$rootFolder = "/";
|
||||||
$WIDTH_PANEL = 350;
|
$WIDTH_PANEL = 350;
|
||||||
$folderContent = $oPMFolder->getFolderList($_POST ['folderID'] != '0' ?
|
$folderContent = $oPMFolder->getFolderList($_POST ['folderID'] != '0' ?
|
||||||
$_POST ['folderID'] == 'NA' ? "" : $_POST ['folderID'] : $rootFolder);
|
$_POST ['folderID'] == 'NA' ? "" : $_POST ['folderID'] : $rootFolder);
|
||||||
//krumo($folderContent);
|
|
||||||
if (! is_array($folderContent)) {
|
if (! is_array($folderContent)) {
|
||||||
echo $folderContent;
|
echo $folderContent;
|
||||||
exit();
|
exit();
|
||||||
@@ -750,51 +752,49 @@ function openPMFolder()
|
|||||||
$tree->name = 'DMS';
|
$tree->name = 'DMS';
|
||||||
$tree->nodeType = "blank";
|
$tree->nodeType = "blank";
|
||||||
|
|
||||||
//$tree->width="350px";
|
|
||||||
$tree->value = '';
|
$tree->value = '';
|
||||||
$tree->showSign = false;
|
$tree->showSign = false;
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($folderContent as $key => $obj) {
|
foreach ($folderContent['folders'] as $key => $obj) {
|
||||||
$i ++;
|
$i ++;
|
||||||
//if ($obj->item_type=="F") {
|
|
||||||
|
|
||||||
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
||||||
$id_delete = G::LoadTranslation('ID_DELETE');
|
$id_delete = G::LoadTranslation('ID_DELETE');
|
||||||
$id_edit = G::LoadTranslation('ID_EDIT');
|
$id_edit = G::LoadTranslation('ID_EDIT');
|
||||||
|
|
||||||
$htmlGroup = <<<GHTML
|
$htmlGroup = "
|
||||||
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width="100%" class="pagedTable">
|
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width=\"100%\" class=\"pagedTable\">
|
||||||
<tr id="{$i}" onmouseout="setRowClass(this, '{$RowClass}')" onmouseover="setRowClass(this, 'RowPointer')"
|
<tr id=\"{$i}\" onmouseout=\"setRowClass(this, '{$RowClass}')\" onmouseover=\"setRowClass(this, 'RowPointer')\"
|
||||||
class="{$RowClass}" style="cursor:hand">
|
class=\"{$RowClass}\" style=\"cursor:hand\">
|
||||||
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href="#"
|
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href=\"#\"
|
||||||
onclick="focusRow(this, 'Selected');openPMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');">
|
onclick=\"focusRow(this, 'Selected');openPMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');\">
|
||||||
<img src="/images/folderV2.gif" border = "0" valign="middle" /> {$obj['FOLDER_NAME']}</a>
|
<img src=\"/images/folderV2.gif\" border = \"0\" valign=\"middle\" /> {$obj['FOLDER_NAME']}</a>
|
||||||
<a href="#" onclick="deletePMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');"> {$id_delete}</a>
|
<a href=\"#\" onclick=\"deletePMFolder('{$obj['FOLDER_UID']}','{$_POST['rootfolder']}');\"> {$id_delete}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div id="child_{$obj['FOLDER_UID']}"></div>
|
<div id=\"child_{$obj['FOLDER_UID']}\"></div>
|
||||||
GHTML;
|
";
|
||||||
|
|
||||||
$ch = $tree->addChild ($key, $htmlGroup, array ('nodeType' => 'child'));
|
$ch = $tree->addChild ($key, $htmlGroup, array ('nodeType' => 'child'));
|
||||||
$ch->point = ' ';
|
$ch->point = ' ';
|
||||||
}
|
}
|
||||||
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
$RowClass = ($i % 2 == 0) ? 'Row1' : 'Row2';
|
||||||
$key = 0;
|
$key = 0;
|
||||||
if ($_POST ['folderID'] == '0') {
|
if ($_POST ['folderID'] == '0') {
|
||||||
$notInFolderLabel = G::LoadTranslation ('ID_NOT_IN_FOLDER');
|
$notInFolderLabel = G::LoadTranslation ('ID_NOT_IN_FOLDER');
|
||||||
$htmlGroup = <<<GHTML
|
$htmlGroup = "
|
||||||
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width="100%" class="pagedTable">
|
<table cellspacing='0' cellpadding='0' border='1' style='border:0px;' width=\"100%\" class=\"pagedTable\">
|
||||||
<tr id="{$i}" onclick="focusRow(this, 'Selected');openPMFolder('NA');"
|
<tr id=\"{$i}\" onclick=\"focusRow(this, 'Selected');openPMFolder('NA');\"
|
||||||
onmouseout="setRowClass(this, '{$RowClass}')" onmouseover="setRowClass(this, 'RowPointer')" class="{$RowClass}">
|
onmouseout=\"setRowClass(this, '{$RowClass}')\" onmouseover=\"setRowClass(this, 'RowPointer')\" class=\"{$RowClass}\">
|
||||||
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href="#" onclick="">
|
<td width='' class='treeNode' style='border:0px;background-color:transparent;'><a href=\"#\" onclick=\"\">
|
||||||
<img src="/images/folderV2.gif" border = "0" valign="middle" /> - {$notInFolderLabel} -</a> </td>
|
<img src=\"/images/folderV2.gif\" border = \"0\" valign=\"middle\" /> - {$notInFolderLabel} -</a> </td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div id="child_NA"></div>
|
<div id=\"child_NA\"></div>
|
||||||
GHTML;
|
";
|
||||||
|
|
||||||
$ch = $tree->addChild($key, $htmlGroup, array('nodeType' => 'child'));
|
$ch = $tree->addChild($key, $htmlGroup, array('nodeType' => 'child'));
|
||||||
$ch->point = ' ';
|
$ch->point = ' ';
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ try {
|
|||||||
if (\BpmnProject::exists($_GET["pro_uid"]) && isset($_GET['objects'])) {
|
if (\BpmnProject::exists($_GET["pro_uid"]) && isset($_GET['objects'])) {
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
$_GET["objects"] = \G::json_decode($_GET['objects']);
|
$_GET["objects"] = \G::json_decode($_GET['objects']);
|
||||||
if (sizeof($_GET['objects']) == 0) {
|
if (empty($_GET['objects'])) {
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
|
||||||
$projectName = $exporter->getProjectName();
|
$projectName = $exporter->getProjectName();
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
|
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
@@ -301,7 +301,7 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
|
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|||||||
@@ -200,91 +200,83 @@ function newSkin ($baseSkin = 'classic')
|
|||||||
function importSkin ()
|
function importSkin ()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function($validator) {
|
ValidationUploadedFiles::getValidationUploadedFiles()->dispatch(function ($validator) {
|
||||||
throw new Exception($validator->getMessage());
|
throw new Exception($validator->getMessage());
|
||||||
});
|
});
|
||||||
if (! isset( $_FILES['uploadedFile'] )) {
|
if (!isset($_FILES['uploadedFile'])) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_FILE_REQUIRED' ) ));
|
throw (new Exception(G::LoadTranslation('ID_SKIN_FILE_REQUIRED')));
|
||||||
}
|
}
|
||||||
$uploadedInstances = count( $_FILES['uploadedFile']['name'] );
|
|
||||||
$sw_error = false;
|
|
||||||
$sw_error_exists = isset( $_FILES['uploadedFile']['error'] );
|
|
||||||
$emptyInstances = 0;
|
|
||||||
$quequeUpload = array ();
|
|
||||||
|
|
||||||
// upload files & check for errors
|
$sw_error_exists = isset($_FILES['uploadedFile']['error']);
|
||||||
|
|
||||||
|
// Upload files & check for errors
|
||||||
$tmp = $_FILES['uploadedFile']['tmp_name'];
|
$tmp = $_FILES['uploadedFile']['tmp_name'];
|
||||||
$items = stripslashes( $_FILES['uploadedFile']['name'] );
|
$items = stripslashes($_FILES['uploadedFile']['name']);
|
||||||
if ($sw_error_exists) {
|
if ($sw_error_exists) {
|
||||||
$up_err = $_FILES['uploadedFile']['error'];
|
$up_err = $_FILES['uploadedFile']['error'];
|
||||||
} else {
|
} else {
|
||||||
$up_err = (file_exists( $tmp ) ? 0 : 4);
|
$up_err = (file_exists($tmp) ? 0 : 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($items == "" || $up_err == 4) {
|
if ($items == "" || $up_err == 4) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_FILE_REQUIRED' ) ));
|
throw (new Exception(G::LoadTranslation('ID_SKIN_FILE_REQUIRED')));
|
||||||
}
|
}
|
||||||
if ($up_err == 1 || $up_err == 2) {
|
if ($up_err == 1 || $up_err == 2) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_FILE_TOO_BIG' ) ));
|
throw (new Exception(G::LoadTranslation('ID_FILE_TOO_BIG')));
|
||||||
//$errors[$i]='miscfilesize';
|
|
||||||
}
|
}
|
||||||
if ($up_err == 3) {
|
if ($up_err == 3) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR' ) ));
|
throw (new Exception(G::LoadTranslation('ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR')));
|
||||||
//$errors[$i]='miscfilepart';
|
|
||||||
}
|
}
|
||||||
if (! @is_uploaded_file( $tmp )) {
|
if (!@is_uploaded_file($tmp)) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR' ) ));
|
throw (new Exception(G::LoadTranslation('ID_ERROR_UPLOAD_FILE_CONTACT_ADMINISTRATOR')));
|
||||||
//$errors[$i]='uploadfile';
|
|
||||||
}
|
}
|
||||||
$fileInfo = pathinfo( $items );
|
$fileInfo = pathinfo($items);
|
||||||
$validType = array ('tar','gz'
|
$validType = ['tar', 'gz'];
|
||||||
);
|
|
||||||
|
|
||||||
if (! in_array( $fileInfo['extension'], $validType )) {
|
if (!in_array($fileInfo['extension'], $validType)) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_FILE_UPLOAD_INCORRECT_EXTENSION' ) ));
|
throw (new Exception(G::LoadTranslation('ID_FILE_UPLOAD_INCORRECT_EXTENSION')));
|
||||||
//$errors[$i]='wrongtype';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = $items;
|
$filename = $items;
|
||||||
$tempPath = PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP;
|
$tempPath = PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP;
|
||||||
G::verifyPath( $tempPath, true );
|
G::verifyPath($tempPath, true);
|
||||||
$tempName = $tmp;
|
$tempName = $tmp;
|
||||||
G::uploadFile( $tempName, $tempPath, $filename );
|
G::uploadFile($tempName, $tempPath, $filename);
|
||||||
|
|
||||||
$tar = new Archive_Tar( $tempPath . $filename );
|
$tar = new Archive_Tar($tempPath . $filename);
|
||||||
$aFiles = $tar->listContent();
|
$aFiles = $tar->listContent();
|
||||||
$swConfigFile = false;
|
$swConfigFile = false;
|
||||||
|
|
||||||
foreach ($aFiles as $key => $val) {
|
foreach ($aFiles as $key => $val) {
|
||||||
if (basename( $val['filename'] ) == 'config.xml') {
|
if (basename($val['filename']) == 'config.xml') {
|
||||||
$skinName = dirname( $val['filename'] );
|
$skinName = dirname($val['filename']);
|
||||||
$skinArray = explode( "/", $skinName );
|
$skinArray = explode("/", $skinName);
|
||||||
if (count( $skinArray ) == 1) {
|
if (count($skinArray) == 1) {
|
||||||
$swConfigFile = true;
|
$swConfigFile = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $swConfigFile) {
|
if (!$swConfigFile) {
|
||||||
@unlink( PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename );
|
@unlink(PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename);
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_CONFIGURATION_MISSING' ) ));
|
throw (new Exception(G::LoadTranslation('ID_SKIN_CONFIGURATION_MISSING')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_dir( PATH_CUSTOM_SKINS . $skinName )) {
|
if (is_dir(PATH_CUSTOM_SKINS . $skinName)) {
|
||||||
if ((isset( $_REQUEST['overwrite_files'] )) && ($_REQUEST['overwrite_files'] == 'on')) {
|
if ((isset($_REQUEST['overwrite_files'])) && ($_REQUEST['overwrite_files'] == 'on')) {
|
||||||
G::rm_dir( PATH_CUSTOM_SKINS . $skinName, false );
|
G::rm_dir(PATH_CUSTOM_SKINS . $skinName, false);
|
||||||
} else {
|
} else {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_ALREADY_EXISTS' ) ));
|
throw (new Exception(G::LoadTranslation('ID_SKIN_ALREADY_EXISTS')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$res = $tar->extract( PATH_CUSTOM_SKINS );
|
$res = $tar->extract(PATH_CUSTOM_SKINS);
|
||||||
if (! $res) {
|
if (!$res) {
|
||||||
throw (new Exception( G::LoadTranslation( 'ID_SKIN_ERROR_EXTRACTING' ) ));
|
throw (new Exception(G::LoadTranslation('ID_SKIN_ERROR_EXTRACTING')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$configFileOriginal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
$configFileOriginal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
||||||
$configFileFinal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
$configFileFinal = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
||||||
$xmlConfiguration = file_get_contents( $configFileOriginal );
|
$xmlConfiguration = file_get_contents($configFileOriginal);
|
||||||
|
|
||||||
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : config("system.workspace");
|
$workspace = ($_REQUEST['workspace'] == 'global') ? '' : config("system.workspace");
|
||||||
|
|
||||||
@@ -292,27 +284,27 @@ function importSkin ()
|
|||||||
$skinInformationArray = $xmlConfigurationObj->result["skinConfiguration"]["__CONTENT__"]["information"]["__CONTENT__"];
|
$skinInformationArray = $xmlConfigurationObj->result["skinConfiguration"]["__CONTENT__"]["information"]["__CONTENT__"];
|
||||||
|
|
||||||
if (isset($skinInformationArray["workspace"]["__VALUE__"])) {
|
if (isset($skinInformationArray["workspace"]["__VALUE__"])) {
|
||||||
$workspace = ($workspace != "" && !empty($skinInformationArray["workspace"]["__VALUE__"]))? $skinInformationArray["workspace"]["__VALUE__"] . "|" . $workspace : $workspace;
|
$workspace = ($workspace != "" && !empty($skinInformationArray["workspace"]["__VALUE__"])) ? $skinInformationArray["workspace"]["__VALUE__"] . "|" . $workspace : $workspace;
|
||||||
|
|
||||||
$xmlConfiguration = preg_replace("/(<workspace>)(.*)(<\/workspace>)/i", "<workspace>" . $workspace . "</workspace><!-- $2 -->", $xmlConfiguration);
|
$xmlConfiguration = preg_replace("/(<workspace>)(.*)(<\/workspace>)/i", "<workspace>" . $workspace . "</workspace><!-- $2 -->", $xmlConfiguration);
|
||||||
} else {
|
} else {
|
||||||
$xmlConfiguration = preg_replace("/(<name>)(.*)(<\/name>)/i", "<name>" . $skinName . "</name><!-- $2 -->\n<workspace>" . $workspace . "</workspace>", $xmlConfiguration);
|
$xmlConfiguration = preg_replace("/(<name>)(.*)(<\/name>)/i", "<name>" . $skinName . "</name><!-- $2 -->\n<workspace>" . $workspace . "</workspace>", $xmlConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents( $configFileFinal, $xmlConfiguration );
|
file_put_contents($configFileFinal, $xmlConfiguration);
|
||||||
|
|
||||||
//Delete Temporal
|
// Delete Temporal
|
||||||
@unlink( PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename );
|
@unlink(PATH_CUSTOM_SKINS . '.tmp' . PATH_SEP . $filename);
|
||||||
|
|
||||||
$response['success'] = true;
|
$response['success'] = true;
|
||||||
$response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESSFUL_IMPORTED' );
|
$response['message'] = G::LoadTranslation('ID_SKIN_SUCCESSFUL_IMPORTED');
|
||||||
G::auditLog("ImportSkin", "Skin Name: ".$skinName);
|
G::auditLog("ImportSkin", "Skin Name: " . $skinName);
|
||||||
G::outRes( G::json_encode( $response ) );
|
G::outRes(G::json_encode($response));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$response['success'] = false;
|
$response['success'] = false;
|
||||||
$response['message'] = $e->getMessage();
|
$response['message'] = $e->getMessage();
|
||||||
$response['error'] = $e->getMessage();
|
$response['error'] = $e->getMessage();
|
||||||
G::outRes( G::json_encode( $response ) );
|
G::outRes(G::json_encode($response));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
0
workflow/engine/plugins/.gitignore
vendored
Normal file
0
workflow/engine/plugins/.gitignore
vendored
Normal file
@@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
class chartsPlugin extends PMPlugin
|
|
||||||
{
|
|
||||||
public function chartsPlugin($sNamespace, $sFilename = null)
|
|
||||||
{
|
|
||||||
$res = parent::PMPlugin($sNamespace, $sFilename);
|
|
||||||
$this->sFriendlyName = 'Charts Plugin';
|
|
||||||
$this->sDescription = 'This plugin shows generic charts for ProcessMaker';
|
|
||||||
$this->sPluginFolder = 'charts';
|
|
||||||
$this->sSetupPage = 'setupPage';
|
|
||||||
$this->aWorkspaces = array( );
|
|
||||||
$this->iVersion = 0.45;
|
|
||||||
$this->bPrivate = true;
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setup()
|
|
||||||
{
|
|
||||||
$this->registerTrigger(10000, 'createCaseFolder');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function install()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$oPluginRegistry = PMPluginRegistry::getSingleton();
|
|
||||||
$oPluginRegistry->registerPlugin('charts', __FILE__);
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ( "classes/model/Application.php" );
|
|
||||||
require_once ( "classes/model/AppDelegation.php" );
|
|
||||||
require_once ( "classes/model/Process.php" );
|
|
||||||
|
|
||||||
class chartsClass extends PMPlugin {
|
|
||||||
|
|
||||||
function __construct ( ) {
|
|
||||||
}
|
|
||||||
|
|
||||||
function readConfig () {
|
|
||||||
$fileConf = PATH_PLUGINS . 'charts' . PATH_SEP . 'config' . PATH_SEP . 'setup.conf';
|
|
||||||
if ( !file_exists( dirname($fileConf) ) )
|
|
||||||
throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist." ) );
|
|
||||||
|
|
||||||
if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) )
|
|
||||||
throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) );
|
|
||||||
|
|
||||||
$content = file_get_contents ( $fileConf);
|
|
||||||
$fields = unserialize ($content);
|
|
||||||
return $fields;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getFieldsForPageSetup () {
|
|
||||||
$fileConf = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf';
|
|
||||||
if ( !file_exists( dirname($fileConf) ) )
|
|
||||||
throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist." ) );
|
|
||||||
|
|
||||||
if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) )
|
|
||||||
throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) );
|
|
||||||
|
|
||||||
if ( file_exists ( $fileConf ) ) {
|
|
||||||
$content = file_get_contents ( $fileConf);
|
|
||||||
$fields = unserialize ($content);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$fields = array();
|
|
||||||
return $fields;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateFieldsForPageSetup ( $oData) {
|
|
||||||
$content = serialize ($oData['form']);
|
|
||||||
$fileConf = PATH_PLUGINS . $this->sPluginFolder . PATH_SEP . 'config' . PATH_SEP . 'setup.conf';
|
|
||||||
if ( !is_writable( dirname($fileConf) ) )
|
|
||||||
throw ( new Exception ("The directory " . dirname($fileConf) . " doesn't exist or this directory is not writable." ) );
|
|
||||||
|
|
||||||
if ( file_exists ( $fileConf ) && !is_writable( $fileConf ) )
|
|
||||||
throw ( new Exception ("The file $fileConf doesn't exist or this file is not writable." ) );
|
|
||||||
|
|
||||||
file_put_contents ( $fileConf, $content);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setup() {
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDatasetCasesByStatus ( ) {
|
|
||||||
$dataSet = new XYDataSet();
|
|
||||||
|
|
||||||
$c = new Criteria('workflow');
|
|
||||||
$c->clearSelectColumns();
|
|
||||||
$c->addSelectColumn ( ApplicationPeer::APP_STATUS );
|
|
||||||
$c->addSelectColumn ( 'COUNT(*) AS CANT') ;
|
|
||||||
$c->addGroupByColumn(ApplicationPeer::APP_STATUS);
|
|
||||||
$rs = ApplicationPeer::doSelectRS( $c );
|
|
||||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
while ( is_array ( $row ) ) {
|
|
||||||
$label = $row['APP_STATUS'];
|
|
||||||
$value = $row['CANT'];
|
|
||||||
$dataSet->addPoint(new Point($label , (int)$value ) );
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
}
|
|
||||||
return $dataSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
//we are trying to obtain the process title thru the long way, using the process object.
|
|
||||||
//there is a short way, if you use a more complex query joining Content Table.
|
|
||||||
function getDatasetCasesByProcess ( ) {
|
|
||||||
$dataSet = new XYDataSet();
|
|
||||||
$processObj = new Process;
|
|
||||||
|
|
||||||
$c = new Criteria('workflow');
|
|
||||||
$c->clearSelectColumns();
|
|
||||||
$c->addSelectColumn ( ApplicationPeer::PRO_UID );
|
|
||||||
$c->addSelectColumn ( 'COUNT(*) AS CANT') ;
|
|
||||||
//$c->addJoin( ProcessPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
|
|
||||||
$c->addGroupByColumn(ApplicationPeer::PRO_UID);
|
|
||||||
$rs = ApplicationPeer::doSelectRS( $c );
|
|
||||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
while ( is_array ( $row ) ) {
|
|
||||||
$processObj->load ( $row['PRO_UID'] );
|
|
||||||
$label = $processObj->getProTitle();
|
|
||||||
$value = $row['CANT'];
|
|
||||||
$dataSet->addPoint(new Point($label , (int)$value) );
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
}
|
|
||||||
return $dataSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
a:1:{s:6:"ACCEPT";s:4:"Save";}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* dashboard.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
|
|
||||||
|
|
||||||
require_once ( "class.charts.php" );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
header("Content-type: image/png");
|
|
||||||
//type of chart, pie, vertical bar, horizontal, etc.
|
|
||||||
$type = isset ( $_GET['type']) ? $_GET['type'] : '1' ;
|
|
||||||
$chartType = isset ( $_GET['chart']) ? $_GET['chart'] : '1' ;
|
|
||||||
$user = isset ( $_GET['user']) ? $_GET['user'] : $_SESSION['USER_LOGGED'] ;
|
|
||||||
$chartsObj = new chartsClass();
|
|
||||||
|
|
||||||
//$chart = new PieChart(450,300);
|
|
||||||
switch ( $type ) {
|
|
||||||
case '1' :
|
|
||||||
$chart = new VerticalBarChart(430, 280); break;
|
|
||||||
case '2' :
|
|
||||||
$chart = new HorizontalBarChart(430, 200); break;
|
|
||||||
case '3' :
|
|
||||||
$chart = new LineChart(430, 280); break;
|
|
||||||
case '4' :
|
|
||||||
$chart = new PieChart(430, 200 ); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ( $chartType ) {
|
|
||||||
case '1' :
|
|
||||||
$dataSet = $chartsObj->getDatasetCasesByStatus(); break;
|
|
||||||
default :
|
|
||||||
$dataSet = $chartsObj->getDatasetCasesByProcess(); break;
|
|
||||||
}
|
|
||||||
$chart->setDataSet($dataSet);
|
|
||||||
$chart->setTitle( "Cases list" );
|
|
||||||
$chart->render();
|
|
||||||
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<dynaForm
|
|
||||||
name="About Charts Plugin"
|
|
||||||
type="xmlform"
|
|
||||||
width="550"
|
|
||||||
>
|
|
||||||
|
|
||||||
<TITLE type="title" >
|
|
||||||
<en>About charts Plugin</en>
|
|
||||||
</TITLE>
|
|
||||||
|
|
||||||
<sTITLE type="subtitle" >
|
|
||||||
<en>This is the Charts Plugin, with this plugin you can see many differents charts</en>
|
|
||||||
</sTITLE>
|
|
||||||
|
|
||||||
|
|
||||||
<ACCEPT type="submit" >
|
|
||||||
<en>Save</en>
|
|
||||||
</ACCEPT>
|
|
||||||
</dynaForm>
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* processTemplate.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
class processTemplatePlugin extends PMPlugin
|
|
||||||
{
|
|
||||||
public function processTemplatePlugin($sNamespace, $sFilename = null)
|
|
||||||
{
|
|
||||||
$res = parent::PMPlugin($sNamespace, $sFilename);
|
|
||||||
$this->sFriendlyName = 'Process Map Templates';
|
|
||||||
$this->sDescription = 'This plugin includes various templates for quick and easy Process Map creation. Users can customize Process Maps based on pre-defined templates of common process designs (including Parallel, Dual Start Task, and Selection).';
|
|
||||||
$this->sPluginFolder = 'processTemplate';
|
|
||||||
$this->sSetupPage = null;
|
|
||||||
$this->iVersion = 0.78;
|
|
||||||
$this->bPrivate = true;
|
|
||||||
$this->aWorkspaces = array( '__' );
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setup()
|
|
||||||
{
|
|
||||||
//$this->registerTrigger( PM_NEW_PROCESS_LIST, 'getNewProcessTemplateList' );
|
|
||||||
//$this->registerTrigger( PM_NEW_PROCESS_SAVE, 'saveNewProcess' );
|
|
||||||
//$this->registerTrigger( PM_NEW_DYNAFORM_LIST, 'getNewDynaformTemplateList' );
|
|
||||||
//$this->registerTrigger( PM_NEW_DYNAFORM_SAVE, 'saveNewDynaform' );
|
|
||||||
}
|
|
||||||
|
|
||||||
public function install()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public function enable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public function disable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$oPluginRegistry = PMPluginRegistry::getSingleton();
|
|
||||||
$oPluginRegistry->registerPlugin('processTemplate', __FILE__);
|
|
||||||
@@ -1,195 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* class.processTemplate.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
class processTemplateClass extends PMPlugin {
|
|
||||||
|
|
||||||
function __construct ( ) {
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNewProcessTemplateList ( $oData ) {
|
|
||||||
global $_DBArray;
|
|
||||||
$rows[] = array ( 'uid' => 'char', 'name' => 'char', );
|
|
||||||
$rows[] = array ( 'uid' => '', 'name' => 'blank process' );
|
|
||||||
$rows[] = array ( 'uid' => 1, 'name' => 'simple process, three tasks' );
|
|
||||||
$rows[] = array ( 'uid' => 2, 'name' => 'simple parallel process' );
|
|
||||||
$rows[] = array ( 'uid' => 3, 'name' => 'conditional process' );
|
|
||||||
$rows[] = array ( 'uid' => 4, 'name' => 'double starting task' );
|
|
||||||
$rows[] = array ( 'uid' => 5, 'name' => 'advanced parallel process' );
|
|
||||||
|
|
||||||
$_DBArray['ProcessesNew'] = $rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
function saveNewProcess ( $oData ) {
|
|
||||||
|
|
||||||
switch ($oData['PRO_TEMPLATE']) {
|
|
||||||
case 1 : $this->simpleProcess ( $oData);
|
|
||||||
break;
|
|
||||||
case 2 : $this->simpleParallel ( $oData);
|
|
||||||
break;
|
|
||||||
case 3 : $this->conditional ( $oData);
|
|
||||||
break;
|
|
||||||
case 4 : $this->doubleStart ( $oData);
|
|
||||||
break;
|
|
||||||
case 5 : $this->fullParallel ( $oData);
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function simpleProcess ($oData ) {
|
|
||||||
//$oJSON = new Services_JSON();
|
|
||||||
$sProUid = $oData['PRO_UID'];
|
|
||||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
|
||||||
$oProcessMap = $oData['PROCESSMAP'];
|
|
||||||
|
|
||||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
|
||||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 160) );
|
|
||||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 250) );
|
|
||||||
$task1 = $t1->uid;
|
|
||||||
$task2 = $t2->uid;
|
|
||||||
$task3 = $t3->uid;
|
|
||||||
|
|
||||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task1);
|
|
||||||
$oTask = new Task();
|
|
||||||
$oTask->update($aData);
|
|
||||||
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task2, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task2, $task3, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task3, -1, 'SEQUENTIAL' );
|
|
||||||
}
|
|
||||||
|
|
||||||
function simpleParallel ($oData ) {
|
|
||||||
//$oJSON = new Services_JSON();
|
|
||||||
$sProUid = $oData['PRO_UID'];
|
|
||||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
|
||||||
$oProcessMap = $oData['PROCESSMAP'];
|
|
||||||
|
|
||||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
|
||||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 160) );
|
|
||||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 400, 160) );
|
|
||||||
$t5 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 250) );
|
|
||||||
|
|
||||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$t1->uid);
|
|
||||||
$oTask = new Task();
|
|
||||||
$oTask->update($aData);
|
|
||||||
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t2->uid, 'PARALLEL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t3->uid, 'PARALLEL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t2->uid, $t5->uid, 'SEC-JOIN' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t3->uid, $t5->uid, 'SEC-JOIN' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t5->uid, -1, 'SEQUENTIAL' );
|
|
||||||
}
|
|
||||||
|
|
||||||
function fullParallel ($oData ) {
|
|
||||||
//$oJSON = new Services_JSON();
|
|
||||||
$sProUid = $oData['PRO_UID'];
|
|
||||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
|
||||||
$oProcessMap = $oData['PROCESSMAP'];
|
|
||||||
|
|
||||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
|
||||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 100, 160) );
|
|
||||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 160) );
|
|
||||||
$t4 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 500, 160) );
|
|
||||||
$t5 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 250) );
|
|
||||||
$t6 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 500, 250) );
|
|
||||||
$t7 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 350, 340) );
|
|
||||||
|
|
||||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$t1->uid);
|
|
||||||
$oTask = new Task();
|
|
||||||
$oTask->update($aData);
|
|
||||||
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t2->uid, 'PARALLEL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t3->uid, 'PARALLEL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t1->uid, $t4->uid, 'PARALLEL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t2->uid, $t5->uid, 'SEC-JOIN' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t3->uid, $t5->uid, 'SEC-JOIN' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t4->uid, $t6->uid, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t5->uid, $t7->uid, 'SEC-JOIN' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t6->uid, $t7->uid, 'SEC-JOIN' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $t7->uid, -1, 'SEQUENTIAL' );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function conditional ($oData ) {
|
|
||||||
//$oJSON = new Services_JSON();
|
|
||||||
$sProUid = $oData['PRO_UID'];
|
|
||||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
|
||||||
$oProcessMap = $oData['PROCESSMAP'];
|
|
||||||
|
|
||||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 70) );
|
|
||||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 160) );
|
|
||||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 400, 160) );
|
|
||||||
$t4 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 250) );
|
|
||||||
$task1 = $t1->uid;
|
|
||||||
$task2 = $t2->uid;
|
|
||||||
$task3 = $t3->uid;
|
|
||||||
$task4 = $t4->uid;
|
|
||||||
|
|
||||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task1);
|
|
||||||
$oTask = new Task();
|
|
||||||
$oTask->update($aData);
|
|
||||||
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task2, 'SELECT' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task3, 'SELECT' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task2, $task4, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task3, $task4, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task4, -1, 'SEQUENTIAL' );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function doubleStart ($oData ) {
|
|
||||||
//$oJSON = new Services_JSON();
|
|
||||||
$sProUid = $oData['PRO_UID'];
|
|
||||||
$sTemplate = $oData['PRO_TEMPLATE'];
|
|
||||||
$oProcessMap = $oData['PROCESSMAP'];
|
|
||||||
|
|
||||||
$t1 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 200, 70) );
|
|
||||||
$t2 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 400, 70) );
|
|
||||||
$t3 = Bootstrap::json_decode( $oProcessMap->addTask( $sProUid, 300, 160) );
|
|
||||||
$task1 = $t1->uid;
|
|
||||||
$task2 = $t2->uid;
|
|
||||||
$task3 = $t3->uid;
|
|
||||||
|
|
||||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task1);
|
|
||||||
$oTask = new Task();
|
|
||||||
$oTask->update($aData);
|
|
||||||
|
|
||||||
$aData = array("TAS_START"=>"TRUE","TAS_UID"=>$task2);
|
|
||||||
$oTask = new Task();
|
|
||||||
$oTask->update($aData);
|
|
||||||
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task1, $task3, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task2, $task3, 'SEQUENTIAL' );
|
|
||||||
$oProcessMap->saveNewPattern($sProUid, $task3, -1, 'SEQUENTIAL' );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function setup()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1733,7 +1733,7 @@ class Cases
|
|||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function __getFieldsAndValuesByDynaFormAndAppData(array $form, array $appData, array $caseVariable)
|
private function getFieldsAndValuesByDynaFormAndAppData(array $form, array $appData, array $caseVariable)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
foreach ($form['items'] as $value) {
|
foreach ($form['items'] as $value) {
|
||||||
@@ -1754,7 +1754,7 @@ class Cases
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$caseVariableAux = $this->__getFieldsAndValuesByDynaFormAndAppData($field, $appData,
|
$caseVariableAux = $this->getFieldsAndValuesByDynaFormAndAppData($field, $appData,
|
||||||
$caseVariable);
|
$caseVariable);
|
||||||
$caseVariable = array_merge($caseVariable, $caseVariableAux);
|
$caseVariable = array_merge($caseVariable, $caseVariableAux);
|
||||||
}
|
}
|
||||||
@@ -1827,7 +1827,7 @@ class Cases
|
|||||||
|
|
||||||
$arrayAppData = $fields['APP_DATA'];
|
$arrayAppData = $fields['APP_DATA'];
|
||||||
|
|
||||||
$arrayCaseVariable = $this->__getFieldsAndValuesByDynaFormAndAppData(
|
$arrayCaseVariable = $this->getFieldsAndValuesByDynaFormAndAppData(
|
||||||
$arrayDynContent['items'][0], $arrayAppData, $arrayCaseVariable
|
$arrayDynContent['items'][0], $arrayAppData, $arrayCaseVariable
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -2406,7 +2406,7 @@ class Cases
|
|||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function __getStatusInfoDataByRsCriteria($rsCriteria)
|
private function getStatusInfoDataByRsCriteria($rsCriteria)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$arrayData = [];
|
$arrayData = [];
|
||||||
@@ -2489,7 +2489,7 @@ class Cases
|
|||||||
$rsCriteria = AppDelayPeer::doSelectRS($criteria);
|
$rsCriteria = AppDelayPeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria);
|
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria);
|
||||||
|
|
||||||
if (!empty($arrayData)) {
|
if (!empty($arrayData)) {
|
||||||
return $arrayData;
|
return $arrayData;
|
||||||
@@ -2522,7 +2522,7 @@ class Cases
|
|||||||
$rsCriteria = AppCacheViewPeer::doSelectRS($criteria);
|
$rsCriteria = AppCacheViewPeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria);
|
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria);
|
||||||
|
|
||||||
if (!empty($arrayData)) {
|
if (!empty($arrayData)) {
|
||||||
return $arrayData;
|
return $arrayData;
|
||||||
@@ -2565,7 +2565,7 @@ class Cases
|
|||||||
$rsCriteria = ApplicationPeer::doSelectRS($criteria);
|
$rsCriteria = ApplicationPeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria);
|
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria);
|
||||||
|
|
||||||
if (!empty($arrayData)) {
|
if (!empty($arrayData)) {
|
||||||
return $arrayData;
|
return $arrayData;
|
||||||
@@ -2605,7 +2605,7 @@ class Cases
|
|||||||
$rsCriteria2 = ApplicationPeer::doSelectRS($criteria2);
|
$rsCriteria2 = ApplicationPeer::doSelectRS($criteria2);
|
||||||
$rsCriteria2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$arrayData = $this->__getStatusInfoDataByRsCriteria($rsCriteria2);
|
$arrayData = $this->getStatusInfoDataByRsCriteria($rsCriteria2);
|
||||||
|
|
||||||
if (!empty($arrayData)) {
|
if (!empty($arrayData)) {
|
||||||
return $arrayData;
|
return $arrayData;
|
||||||
@@ -3152,7 +3152,7 @@ class Cases
|
|||||||
*
|
*
|
||||||
* @return array Returns array with Case data updated
|
* @return array Returns array with Case data updated
|
||||||
*/
|
*/
|
||||||
private function __applicationDataDeleteMultipleFile(
|
private function applicationDataDeleteMultipleFile(
|
||||||
array $arrayApplicationData,
|
array $arrayApplicationData,
|
||||||
$variable1,
|
$variable1,
|
||||||
$variable2,
|
$variable2,
|
||||||
@@ -3198,7 +3198,7 @@ class Cases
|
|||||||
case 'GRID':
|
case 'GRID':
|
||||||
foreach ($arrayApplicationData[$variable1] as $key => $value) {
|
foreach ($arrayApplicationData[$variable1] as $key => $value) {
|
||||||
if (array_key_exists($variable2, $value)) {
|
if (array_key_exists($variable2, $value)) {
|
||||||
$arrayApplicationData[$variable1][$key] = $this->__applicationDataDeleteMultipleFile(
|
$arrayApplicationData[$variable1][$key] = $this->applicationDataDeleteMultipleFile(
|
||||||
$value, $variable2, null, 'NORMAL', $arrayDocumentToDelete
|
$value, $variable2, null, 'NORMAL', $arrayDocumentToDelete
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3254,7 +3254,7 @@ class Cases
|
|||||||
foreach ($arrayDocumentDelete as $value2) {
|
foreach ($arrayDocumentDelete as $value2) {
|
||||||
$appDocument->remove($value2['appDocUid'], (int)($value2['version']));
|
$appDocument->remove($value2['appDocUid'], (int)($value2['version']));
|
||||||
|
|
||||||
$arrayApplicationData['APP_DATA'] = $this->__applicationDataDeleteMultipleFile(
|
$arrayApplicationData['APP_DATA'] = $this->applicationDataDeleteMultipleFile(
|
||||||
$arrayApplicationData['APP_DATA'], $variable, null, $type, $value2
|
$arrayApplicationData['APP_DATA'], $variable, null, $type, $value2
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -3272,7 +3272,7 @@ class Cases
|
|||||||
foreach ($arrayDocumentDelete as $value4) {
|
foreach ($arrayDocumentDelete as $value4) {
|
||||||
$appDocument->remove($value4['appDocUid'], (int)($value4['version']));
|
$appDocument->remove($value4['appDocUid'], (int)($value4['version']));
|
||||||
|
|
||||||
$arrayApplicationData['APP_DATA'] = $this->__applicationDataDeleteMultipleFile(
|
$arrayApplicationData['APP_DATA'] = $this->applicationDataDeleteMultipleFile(
|
||||||
$arrayApplicationData['APP_DATA'], $grid, $variable, $type, $value4
|
$arrayApplicationData['APP_DATA'], $grid, $variable, $type, $value4
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class Variable extends Attribute
|
|||||||
* @return mixed Returns array with Application, AppDelegation and Variable record,
|
* @return mixed Returns array with Application, AppDelegation and Variable record,
|
||||||
* ThrowTheException/FALSE otherwise
|
* ThrowTheException/FALSE otherwise
|
||||||
*/
|
*/
|
||||||
private function __getApplicationAppDelegationAndVariableRecordByData(
|
private function getApplicationAppDelegationAndVariableRecordByData(
|
||||||
$applicationUid,
|
$applicationUid,
|
||||||
$delIndex,
|
$delIndex,
|
||||||
$variableName,
|
$variableName,
|
||||||
@@ -144,7 +144,7 @@ class Variable extends Attribute
|
|||||||
*
|
*
|
||||||
* @return array Returns an array with Fields of a Grid
|
* @return array Returns an array with Fields of a Grid
|
||||||
*/
|
*/
|
||||||
private function __getGridFieldDefinitions($projectUid, $gridName)
|
private function getGridFieldDefinitions($projectUid, $gridName)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$arrayGridField = [];
|
$arrayGridField = [];
|
||||||
@@ -202,7 +202,7 @@ class Variable extends Attribute
|
|||||||
*
|
*
|
||||||
* @return bool Returns TRUE when array data is valid, ThrowTheException/FALSE otherwise
|
* @return bool Returns TRUE when array data is valid, ThrowTheException/FALSE otherwise
|
||||||
*/
|
*/
|
||||||
private function __validateData(array $arrayData, array $arrayVariableData, $throwException = true)
|
private function validateData(array $arrayData, array $arrayVariableData, $throwException = true)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (empty($arrayData)) {
|
if (empty($arrayData)) {
|
||||||
@@ -303,7 +303,7 @@ class Variable extends Attribute
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Verify data and Set variables
|
//Verify data and Set variables
|
||||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||||
$applicationUid, $delIndex, $variableName, $throwException
|
$applicationUid, $delIndex, $variableName, $throwException
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -329,12 +329,12 @@ class Variable extends Attribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($arrayVariableData['VAR_FIELD_TYPE'] == 'grid') {
|
if ($arrayVariableData['VAR_FIELD_TYPE'] == 'grid') {
|
||||||
$arrayVariableData['arrayGridField'] = $this->__getGridFieldDefinitions(
|
$arrayVariableData['arrayGridField'] = $this->getGridFieldDefinitions(
|
||||||
$arrayVariableData['PRJ_UID'], $arrayVariableData['VAR_NAME']
|
$arrayVariableData['PRJ_UID'], $arrayVariableData['VAR_NAME']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->__validateData($arrayData, $arrayVariableData, $throwException);
|
$result = $this->validateData($arrayData, $arrayVariableData, $throwException);
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
return false;
|
return false;
|
||||||
@@ -396,7 +396,7 @@ class Variable extends Attribute
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Verify data and Set variables
|
//Verify data and Set variables
|
||||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||||
$applicationUid, $delIndex, $variableName, $throwException
|
$applicationUid, $delIndex, $variableName, $throwException
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -420,12 +420,12 @@ class Variable extends Attribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($arrayVariableData['VAR_FIELD_TYPE'] == 'grid') {
|
if ($arrayVariableData['VAR_FIELD_TYPE'] == 'grid') {
|
||||||
$arrayVariableData['arrayGridField'] = $this->__getGridFieldDefinitions(
|
$arrayVariableData['arrayGridField'] = $this->getGridFieldDefinitions(
|
||||||
$arrayVariableData['PRJ_UID'], $arrayVariableData['VAR_NAME']
|
$arrayVariableData['PRJ_UID'], $arrayVariableData['VAR_NAME']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->__validateData($arrayData, $arrayVariableData, $throwException);
|
$result = $this->validateData($arrayData, $arrayVariableData, $throwException);
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
return false;
|
return false;
|
||||||
@@ -490,7 +490,7 @@ class Variable extends Attribute
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Verify data and Set variables
|
//Verify data and Set variables
|
||||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||||
$applicationUid, $delIndex, $variableName, $throwException
|
$applicationUid, $delIndex, $variableName, $throwException
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -605,7 +605,7 @@ class Variable extends Attribute
|
|||||||
$arrayVariable = [];
|
$arrayVariable = [];
|
||||||
|
|
||||||
//Verify data and Set variables
|
//Verify data and Set variables
|
||||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||||
$applicationUid, $delIndex, $variableName, $throwException
|
$applicationUid, $delIndex, $variableName, $throwException
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -696,7 +696,7 @@ class Variable extends Attribute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->__getApplicationAppDelegationAndVariableRecordByData(
|
$result = $this->getApplicationAppDelegationAndVariableRecordByData(
|
||||||
$applicationUid, $delIndex, $variableName, $throwException
|
$applicationUid, $delIndex, $variableName, $throwException
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ class Department
|
|||||||
* @param array $record Record
|
* @param array $record Record
|
||||||
* @return array Return an array with custom record
|
* @return array Return an array with custom record
|
||||||
*/
|
*/
|
||||||
private function __getUserCustomRecordFromRecord(array $record)
|
private function getUserCustomRecordFromRecord(array $record)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$recordc = [
|
$recordc = [
|
||||||
@@ -414,7 +414,7 @@ class Department
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arrayUser[] = ($flagRecord)? $record : $this->__getUserCustomRecordFromRecord($record);
|
$arrayUser[] = ($flagRecord)? $record : $this->getUserCustomRecordFromRecord($record);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class ReportTable
|
|||||||
*
|
*
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
private function __getDefaultColumns($type = 'NORMAL')
|
private function getDefaultColumns($type = 'NORMAL')
|
||||||
{
|
{
|
||||||
$defaultColumns = [];
|
$defaultColumns = [];
|
||||||
$application = new \stdClass(); //APPLICATION KEY
|
$application = new \stdClass(); //APPLICATION KEY
|
||||||
@@ -97,7 +97,7 @@ class ReportTable
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function __populateData(array $arrayTableData, array $tableNameMap)
|
private function populateData(array $arrayTableData, array $tableNameMap)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$errors = '';
|
$errors = '';
|
||||||
@@ -408,7 +408,7 @@ class ReportTable
|
|||||||
//New report table
|
//New report table
|
||||||
if ($flagIsReportTable && $flagAlterTable) {
|
if ($flagIsReportTable && $flagAlterTable) {
|
||||||
//Setting default columns
|
//Setting default columns
|
||||||
$defaultColumns = $this->__getDefaultColumns($arrayData['REP_TAB_TYPE']);
|
$defaultColumns = $this->getDefaultColumns($arrayData['REP_TAB_TYPE']);
|
||||||
$columns = array_merge($defaultColumns, $columns);
|
$columns = array_merge($defaultColumns, $columns);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,7 +839,7 @@ class ReportTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($tableNameMap)) {
|
if (!empty($tableNameMap)) {
|
||||||
$errors = $this->__populateData($arrayTableData, $tableNameMap);
|
$errors = $this->populateData($arrayTableData, $tableNameMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
|
|||||||
@@ -640,7 +640,7 @@ class User
|
|||||||
* @return array Return an array with custom record
|
* @return array Return an array with custom record
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function __getUserCustomRecordFromRecord(array $record)
|
private function getUserCustomRecordFromRecord(array $record)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Get Calendar
|
//Get Calendar
|
||||||
@@ -1084,7 +1084,7 @@ class User
|
|||||||
$row = $rsCriteria->getRow();
|
$row = $rsCriteria->getRow();
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
return (!$flagGetRecord) ? $this->__getUserCustomRecordFromRecord($row) : $row;
|
return (!$flagGetRecord) ? $this->getUserCustomRecordFromRecord($row) : $row;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
@@ -1494,7 +1494,7 @@ class User
|
|||||||
while ($rsCriteria->next()) {
|
while ($rsCriteria->next()) {
|
||||||
$record = $rsCriteria->getRow();
|
$record = $rsCriteria->getRow();
|
||||||
|
|
||||||
$arrayUser[] = ($flagRecord) ? $record : $this->__getUserCustomRecordFromRecord($record);
|
$arrayUser[] = ($flagRecord) ? $record : $this->getUserCustomRecordFromRecord($record);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
|
|||||||
@@ -1502,6 +1502,7 @@ class PluginRegistry
|
|||||||
return $oMenuFromPlugin[$strMenuName];
|
return $oMenuFromPlugin[$strMenuName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -87,9 +87,9 @@ class WorkflowBpmn extends Project\Workflow
|
|||||||
return parent::getList($start, $limit, $filter, $changeCaseTo);
|
return parent::getList($start, $limit, $filter, $changeCaseTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove()
|
public function remove($flagRemoveCases = true, $onlyDiagram = false)
|
||||||
{
|
{
|
||||||
parent::remove();
|
parent::remove($flagRemoveCases, $onlyDiagram);
|
||||||
$this->bp->remove();
|
$this->bp->remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace ProcessMaker\Services\OAuth2;
|
||||||
|
|
||||||
|
use OAuth2\Server;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extended class where the properties are correctly initialized, compatibility with PHP 7.3.x
|
||||||
|
*/
|
||||||
|
class OAuth2Server extends Server
|
||||||
|
{
|
||||||
|
protected $responseTypes = [];
|
||||||
|
}
|
||||||
@@ -53,7 +53,7 @@ class Server implements iAuthenticate
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pass a storage object or array of storage objects to the OAuth2 server class
|
// Pass a storage object or array of storage objects to the OAuth2 server class
|
||||||
$this->server = new \OAuth2\Server($this->storage, array('allow_implicit' => true, 'access_lifetime' => 86400));
|
$this->server = new OAuth2Server($this->storage, array('allow_implicit' => true, 'access_lifetime' => 86400));
|
||||||
|
|
||||||
$this->server->setConfig('enforce_state', false);
|
$this->server->setConfig('enforce_state', false);
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,11 @@ require_once __DIR__ . '/../../bootstrap/app.php';
|
|||||||
AppEvent::getAppEvent();
|
AppEvent::getAppEvent();
|
||||||
|
|
||||||
register_shutdown_function(
|
register_shutdown_function(
|
||||||
create_function(
|
function () {
|
||||||
"",
|
if (class_exists('Propel')) {
|
||||||
"
|
|
||||||
if (class_exists(\"Propel\")) {
|
|
||||||
Propel::close();
|
Propel::close();
|
||||||
}
|
}
|
||||||
"
|
}
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
ini_set("session.cookie_httponly", 1);
|
ini_set("session.cookie_httponly", 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user