Merged in release/3.8.0 (pull request #8603)

Updating develop branch with last changes in release/3.8.0

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2022-10-05 13:13:49 +00:00
committed by Julio Cesar Laura Avendaño
13 changed files with 597 additions and 20 deletions

View File

@@ -396,11 +396,24 @@ class AdditionalTables extends BaseAdditionalTables
}
}
public function getAllData($sUID, $start = null, $limit = null, $keyOrderUppercase = true, $filter = '', $appUid = false, $search = '')
/**
* Get all data
*
* @param string $uid
* @param int $start
* @param int $limit
* @param bool $keyOrderUppercase
* @param string $filter
* @param bool $appUid
* @param string $search
*
* @return array
*/
public static function getAllData($uid, $start = null, $limit = null, $keyOrderUppercase = true, $filter = '', $appUid = false, $search = '')
{
$conf = Bootstrap::getSystemConfiguration();
$addTab = new AdditionalTables();
$aData = $addTab->load($sUID, true);
$aData = $addTab->load($uid, true);
if (!isset($_SESSION['PROCESS'])) {
$_SESSION["PROCESS"] = $aData['PRO_UID'];
}

View File

@@ -37,6 +37,7 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use InputDocument;
use InvalidIndexSearchTextException;
use Luracast\Restler\RestException;
use PmDynaform;
use PmTable;
use ProcessMaker\BusinessModel\Cases as BmCases;
@@ -57,6 +58,7 @@ use ProcessMaker\Model\Triggers;
use ProcessMaker\Model\ProcessUser;
use ProcessMaker\Model\User;
use ProcessMaker\Plugins\PluginRegistry;
use ProcessMaker\Services\Api;
use ProcessMaker\Services\OAuth2\Server;
use ProcessMaker\Util\DateTime as UtilDateTime;
use ProcessMaker\Validation\ExceptionRestApi;
@@ -2640,7 +2642,7 @@ class Cases
* @param string $typeView type of view
*
* @return array Return an array with process list that the user can start.
* @throws Exception
* @throws RestException
*/
public function getCasesListStarCase($usrUid, $typeView)
{

View File

@@ -353,7 +353,10 @@ class TriggerWizard
$library = $this->library->getLibraryDefinition($this->libraryGetLibraryName($libraryName));
$method = $library->methods[$methodName];
$arrayParameter = array_keys($method->params);
$arrayParameter = [];
if (isset($method->params)) {
$arrayParameter = array_keys($method->params);
}
foreach ($arrayParameter as $key => $value) {
$strParam = $value;
@@ -796,7 +799,7 @@ class TriggerWizard
public function getMethod($libraryName, $methodName)
{
try {
$arrayMethod = array();
$arrayMethod = [];
//Verify data
$arrayMethodInputParam = $this->methodGetInputParams($libraryName, $methodName);
@@ -805,10 +808,9 @@ class TriggerWizard
//Get data
$library = $this->library->getLibraryDefinition($this->libraryGetLibraryName($libraryName));
$method = $library->methods[$methodName];
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_NAME")] = trim($method->info["name"]);
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_DESCRIPTION")] = trim(str_replace("*", "", implode("", $method->info["description"])));
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_LABEL")] = trim($method->info["label"]);
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_NAME")] = isset($method->info["name"]) ? trim($method->info["name"]) : '';
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_DESCRIPTION")] = isset($method->info["description"]) ? trim(str_replace("*", "", implode("", $method->info["description"]))) : '';
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_LABEL")] = isset($method->info["label"]) ? trim($method->info["label"]) : '';
$arrayMethod[$this->getFieldNameByFormatFieldName("FN_LINK")] = (isset($method->info["link"]) && trim($method->info["link"]) != "")? trim($method->info["link"]) : "";
if ($this->formatFieldNameInUppercase) {
@@ -841,7 +843,7 @@ class TriggerWizard
public function getLibrary($libraryName)
{
try {
$arrayLibrary = array();
$arrayLibrary = [];
//Verify data
$this->throwExceptionIfNotExistsLibrary($libraryName, $this->arrayFieldNameForException["libraryName"]);
@@ -850,12 +852,12 @@ class TriggerWizard
$library = $this->library->getLibraryDefinition($this->libraryGetLibraryName($libraryName));
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_NAME")] = $libraryName;
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_TITLE")] = trim($library->info["name"]);
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_DESCRIPTION")] = trim(str_replace("*", "", implode("", $library->info["description"])));
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_TITLE")] = isset($library->info["name"]) ? trim($library->info["name"]) : '';
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_DESCRIPTION")] = isset($library->info["description"]) ? trim(str_replace("*", "", implode("", $library->info["description"]))) : '';
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_ICON")] = (isset($library->info["icon"]) && trim($library->info["icon"]) != "")? trim($library->info["icon"]) : "/images/browse.gif";
$arrayLibrary[$this->getFieldNameByFormatFieldName("LIB_CLASS_NAME")] = trim($library->info["className"]);
$arrayMethod = array();
$arrayMethod = [];
if (count($library->methods) > 0) {
ksort($library->methods, SORT_STRING);

View File

@@ -1517,12 +1517,13 @@ class System
//Test Create Database
$dbNameTest = 'PROCESSMAKERTESTDC';
$result = DB::connection($connection)->statement("CREATE DATABASE $dbNameTest");
$result = DB::connection($connection)->statement("CREATE DATABASE IF NOT EXISTS $dbNameTest");
if ($result) {
//Test set permissions user
$usrTest = self::generateUserName(strlen($userName));
$passTest = '!Sample123_';
$result = DB::connection($connection)->statement("GRANT ALL PRIVILEGES ON `$dbNameTest`.* TO $usrTest@'%%' IDENTIFIED BY '$passTest' WITH GRANT OPTION");
$result = DB::connection($connection)->statement("CREATE USER `$usrTest`@`%%` IDENTIFIED BY '$passTest'");
$result = DB::connection($connection)->statement("GRANT ALL PRIVILEGES ON `$dbNameTest`.* TO `$usrTest`@`%%`");
if ($result) {
//Test Create user

2
workflow/engine/xmlform/tracker/loginpm3.html Normal file → Executable file
View File

@@ -6,7 +6,7 @@
<label class="panel-login">
<div class="login_result"><h4>{$form.TITLE}</h4></div>
</label>
{$form.USR_USERNAME}
{if isset($form.USR_USERNAME)}{$form.USR_USERNAME}{/if}
{$form.CASE}
{$form.PIN}

View File

@@ -1132,7 +1132,7 @@ if (!defined('EXECUTE_BY_CRON')) {
header('Pragma: ');
}
ob_end_flush();
@ob_end_flush();
if (DEBUG_TIME_LOG) {
bootstrap::logTimeByPage(); //log this page
}