From fbcd027b0023a44008f59fd7e483d1f2e7f096bd Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Fri, 17 Jul 2015 10:09:54 -0400 Subject: [PATCH 01/12] PM-3004 "TNS: Si configuras una coneccion a BD..." SOLVED > Code Isuue: New BPMN>Designer>Database Connection> TNS: Si configuras una coneccion a BD con TNS de oracle la misma se cambia a normal > Solution: Cuando se realiza conexion a base de datos oracle de tipo Normal al editar se mostrara tal como se la configuro y cuando es tipo TNS de la misma manera se mostrar tal como se la configuro. --- .../BusinessModel/DataBaseConnection.php | 192 +++++++++++++----- .../Api/Project/DataBaseConnection.php | 6 - 2 files changed, 136 insertions(+), 62 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/DataBaseConnection.php b/workflow/engine/src/ProcessMaker/BusinessModel/DataBaseConnection.php index 68354446c..6f71762eb 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/DataBaseConnection.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/DataBaseConnection.php @@ -31,6 +31,12 @@ class DataBaseConnection while ($row = $rs->getRow()) { $row = array_change_key_case($row, CASE_LOWER); $dataDb = $this->getDataBaseConnection($pro_uid, $row['dbs_uid'], false); + + if($dataDb["dbs_type"] == "oracle" && $dataDb["dbs_connection_type"] == "TNS") { + $dataDb["dbs_server"] = "[" . $dataDb["dbs_tns"] . "]"; + $dataDb["dbs_database_name"] = "[" . $dataDb["dbs_tns"] . "]"; + } + $dbConnecions[] = array_change_key_case($dataDb, CASE_LOWER); $rs->next(); } @@ -96,6 +102,8 @@ class DataBaseConnection $oContent = new \Content(); $dataDBConnection = array_change_key_case($dataDBConnection, CASE_UPPER); + $flagTns = ($dataDBConnection["DBS_TYPE"] == "oracle" && $dataDBConnection["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0; + $dataDBConnection['PRO_UID'] = $pro_uid; if (isset($dataDBConnection['DBS_TYPE'])) { @@ -109,17 +117,23 @@ class DataBaseConnection } } - if (isset($dataDBConnection['DBS_SERVER']) && $dataDBConnection['DBS_SERVER'] == '') { + if (isset($dataDBConnection["DBS_SERVER"]) && $dataDBConnection["DBS_SERVER"] == "" && $flagTns == 0) { throw (new \Exception(\G::LoadTranslation("ID_DBC_SERVER_INVALID", array($dataDBConnection['DBS_SERVER'])))); } - if (isset($dataDBConnection['DBS_DATABASE_NAME']) && $dataDBConnection['DBS_DATABASE_NAME'] == '') { + if (isset($dataDBConnection["DBS_DATABASE_NAME"]) && $dataDBConnection["DBS_DATABASE_NAME"] == "" && $flagTns == 0) { throw (new \Exception(\G::LoadTranslation("ID_DBC_DBNAME_INVALID", array($dataDBConnection['DBS_DATABASE_NAME'])))); } if (isset($dataDBConnection['DBS_PORT']) && ($dataDBConnection['DBS_PORT'] == ''|| $dataDBConnection['DBS_PORT'] == 0)) { - throw (new \Exception(\G::LoadTranslation("ID_DBC_PORT_INVALID", array($dataDBConnection['DBS_PORT'])))); + if ($flagTns == 0) { + throw (new \Exception(\G::LoadTranslation("ID_DBC_PORT_INVALID", array($dataDBConnection["DBS_PORT"])))); + } + } + + if (isset($dataDBConnection["DBS_TNS"]) && $dataDBConnection["DBS_TNS"] == "" && $flagTns == 1) { + throw (new \Exception(\G::LoadTranslation("ID_DBC_TNS_NOT_EXIST", array($dataDBConnection["DBS_TNS"])))); } if (isset($dataDBConnection['DBS_ENCODE'])) { @@ -140,11 +154,25 @@ class DataBaseConnection if ($dataDBConnection['DBS_PASSWORD'] == 'none') { $dataDBConnection['DBS_PASSWORD'] = ''; } else { - $pass = G::encrypt( $dataDBConnection['DBS_PASSWORD'], $dataDBConnection['DBS_DATABASE_NAME']) . "_2NnV3ujj3w"; + if ($flagTns == 0) { + $pass = \G::encrypt( $dataDBConnection["DBS_PASSWORD"], $dataDBConnection["DBS_DATABASE_NAME"]) . "_2NnV3ujj3w"; + } else { + $pass = \G::encrypt($dataDBConnection["DBS_PASSWORD"], $dataDBConnection["DBS_TNS"]) . "_2NnV3ujj3w"; + } + $dataDBConnection['DBS_PASSWORD'] = $pass; } } + if ($flagTns == 0) { + $dataDBConnection["DBS_CONNECTION_TYPE"] = "NORMAL"; + $dataDBConnection["DBS_TNS"] = ""; + } else { + $dataDBConnection["DBS_SERVER"] = ""; + $dataDBConnection["DBS_DATABASE_NAME"] = ""; + $dataDBConnection["DBS_PORT"] = 0; + } + if ($create) { unset($dataDBConnection['DBS_UID']); // TEST CONNECTION @@ -216,42 +244,54 @@ class DataBaseConnection $dataCon = array_change_key_case($dataCon, CASE_UPPER); + $flagTns = ($dataCon["DBS_TYPE"] == "oracle" && $dataCon["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0; + G::LoadClass( 'net' ); - $Server = new \NET($dataCon['DBS_SERVER']); - // STEP 1 : Resolving Host Name - $respTest['0'] = array(); - $respTest['0']['test'] = 'Resolving Host Name ' . $dataCon['DBS_SERVER']; - if ($Server->getErrno() != 0) { - if ($returnArray) { - $respTest['0']['error'] = "Error Testing Connection: Resolving Host Name FAILED : " . $Server->error; - } else { - $resp['message'] = "Error Testing Connection: Resolving Host Name FAILED : " . $Server->error; - return $resp; + if ($flagTns == 0) { + $Server = new \NET($dataCon['DBS_SERVER']); + + // STEP 1 : Resolving Host Name + $respTest['0'] = array(); + $respTest['0']['test'] = 'Resolving Host Name ' . $dataCon['DBS_SERVER']; + if ($Server->getErrno() != 0) { + if ($returnArray) { + $respTest['0']['error'] = "Error Testing Connection: Resolving Host Name FAILED : " . $Server->error; + } else { + $resp['message'] = "Error Testing Connection: Resolving Host Name FAILED : " . $Server->error; + return $resp; + } } - } - // STEP 2 : Checking port - $respTest['1'] = array(); - $respTest['1']['test'] = 'Checking port ' . $dataCon['DBS_PORT']; - $Server->scannPort($dataCon['DBS_PORT']); - if ($Server->getErrno() != 0) { - if ($returnArray) { - $respTest['1']['error'] = "Error Testing Connection: Checking port FAILED : " . $Server->error; - } else { - $resp['message'] = "Error Testing Connection: Checking port FAILED : " . $Server->error; - return $resp; + // STEP 2 : Checking port + $respTest['1'] = array(); + $respTest['1']['test'] = 'Checking port ' . $dataCon['DBS_PORT']; + $Server->scannPort($dataCon['DBS_PORT']); + if ($Server->getErrno() != 0) { + if ($returnArray) { + $respTest['1']['error'] = "Error Testing Connection: Checking port FAILED : " . $Server->error; + } else { + $resp['message'] = "Error Testing Connection: Checking port FAILED : " . $Server->error; + return $resp; + } } - } - // STEP 3 : Trying to connect to host - $respTest['2'] = array(); - $respTest['2']['test'] = 'Connecting to host ' . $dataCon['DBS_SERVER'] . (($dataCon['DBS_PORT'] != '') ? ':'.$dataCon['DBS_PORT'] : ''); - $Server->loginDbServer($dataCon['DBS_USERNAME'], $dataCon['DBS_PASSWORD']); - $Server->setDataBase($dataCon['DBS_DATABASE_NAME'], $dataCon['DBS_PORT']); - if ($Server->errno == 0) { - $response = $Server->tryConnectServer($dataCon['DBS_TYPE']); - if ($response->status != 'SUCCESS') { + // STEP 3 : Trying to connect to host + $respTest['2'] = array(); + $respTest['2']['test'] = 'Connecting to host ' . $dataCon['DBS_SERVER'] . (($dataCon['DBS_PORT'] != '') ? ':'.$dataCon['DBS_PORT'] : ''); + $Server->loginDbServer($dataCon['DBS_USERNAME'], $dataCon['DBS_PASSWORD']); + $Server->setDataBase($dataCon['DBS_DATABASE_NAME'], $dataCon['DBS_PORT']); + if ($Server->errno == 0) { + $response = $Server->tryConnectServer($dataCon['DBS_TYPE']); + if ($response->status != 'SUCCESS') { + if ($returnArray) { + $respTest['2']['error'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error; + } else { + $resp['message'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error; + return $resp; + } + } + } else { if ($returnArray) { $respTest['2']['error'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error; } else { @@ -259,25 +299,25 @@ class DataBaseConnection return $resp; } } - } else { - if ($returnArray) { - $respTest['2']['error'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error; - } else { - $resp['message'] = "Error Testing Connection: Connecting to host FAILED : " . $Server->error; - return $resp; - } - } - // STEP 4 : Trying to open database - $respTest['3'] = array(); - $respTest['3']['test'] = 'Opening database [' . $dataCon['DBS_DATABASE_NAME'] . ']'; - $Server->loginDbServer($dataCon['DBS_USERNAME'], $dataCon['DBS_PASSWORD']); - $Server->setDataBase($dataCon['DBS_DATABASE_NAME'], $dataCon['DBS_PORT']); - if ($Server->errno == 0) { - $response = $Server->tryConnectServer($dataCon['DBS_TYPE']); - if ($response->status == 'SUCCESS') { - $response = $Server->tryOpenDataBase($dataCon['DBS_TYPE']); - if ($response->status != 'SUCCESS') { + // STEP 4 : Trying to open database + $respTest['3'] = array(); + $respTest['3']['test'] = 'Opening database [' . $dataCon['DBS_DATABASE_NAME'] . ']'; + $Server->loginDbServer($dataCon['DBS_USERNAME'], $dataCon['DBS_PASSWORD']); + $Server->setDataBase($dataCon['DBS_DATABASE_NAME'], $dataCon['DBS_PORT']); + if ($Server->errno == 0) { + $response = $Server->tryConnectServer($dataCon['DBS_TYPE']); + if ($response->status == 'SUCCESS') { + $response = $Server->tryOpenDataBase($dataCon['DBS_TYPE']); + if ($response->status != 'SUCCESS') { + if ($returnArray) { + $respTest['3']['error'] = "Error Testing Connection: Opening database FAILED : " . $Server->error; + } else { + $resp['message'] = "Error Testing Connection: Opening database FAILED : " . $Server->error; + return $resp; + } + } + } else { if ($returnArray) { $respTest['3']['error'] = "Error Testing Connection: Opening database FAILED : " . $Server->error; } else { @@ -294,11 +334,51 @@ class DataBaseConnection } } } else { - if ($returnArray) { - $respTest['3']['error'] = "Error Testing Connection: Opening database FAILED : " . $Server->error; + $net = new \NET(); + + //STEP 0: Trying to open database type TNS + $respTest["0"] = array(); + $respTest["0"]["test"] = "Test TNS: " . $dataCon["DBS_TNS"]; + + $net->loginDbServer($dataCon["DBS_USERNAME"], $dataCon["DBS_PASSWORD"]); + + if ($net->errno == 0) { + $arrayServerData = array("connectionType" => $dataCon["DBS_CONNECTION_TYPE"], "tns" => $dataCon["DBS_TNS"]); + + $response = $net->tryConnectServer($dataCon["DBS_TYPE"], $arrayServerData); + + if ($response->status == "SUCCESS") { + $response = $net->tryOpenDataBase($dataCon["DBS_TYPE"], $arrayServerData); + + if ($response->status != "SUCCESS") { + if ($returnArray) { + $respTest["0"]["error"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error; + } else { + $resp["message"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error; + + //Return + return $resp; + } + } + } else { + if ($returnArray) { + $respTest["0"]["error"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error; + } else { + $resp["message"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error; + + //Return + return $resp; + } + } } else { - $resp['message'] = "Error Testing Connection: Opening database FAILED : " . $Server->error; - return $resp; + if ($returnArray) { + $respTest["0"]["error"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error; + } else { + $resp["message"] = "Error Testing Connection: Opening database type TNS FAILED, " . $net->error; + + //Return + return $resp; + } } } diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Project/DataBaseConnection.php b/workflow/engine/src/ProcessMaker/Services/Api/Project/DataBaseConnection.php index 8db262c42..fdeb26732 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Project/DataBaseConnection.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Project/DataBaseConnection.php @@ -62,7 +62,6 @@ class DataBaseConnection extends Api * @param string $dbs_server {@from body} {@required true} * @param string $dbs_database_name {@from body} {@required true} * @param string $dbs_username {@from body} - * @param string $dbs_port {@from body} {@type float} * @param string $dbs_encode {@from body} {@required true} * @param string $dbs_password {@from body} * @param string $dbs_description {@from body} @@ -80,7 +79,6 @@ class DataBaseConnection extends Api $dbs_server, $dbs_database_name, $dbs_username, - $dbs_port, $dbs_encode, $dbs_password = '', $dbs_description = '' @@ -103,7 +101,6 @@ class DataBaseConnection extends Api * @param string $dbs_server {@from body} {@required true} * @param string $dbs_database_name {@from body} {@required true} * @param string $dbs_username {@from body} - * @param string $dbs_port {@from body} {@type float} * @param string $dbs_encode {@from body} {@required true} * @param string $dbs_password {@from body} * @param string $dbs_description {@from body} @@ -122,7 +119,6 @@ class DataBaseConnection extends Api $dbs_server, $dbs_database_name, $dbs_username, - $dbs_port, $dbs_encode, $dbs_password = '', $dbs_description = '' @@ -145,7 +141,6 @@ class DataBaseConnection extends Api * @param string $dbs_server {@from body} {@required true} * @param string $dbs_database_name {@from body} {@required true} * @param string $dbs_username {@from body} - * @param string $dbs_port {@from body} {@type float} * @param string $dbs_encode {@from body} {@required true} * @param string $dbs_password {@from body} * @param string $dbs_description {@from body} @@ -164,7 +159,6 @@ class DataBaseConnection extends Api $dbs_server, $dbs_database_name, $dbs_username, - $dbs_port, $dbs_encode, $dbs_password = '', $dbs_description = '' From 5308e1fcbf3e559beedcecc3e00312dc47b61fd8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Fri, 17 Jul 2015 14:45:38 -0400 Subject: [PATCH 02/12] PM-3052 "0017694: Change text in the Enterprise..." SOLVED > Code Isuue: 0017694: Change text in the "Enterprise Features" list. > Solution: Se cambia los textos en Admin>Plugins> Enterprise Manage "Enterprise Features", por los nuevos textos sugeridos. --- workflow/engine/classes/class.licensedFeatures.php | 9 ++++----- workflow/engine/data/mysql/insert.sql | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/workflow/engine/classes/class.licensedFeatures.php b/workflow/engine/classes/class.licensedFeatures.php index 7bdb7fa30..5235bda86 100644 --- a/workflow/engine/classes/class.licensedFeatures.php +++ b/workflow/engine/classes/class.licensedFeatures.php @@ -29,7 +29,7 @@ class PMLicensedFeatures private $features = array (); private $newFeatures = array( 0 => array( - "description" => "Enables de Actions By Email feature.", + "description" => "Actions By Email allows users to enter information and route cases via email.", "enabled" => false, "id" => "actionsByEmail", "latest_version" => "", @@ -46,7 +46,7 @@ class PMLicensedFeatures "version" => "" ), 1 => array( - "description" => "Enables de Batch Routing feature.", + "description" => "Batch Routing allows a user to route multiple cases at a time onto the next task in the process. ", "enabled" => false, "id" => "pmConsolidatedCL", "latest_version" => "", @@ -97,7 +97,7 @@ class PMLicensedFeatures "version" => "" ), 4 => array( - "description" => "Registers every admin action in a log. The actions in administration settings options are registered in the log.", + "description" => "Registers every administrator action in a log. Any change in the settings under the Admin menu is registered in the log.", "enabled" => false, "id" => "auditLog", "latest_version" => "", @@ -131,7 +131,7 @@ class PMLicensedFeatures "version" => "" ), 6 => array( - "description" => "This functionality enables the flexibility to send mails from different email servers or configurations.", + "description" => "This features allows ProcessMaker to send out notifications using different email accounts and email servers.", "enabled" => false, "id" => "sendEmailFromDifferentEmailServers", "latest_version" => "", @@ -423,4 +423,3 @@ class PMLicensedFeatures } /*----------------------------------********---------------------------------*/ } - diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index 7226a23ae..436481405 100644 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -60026,10 +60026,10 @@ INSERT INTO CATALOG (CAT_UID, CAT_LABEL_ID, CAT_TYPE, CAT_FLAG, CAT_OBSERVATION, ('1050','ID_OVER_DUE','INDICATOR','%','Unit for displaying','2015-03-04','2015-03-04'); INSERT INTO ADDONS_MANAGER (ADDON_DESCRIPTION,ADDON_ID,ADDON_NAME,ADDON_NICK,ADDON_PUBLISHER,ADDON_RELEASE_TYPE,ADDON_STATUS,STORE_ID,ADDON_TYPE,ADDON_DOWNLOAD_URL,ADDON_VERSION,ADDON_DOWNLOAD_PROGRESS) VALUES -('Enables de Actions By Email feature.','actionsByEmail','actionsByEmail','actionsByEmail','Colosa','localRegistry','ready','00000000000000000000000000010004','features','','','0'), -('Enables de Batch Routing feature.','pmConsolidatedCL','pmConsolidatedCL','pmConsolidatedCL','Colosa','localRegistry','ready','00000000000000000000000000010005','features','','','0'), +('Actions By Email allows users to enter information and route cases via email.','actionsByEmail','actionsByEmail','actionsByEmail','Colosa','localRegistry','ready','00000000000000000000000000010004','features','','','0'), +('Batch Routing allows a user to route multiple cases at a time onto the next task in the process.','pmConsolidatedCL','pmConsolidatedCL','pmConsolidatedCL','Colosa','localRegistry','ready','00000000000000000000000000010005','features','','','0'), ('Dashboard with improved charting graphics and optimized to show strategic information like Process Efficiency and User Efficiency indicators.','strategicDashboards','strategicDashboards','Strategic Dashboards','Colosa','localRegistry','ready','00000000000000000000000000010006','features','','','0'), ('Enables the configuration of a second database connection in order to divide the database requests in read and write operations. This features is used with database clusters to improve the application performance.','secondDatabaseConnection','secondDatabaseConnection','secondDatabaseConnection','Colosa','localRegistry','ready','00000000000000000000000000010000','features','','','0'), ('A more secure option to store user passwords in ProcessMaker. The modern algorithm SHA-2 is used to store the passwords.','secureUserPasswordHash','secureUserPasswordHash','secureUserPasswordHash','Colosa','localRegistry','ready','00000000000000000000000000010002','features','','','0'), -('This functionality enables the flexibility to send mails from different email servers or configurations.','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','Colosa','localRegistry','ready','00000000000000000000000000010003','features','','','0'), -('Registers every admin action in a log. The actions in administration settings options are registered in the log.','auditLog','auditLog','auditLog','Colosa','localRegistry','ready','00000000000000000000000000010001','features','','','0'); +('This features allows ProcessMaker to send out notifications using different email accounts and email servers.','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','sendEmailFromDifferentEmailServers','Colosa','localRegistry','ready','00000000000000000000000000010003','features','','','0'), +('Registers every administrator action in a log. Any change in the settings under the Admin menu is registered in the log.','auditLog','auditLog','auditLog','Colosa','localRegistry','ready','00000000000000000000000000010001','features','','','0'); From 06858479f8073a9755bb74611704e6eaa9790142 Mon Sep 17 00:00:00 2001 From: Ronald Quenta Date: Mon, 20 Jul 2015 09:51:48 -0400 Subject: [PATCH 03/12] fix in list assignment --- workflow/engine/src/ProcessMaker/BusinessModel/Light.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php index eab37c401..6102a6e9e 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php @@ -358,6 +358,7 @@ class Light case 'REPORT_TO': case 'BALANCED': case 'SELF_SERVICE': + $taskAss = array(); $taskAss['taskId'] = $aValues['NEXT_TASK']['TAS_UID']; $taskAss['taskName'] = $aValues['NEXT_TASK']['TAS_TITLE']; $taskAss['taskAssignType'] = $aValues['NEXT_TASK']['TAS_ASSIGN_TYPE']; @@ -371,6 +372,7 @@ class Light $response[] = $taskAss; break; case 'MANUAL': + $manual = array(); $manual['taskId'] = $aValues['NEXT_TASK']['TAS_UID']; $manual['taskName'] = $aValues['NEXT_TASK']['TAS_TITLE']; $manual['taskAssignType'] = $aValues['NEXT_TASK']['TAS_ASSIGN_TYPE']; From 05c535e5ba56d6de23ce6b6c0c73c6051580f56b Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Mon, 20 Jul 2015 12:02:33 -0400 Subject: [PATCH 04/12] PM-3047 "Change the help text for many..." SOLVED > Code Isuue: 0017679: Change the help text for many "processmaker" commands > Solution: Se cambia el help de mansajes de processmaker por los nuevos mensajes sugeridos. --- workflow/engine/bin/tasks/cliFlushCache.php | 2 + workflow/engine/bin/tasks/cliHotfix.php | 2 +- workflow/engine/bin/tasks/cliMafe.php | 7 ++- workflow/engine/bin/tasks/cliPlugins.php | 6 ++ workflow/engine/bin/tasks/cliRake.php | 5 +- workflow/engine/bin/tasks/cliUpgrade.php | 21 ++++--- workflow/engine/bin/tasks/cliWorkspaces.php | 68 +++++++++++---------- workflow/engine/classes/class.cli.php | 14 +++-- 8 files changed, 72 insertions(+), 53 deletions(-) diff --git a/workflow/engine/bin/tasks/cliFlushCache.php b/workflow/engine/bin/tasks/cliFlushCache.php index 543b68932..f69ca51bd 100644 --- a/workflow/engine/bin/tasks/cliFlushCache.php +++ b/workflow/engine/bin/tasks/cliFlushCache.php @@ -28,6 +28,8 @@ G::LoadSystem("g"); CLI::taskName('flush-cache'); CLI::taskDescription(<< 0 ) { $taskName = $args[0]; } else { $taskName = $args; } if (! $taskName) { - echo "usage: $scriptName [options] [args]\n"; - echo "Type '$scriptName help ' for help on a specific task\n"; - echo "\nAvailable tasks:\n"; + echo "usage: processmaker [options] [args]\n"; + echo " If using Linux/UNIX, prepend './' to specify the directory: " . $scriptName . " [options] [args]\n"; + echo "Type 'processmaker help ' for help on a specific task."; + echo "\n\nAvailable tasks:\n"; $tasks = array (); ksort( self::$tasks ); foreach (self::$tasks as $name => $data) { @@ -180,13 +181,16 @@ class CLI } $valid_args[] = $arg; } + + $nameHotfixFile = ($taskName == "hotfix-install")? "HOTFIX-FILE" : ""; //lsl + $valid_args = join( " ", $valid_args ); $description = explode( "\n", self::$tasks[$taskName]['description'] ); $taskDescription = trim( array_shift( $description ) ); $description = trim( implode( "\n", $description ) ); $message = <<< EOT $taskName: {$taskDescription} -Usage: $scriptName $taskName $valid_args +Usage: processmaker $taskName $nameHotfixFile $valid_args $description From 8f9005b7265c104ff9cc9ee782297775d39e4d4e Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Mon, 20 Jul 2015 12:06:24 -0400 Subject: [PATCH 05/12] PM-3047 "Change the help text for many..." SOLVED > Code Isuue: 0017679: Change the help text for many "processmaker" commands > Solution: Se cambia el help de mansajes de processmaker por los nuevos mensajes sugeridos. --- workflow/engine/classes/class.cli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/classes/class.cli.php b/workflow/engine/classes/class.cli.php index 84ea196a7..9d75ca6f7 100755 --- a/workflow/engine/classes/class.cli.php +++ b/workflow/engine/classes/class.cli.php @@ -182,7 +182,7 @@ class CLI $valid_args[] = $arg; } - $nameHotfixFile = ($taskName == "hotfix-install")? "HOTFIX-FILE" : ""; //lsl + $nameHotfixFile = ($taskName == "hotfix-install")? "HOTFIX-FILE" : ""; $valid_args = join( " ", $valid_args ); $description = explode( "\n", self::$tasks[$taskName]['description'] ); From db6e25db4bf52e99410c293f115fcaabf1516475 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Mon, 20 Jul 2015 18:18:07 -0400 Subject: [PATCH 06/12] PM-1375 "En el Case Tracker no se visualizan los formularios" SOLVED > Code Isuue: En el Case Tracker no se visualizan los formularios > Solution: Se realiza validacion al mostrar los Dynaforms del Case Tracker --- workflow/engine/classes/class.pmDynaform.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php index b50accfd6..2e42c2865 100644 --- a/workflow/engine/classes/class.pmDynaform.php +++ b/workflow/engine/classes/class.pmDynaform.php @@ -69,7 +69,11 @@ class pmDynaform public function getCredentials() { if (!isset($_SESSION['USER_LOGGED'])) { - return; + if (!preg_match("/^.*\/" . SYS_SKIN . "\/tracker\/.*$/", $_SERVER["REQUEST_URI"])) { + return; + } + + $_SESSION["USER_LOGGED"] = "00000000000000000000000000000001"; } if ($this->credentials != null) { return $this->credentials; @@ -163,7 +167,7 @@ class pmDynaform array_push($json->options, $option); } } catch (Exception $e) { - + } } if (isset($json->options[0])) { From b3b66b2ea8ada23455cb81f24935385473d4f2b2 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Tue, 21 Jul 2015 09:49:41 -0400 Subject: [PATCH 07/12] PM-1375 "En el Case Tracker no se visualizan los..." SOLVED --- workflow/engine/classes/class.pmDynaform.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php index 2e42c2865..943666fdf 100644 --- a/workflow/engine/classes/class.pmDynaform.php +++ b/workflow/engine/classes/class.pmDynaform.php @@ -68,13 +68,18 @@ class pmDynaform public function getCredentials() { + $flagTrackerUser = false; + if (!isset($_SESSION['USER_LOGGED'])) { if (!preg_match("/^.*\/" . SYS_SKIN . "\/tracker\/.*$/", $_SERVER["REQUEST_URI"])) { return; } $_SESSION["USER_LOGGED"] = "00000000000000000000000000000001"; + $flagTrackerUser = true; } + + if ($this->credentials != null) { return $this->credentials; } @@ -88,6 +93,11 @@ class pmDynaform "clientId" => $a["client_id"], "clientSecret" => $a["client_secret"] ); + + if ($flagTrackerUser) { + unset($_SESSION["USER_LOGGED"]); + } + return $this->credentials; } From ecd9b4f4cf8356110224ea7fdad0ba9d73ec0068 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Tue, 21 Jul 2015 09:56:07 -0400 Subject: [PATCH 08/12] PM-1375 "En el Case Tracker no se visualizan los..." SOLVED --- workflow/engine/classes/class.pmDynaform.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php index 943666fdf..f8cc14557 100644 --- a/workflow/engine/classes/class.pmDynaform.php +++ b/workflow/engine/classes/class.pmDynaform.php @@ -78,8 +78,6 @@ class pmDynaform $_SESSION["USER_LOGGED"] = "00000000000000000000000000000001"; $flagTrackerUser = true; } - - if ($this->credentials != null) { return $this->credentials; } From b7775a3f258b03e520e7cc1a4684094a999aef37 Mon Sep 17 00:00:00 2001 From: "marcelo.cuiza" Date: Tue, 21 Jul 2015 10:21:32 -0400 Subject: [PATCH 09/12] PM-1887 0016482: In the Template Editor, the variable picker should only allow @@var and @#var Se limito los prefijos a los que se indica (@@,@#), solo para en el antiguo disenador --- workflow/engine/methods/controls/varsAjax.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/workflow/engine/methods/controls/varsAjax.php b/workflow/engine/methods/controls/varsAjax.php index b05999ff0..843b775a5 100755 --- a/workflow/engine/methods/controls/varsAjax.php +++ b/workflow/engine/methods/controls/varsAjax.php @@ -86,14 +86,17 @@ $html .= ''; $html .= ''; $html .= '     '; $html .= ''; From e49e11737f11a5cfdbe34b2241cdf448795d7b4c Mon Sep 17 00:00:00 2001 From: Victor Saisa Lopez Date: Tue, 21 Jul 2015 15:34:59 -0400 Subject: [PATCH 10/12] PM-3132 "Designer > BPMN Designer: Al aplicar el..." SOLVED Issue: Designer > BPMN Designer: Al aplicar el hotfix 3.0.0.7 los templates de Action By Email no se pueden editar en los procesos antiguos Cause: En algunos procesos los files de action-by-email no tienen su registro en la base de datos Solution: Se crea el metodo que registra los files faltantes en la base de datos, esto con las siguientes acciones: - Al ejecutar el comando "upgrade" - Al importar un proceso --- workflow/engine/classes/class.wsTools.php | 96 +++++-------- .../BusinessModel/FilesManager.php | 129 ++++++++++++++++-- .../src/ProcessMaker/Importer/Importer.php | 8 +- .../src/ProcessMaker/Project/Workflow.php | 20 +++ 4 files changed, 182 insertions(+), 71 deletions(-) diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index 0717333be..8cc4fd197 100755 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -111,70 +111,18 @@ class workspaceTools $final = $stop - $start; CLI::logging("<*> Backup log files Process took $final seconds.\n"); - CLI::logging("> Updating Files Manager...\n\n"); - $this->upgradeFilesManager($workSpace); - $start = microtime(true); CLI::logging("> Migrate new lists...\n"); $this->migrateList($workSpace); $stop = microtime(true); $final = $stop - $start; CLI::logging("<*> Migrate new lists Process took $final seconds.\n"); - } - /** - * Function upgradeFilesManager - * access public - */ - public function upgradeFilesManager($workSpace) { - $this->initPropel(true); - $con = Propel::getConnection("root"); - $stmt = $con->createStatement(); - $sDirectory = glob(PATH_DATA . "sites/" . $workSpace . "/" . "mailTemplates/*"); - $sDirectoryPublic = glob(PATH_DATA . "sites/" . $workSpace . "/" . "public/*"); - $files = array(); - foreach($sDirectory as $mailTemplate) { - if (is_dir($mailTemplate)) { - $inner_files = listFiles($mailTemplate); - if (is_array($inner_files)) $files = array_merge($files, $inner_files); - } - if (is_file($mailTemplate)) { - array_push($files, $mailTemplate); - } - } - foreach($sDirectoryPublic as $publicFile) { - if (is_dir($publicFile)) { - $inner_files = listFiles($publicFile); - if (is_array($inner_files)) $files = array_merge($files, $inner_files); - } - if (is_file($publicFile)) { - array_push($files, $publicFile); - } - } - $sDir = PATH_DATA . "sites/" . $workSpace . "/" . "mailTemplates/"; - $sDirPublic = PATH_DATA . "sites/" . $workSpace . "/" . "public/"; - foreach ($files as $aFile) { - if (strpos($aFile, $sDir) !== false){ - $processUid = current(explode("/", str_replace($sDir,'',$aFile))); - } else { - $processUid = current(explode("/", str_replace($sDirPublic,'',$aFile))); - } - $sql = "SELECT PROCESS_FILES.PRF_PATH FROM PROCESS_FILES WHERE PROCESS_FILES.PRF_PATH='" . $aFile ."'"; - $appRows = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - $fileUid = ''; - foreach ($appRows as $row) { - $fileUid = $row["PRF_PATH"]; - } - if ($fileUid !== $aFile) { - $sPkProcessFiles = G::generateUniqueID(); - $sDate = date('Y-m-d H:i:s'); - $sql = "INSERT INTO PROCESS_FILES (PRF_UID, PRO_UID, USR_UID, PRF_UPDATE_USR_UID, - PRF_PATH, PRF_TYPE, PRF_EDITABLE, PRF_CREATE_DATE, PRF_UPDATE_DATE) - VALUES ('".$sPkProcessFiles."', '".$processUid."', '00000000000000000000000000000001', '', - '".$aFile."', 'file', 'true', '".$sDate."', NULL)"; - $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC); - } - } + $start = microtime(true); + CLI::logging("> Updating Files Manager...\n"); + $this->processFilesUpgrade(); + $stop = microtime(true); + CLI::logging("<*> Updating Files Manager took " . ($stop - $start) . " seconds.\n"); } /** @@ -1564,10 +1512,10 @@ class workspaceTools $version = explode('-', $version); $versionPresent = ( isset($version[0])) ? $version[0] : ''; CLI::logging(CLI::warning(" - Warning: A workspace from a newer version of ProcessMaker can NOT be restored in an older version of - ProcessMaker. For example, restoring from v.3.0 to v.2.5 will not work. However, it may be possible - to restore a workspace from an older version to an newer version of ProcessMaker, although error - messages may be displayed during the restore process. Make sure to run the \"processmaker cacheview-repair\" + Warning: A workspace from a newer version of ProcessMaker can NOT be restored in an older version of + ProcessMaker. For example, restoring from v.3.0 to v.2.5 will not work. However, it may be possible + to restore a workspace from an older version to an newer version of ProcessMaker, although error + messages may be displayed during the restore process. Make sure to run the \"processmaker cacheview-repair\" and \"processmaker migrate-new-cases-lists\" commands after restoring a workspace.") . "\n"); foreach ($metaFiles as $metaFile) { @@ -2226,5 +2174,31 @@ class workspaceTools throw $e; } } + + /** + * Process-Files upgrade + * + * return void + */ + public function processFilesUpgrade() + { + try { + if (!defined("PATH_DATA_MAILTEMPLATES")) { + define("PATH_DATA_MAILTEMPLATES", PATH_DATA_SITE . "mailTemplates" . PATH_SEP); + } + + if (!defined("PATH_DATA_PUBLIC")) { + define("PATH_DATA_PUBLIC", PATH_DATA_SITE . "public" . PATH_SEP); + } + + $this->initPropel(true); + + $filesManager = new \ProcessMaker\BusinessModel\FilesManager(); + + $filesManager->processFilesUpgrade(); + } catch (Exception $e) { + throw $e; + } + } } diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php b/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php index 14d342d46..3ea4b80e3 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php @@ -194,7 +194,7 @@ class FilesManager $directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename']; throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory))); } - + if (!file_exists($sCheckDirectory)) { $sPkProcessFiles = \G::generateUniqueID(); $oProcessFiles = new \ProcessFiles(); @@ -242,31 +242,31 @@ class FilesManager throw $e; } } - + public function addProcessFilesManagerInDb($aData) { try { $oProcessFiles = new \ProcessFiles(); $aData = array_change_key_case($aData, CASE_UPPER); $oProcessFiles->fromArray($aData, \BasePeer::TYPE_FIELDNAME); - + if($this->existsProcessFile($aData['PRF_UID'])) { $sPkProcessFiles = \G::generateUniqueID(); $oProcessFiles->setPrfUid($sPkProcessFiles); - + $sDirectory = PATH_DATA_MAILTEMPLATES . $aData['PRO_UID'] . PATH_SEP . basename($aData['PRF_PATH']); $oProcessFiles->setPrfPath($sDirectory); - + $emailEvent = new \ProcessMaker\BusinessModel\EmailEvent(); $emailEvent->updatePrfUid($aData['PRF_UID'], $sPkProcessFiles, $aData['PRO_UID']); } - + $result = $oProcessFiles->save(); } catch (Exception $e) { throw $e; } } - + public function existsProcessFile($prfUid) { try { @@ -462,10 +462,10 @@ class FilesManager if ($path == '') { throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_FOR", array('prf_uid'))); } - + $sFile = end(explode("/",$path)); $path = PATH_DATA_MAILTEMPLATES.$sProcessUID.DIRECTORY_SEPARATOR.$sFile; - + if (file_exists($path) && !is_dir($path)) { unlink($path); } @@ -601,4 +601,115 @@ class FilesManager throw $e; } } + + /** + * Process-Files upgrade + * + * @param string $projectUid Unique id of Project + * + * return void + */ + public function processFilesUpgrade($projectUid = "") + { + try { + //Set variables + $conf = new \Configuration(); + + //Create/Get PROCESS_FILES_CHECKED + $arrayProjectUid = array(); + + $configuration = \ConfigurationPeer::retrieveByPK("PROCESS_FILES_CHECKED", "", "", "", ""); + + if (is_null($configuration)) { + $result = $conf->create(array( + "CFG_UID" => "PROCESS_FILES_CHECKED", + "OBJ_UID" => "", + "CFG_VALUE" => serialize($arrayProjectUid), + "PRO_UID" => "", + "USR_UID" => "", + "APP_UID" => "" + )); + } else { + $arrayProjectUid = unserialize($configuration->getCfgValue()); + } + + //Set variables + $arrayPath = array("templates" => PATH_DATA_MAILTEMPLATES, "public" => PATH_DATA_PUBLIC); + $flagProjectUid = false; + + //Query + $criteria = new \Criteria("workflow"); + + $criteria->addSelectColumn(\BpmnProjectPeer::PRJ_UID); + + if ($projectUid != "") { + $criteria->add( + $criteria->getNewCriterion(\BpmnProjectPeer::PRJ_UID, $arrayProjectUid, \Criteria::NOT_IN)->addAnd( + $criteria->getNewCriterion(\BpmnProjectPeer::PRJ_UID, $projectUid, \Criteria::EQUAL)) + ); + } else { + $criteria->add(\BpmnProjectPeer::PRJ_UID, $arrayProjectUid, \Criteria::NOT_IN); + } + + $rsCriteria = \BpmnProjectPeer::doSelectRS($criteria); + $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC); + + while ($rsCriteria->next()) { + $row = $rsCriteria->getRow(); + + foreach ($arrayPath as $key => $value) { + $path = $key; + $dir = $value . $row["PRJ_UID"]; + + if (is_dir($dir)) { + if ($dirh = opendir($dir)) { + while (($file = readdir($dirh)) !== false) { + if ($file != "" && $file != "." && $file != "..") { + $f = $dir . PATH_SEP . $file; + + if (is_file($f)) { + $arrayProcessFilesData = $this->getFileManagerUid($f); + + if (is_null($arrayProcessFilesData["PRF_UID"])) { + rename($dir . PATH_SEP . $file, $dir . PATH_SEP . $file . ".tmp"); + + $arrayData = array( + "prf_path" => $path, + "prf_filename" => $file, + "prf_content" => "" + ); + + $arrayData = $this->addProcessFilesManager($row["PRJ_UID"], "00000000000000000000000000000001", $arrayData); + + rename($dir . PATH_SEP . $file . ".tmp", $dir . PATH_SEP . $file); + } + } + } + } + + closedir($dirh); + } + } + } + + $arrayProjectUid[$row["PRJ_UID"]] = $row["PRJ_UID"]; + $flagProjectUid = true; + } + + //Update PROCESS_FILES_CHECKED + if ($flagProjectUid) { + $result = $conf->update(array( + "CFG_UID" => "PROCESS_FILES_CHECKED", + "OBJ_UID" => "", + "CFG_VALUE" => serialize($arrayProjectUid), + "PRO_UID" => "", + "USR_UID" => "", + "APP_UID" => "" + )); + } + } catch (\Exception $e) { + throw $e; + } + } } + diff --git a/workflow/engine/src/ProcessMaker/Importer/Importer.php b/workflow/engine/src/ProcessMaker/Importer/Importer.php index cde85e5c0..10cf796b1 100755 --- a/workflow/engine/src/ProcessMaker/Importer/Importer.php +++ b/workflow/engine/src/ProcessMaker/Importer/Importer.php @@ -402,6 +402,11 @@ abstract class Importer $workflow->update($arrayWorkflowTables["process"]); + //Process-Files upgrade + $filesManager = new \ProcessMaker\BusinessModel\FilesManager(); + + $filesManager->processFilesUpgrade($projectUid); + //Return return $projectUid; } @@ -559,7 +564,7 @@ abstract class Importer throw $e; } } - + public function saveAs($prj_uid, $prj_name, $prj_description, $prj_category) { try { @@ -594,3 +599,4 @@ abstract class Importer } } } + diff --git a/workflow/engine/src/ProcessMaker/Project/Workflow.php b/workflow/engine/src/ProcessMaker/Project/Workflow.php index cefd7613b..e499b82cf 100755 --- a/workflow/engine/src/ProcessMaker/Project/Workflow.php +++ b/workflow/engine/src/ProcessMaker/Project/Workflow.php @@ -581,6 +581,26 @@ class Workflow extends Handler $oCaseTracker = new \CaseTracker(); $oCaseTrackerObject = new \CaseTrackerObject(); + //Update PROCESS_FILES_CHECKED + $configuration = \ConfigurationPeer::retrieveByPK("PROCESS_FILES_CHECKED", "", "", "", ""); + + if (!is_null($configuration)) { + $arrayProjectUid = unserialize($configuration->getCfgValue()); + + unset($arrayProjectUid[$sProcessUID]); + + $conf = new \Configuration(); + + $result = $conf->update(array( + "CFG_UID" => "PROCESS_FILES_CHECKED", + "OBJ_UID" => "", + "CFG_VALUE" => serialize($arrayProjectUid), + "PRO_UID" => "", + "USR_UID" => "", + "APP_UID" => "" + )); + } + //Delete the applications of process if ($flagRemoveCases) { $case = new \Cases(); From b365e50f646149486d80cab5cfb681100367b760 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Thu, 23 Jul 2015 17:46:08 -0400 Subject: [PATCH 11/12] pm1 --- .../engine/src/ProcessMaker/BusinessModel/Task.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php index e366e419f..50caa5c93 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php @@ -870,7 +870,7 @@ class Task } } } else { - $limit = 1000; + $limit = count($aUsers)+1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1003,7 +1003,7 @@ class Task } } } else { - $limit = 1000; + $limit = count($aUsers)+1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1371,7 +1371,7 @@ class Task } } } else { - $limit = 1000; + $limit = count($aUsers)+1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1504,7 +1504,7 @@ class Task } } } else { - $limit = 1000; + $limit = count($aUsers)+1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1924,7 +1924,7 @@ class Task } } } else { - $limit = 1000; + $limit = count($aUsersGroups)+1; } $aUsersGroups = $this->arrayPagination($aUsersGroups, $start, $limit); return $aUsersGroups; @@ -2042,7 +2042,7 @@ class Task } } } else { - $limit = 1000; + $limit = count($aUsersGroups)+1; } $aUsersGroups = $this->arrayPagination($aUsersGroups, $start, $limit); return $aUsersGroups; From 6c15ae66eab27e96692105e9d3b74847b7c95742 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Thu, 23 Jul 2015 17:51:17 -0400 Subject: [PATCH 12/12] test1 --- .../engine/src/ProcessMaker/BusinessModel/Task.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php index 50caa5c93..91a978e6e 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php @@ -870,7 +870,7 @@ class Task } } } else { - $limit = count($aUsers)+1; + $limit = count($aUsers) + 1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1003,7 +1003,7 @@ class Task } } } else { - $limit = count($aUsers)+1; + $limit = count($aUsers) + 1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1371,7 +1371,7 @@ class Task } } } else { - $limit = count($aUsers)+1; + $limit = count($aUsers) + 1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1504,7 +1504,7 @@ class Task } } } else { - $limit = count($aUsers)+1; + $limit = count($aUsers) + 1; } $aUsers = $this->arrayPagination($aUsers, $start, $limit); return $aUsers; @@ -1924,7 +1924,7 @@ class Task } } } else { - $limit = count($aUsersGroups)+1; + $limit = count($aUsersGroups) + 1; } $aUsersGroups = $this->arrayPagination($aUsersGroups, $start, $limit); return $aUsersGroups; @@ -2042,7 +2042,7 @@ class Task } } } else { - $limit = count($aUsersGroups)+1; + $limit = count($aUsersGroups) + 1; } $aUsersGroups = $this->arrayPagination($aUsersGroups, $start, $limit); return $aUsersGroups;