PMC-580: release/3.3.7

This commit is contained in:
Paula Quispe
2019-05-07 14:39:05 -04:00
27 changed files with 874 additions and 551 deletions

View File

@@ -1,4 +1,8 @@
<?php
/**
* @deprecated This file is not used anymore, it will be removed in future versions of PM
*/
if (! isset( $_REQUEST['action'] )) {
$res['success'] = 'failure';
$res['message'] = 'You may request an action';

View File

@@ -77,8 +77,8 @@ if (defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD
}
}
$info = pathinfo($oAppDocument->getAppDocFilename());
$docFileName = fixContentDispositionFilename($oAppDocument->getAppDocFilename());
$info = pathinfo($docFileName);
if (!isset($_GET['ext'])) {
$ext = $info['extension'];
} else {
@@ -133,7 +133,7 @@ if (!$sw_file_exists) {
$res['message'] = $info['basename'] . $ver . '.' . $ext;
print G::json_encode($res);
} else {
$nameFile = G::inflect($info['basename'] . $ver) . '.' . $ext;
$nameFile = $info['basename'] . $ver . '.' . $ext;
$licensedFeatures = PMLicensedFeatures::getSingleton();
$downloadStatus = false;
/*----------------------------------********---------------------------------*/

View File

@@ -444,7 +444,8 @@ try {
}
//END: If there is a Break Step registered from Plugin
$sFilenameOriginal = $sFilename = preg_replace('[^A-Za-z0-9_]', '_', G::replaceDataField($aOD['OUT_DOC_FILENAME'], $Fields['APP_DATA']));
$outDocFile = replacePrefixes($aOD['OUT_DOC_FILENAME']);
$sFilenameOriginal = $sFilename = preg_replace('[^A-Za-z0-9_]', '_', G::replaceDataField($outDocFile, $Fields['APP_DATA']));
//Get the Custom Folder ID (create if necessary)
$oFolder = new AppFolder();

View File

@@ -1,65 +1,57 @@
<?php
if (isset( $_SESSION['TRIGGER_DEBUG']['info'] )) {
$aTriggers = $_SESSION['TRIGGER_DEBUG']['info'];
if (isset($_SESSION['TRIGGER_DEBUG']['info'])) {
$triggers = $_SESSION['TRIGGER_DEBUG']['info'];
} else {
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
$triggers[0] = $_SESSION['TRIGGER_DEBUG'];
}
//print_r($aTriggers);die;
$triggersList = Array ();
$triggersList = [];
$i = 0;
foreach ($aTriggers as $aTrigger) {
foreach ($triggers as $trigger) {
if ($aTrigger['NUM_TRIGGERS'] != 0) {
if ($trigger['NUM_TRIGGERS'] != 0) {
foreach ($aTrigger['TRIGGERS_NAMES'] as $index => $name) {
foreach ($trigger['TRIGGERS_NAMES'] as $index => $name) {
$triggersList[$i]['name'] = $name;
$triggersList[$i]['execution_time'] = strtolower( $aTrigger['TIME'] );
//$t_code = $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
//$t_code = str_replace('"', '\'',$t_code);
//$t_code = addslashes($t_code);
//$t_code = Only1br($t_code);
//highlighting the trigger code using the geshi third party library
$triggersList[$i]['execution_time'] = strtolower($trigger['TIME']);
$geshi = new GeSHi( $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php' );
$geshi->enable_line_numbers( GESHI_FANCY_LINE_NUMBERS, 2 );
$geshi->set_line_style( 'background: #f0f0f0;' );
$geshi = new GeSHi($trigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php');
$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2);
$geshi->set_line_style('background: #f0f0f0;');
$triggersList[$i]['code'] = $geshi->parse_code(); //$aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
$triggersList[$i]['code'] = $geshi->parse_code();
$triggerUid = $aTrigger['TRIGGERS_VALUES'][$index]['TRI_UID'];
$triggersList[$i]['script_execution_time'] = isset($aTrigger['TRIGGERS_EXECUTION_TIME'][$triggerUid]) ? $aTrigger['TRIGGERS_EXECUTION_TIME'][$triggerUid] : '';
$triggerUid = $trigger['TRIGGERS_VALUES'][$index]['TRI_UID'];
$triggersList[$i]['script_execution_time'] = isset($trigger['TRIGGERS_EXECUTION_TIME'][$triggerUid]) ? $trigger['TRIGGERS_EXECUTION_TIME'][$triggerUid] : '';
$i ++;
$i++;
}
} else {
}
}
//print_r($_SESSION['TRIGGER_DEBUG']['ERRORS']); die;
$DEBUG_ERRORS = array_unique( $_SESSION['TRIGGER_DEBUG']['ERRORS'] );
$debugErrors = array_unique($_SESSION['TRIGGER_DEBUG']['ERRORS'], SORT_REGULAR);
foreach ($DEBUG_ERRORS as $error) {
if (isset( $error['ERROR'] ) and $error['ERROR'] != '') {
foreach ($debugErrors as $error) {
if (isset($error['ERROR']) and $error['ERROR'] != '') {
$triggersList[$i]['name'] = 'Error';
$triggersList[$i]['execution_time'] = 'error';
$triggersList[$i]['code'] = $error['ERROR'];
$i ++;
$i++;
}
if (isset( $error['FATAL'] ) and $error['FATAL'] != '') {
$error['FATAL'] = str_replace( "<br />", "\n", $error['FATAL'] );
$tmp = explode( "\n", $error['FATAL'] );
$triggersList[$i]['name'] = isset( $tmp[0] ) ? $tmp[0] : 'Fatal Error in trigger';
if (isset($error['FATAL']) and $error['FATAL'] != '') {
$error['FATAL'] = str_replace("<br />", "\n", $error['FATAL']);
$tmp = explode("\n", $error['FATAL']);
$triggersList[$i]['name'] = isset($tmp[0]) ? $tmp[0] : 'Fatal Error in trigger';
$triggersList[$i]['execution_time'] = 'Fatal error';
$triggersList[$i]['code'] = $error['FATAL'];
$i ++;
$i++;
}
}
$triggersRet = new StdClass();
$triggersRet->total = count( $triggersList );
$triggersRet->total = count($triggersList);
$triggersRet->data = $triggersList;
echo G::json_encode( $triggersRet );
echo G::json_encode($triggersRet);

View File

@@ -130,7 +130,6 @@ switch ($req) {
$tasTitleDefault = G::LoadTranslation('ID_TASK_NOT_RELATED');
while ($result->next()) {
$row = $result->getRow();
$row['APP_MSG_FROM'] = htmlentities($row['APP_MSG_FROM'], ENT_QUOTES, "UTF-8");
$row['APP_MSG_STATUS'] = ucfirst($row['APP_MSG_STATUS']);
switch ($filterBy) {

View File

@@ -1,6 +1,7 @@
<?php
use ProcessMaker\Util\ParseSoapVariableName;
use ProcessMaker\Util\DateTime;
ini_set("soap.wsdl_cache_enabled", 0); //disabling WSDL cache
@@ -923,6 +924,13 @@ function systemInformation($params)
return $res;
}
/**
* Obtains the cases notes in a soap call
*
* @param $params
* @return WsGetCaseNotesResponse|WsResponse
*
*/
function getCaseNotes($params)
{
$vsResult = isValidSession($params->sessionId);
@@ -934,6 +942,11 @@ function getCaseNotes($params)
$ws = new WsBase();
$res = $ws->getCaseNotes($params->applicationID, $params->userUid);
foreach ($res->notes as $key => $value) {
$res->notes[$key]['note_date'] = DateTime::convertUtcToTimeZone($res->notes[$key]['note_date']);
}
return $res;
}