solved conflict composer.lock, config/app.php, workflow/engine/classes/SpoolRun.php

This commit is contained in:
Ronald Q
2019-07-11 11:03:09 -04:00
93 changed files with 7346 additions and 2617 deletions

View File

@@ -1735,7 +1735,7 @@ class AppCacheView extends BaseAppCacheView
$arrayAppField = $app->Load($appcvAppUid);
$appTitle = (!empty($appTitle))? $appTitle : "#" . $arrayAppField["APP_NUMBER"];
$appTitleNew = G::replaceDataField($appTitle, unserialize($arrayAppField["APP_DATA"]));
$appTitleNew = G::replaceDataField($appTitle, unserialize($arrayAppField["APP_DATA"]), 'mysql', false);
if (isset($arrayAppField["APP_TITLE"]) && $arrayAppField["APP_TITLE"] != $appTitleNew) {
//Updating the value in content, where...

View File

@@ -101,7 +101,7 @@ class AppDelay extends BaseAppDelay
*
* @return boolean
*/
public function isPaused($appUid, $delIndex)
public static function isPaused($appUid, $delIndex)
{
$criteria = new Criteria('workflow');
$criteria->add(AppDelayPeer::APP_UID, $appUid);

View File

@@ -797,7 +797,7 @@ class AppDelegation extends BaseAppDelegation
* @param integer $index, Index to review
* @return array
*/
public function getCurrentUsers($appUid, $index)
public static function getCurrentUsers($appUid, $index)
{
$oCriteria = new Criteria();
$oCriteria->addSelectColumn(AppDelegationPeer::USR_UID);

View File

@@ -145,8 +145,7 @@ class AppFolder extends BaseAppFolder
$oApplication = new Application();
$appFields = $oApplication->Load( $sessionID );
$folderPathParsed = G::replaceDataField( $folderPath, $appFields );
$folderPathParsed = G::replaceDataField( $folderPath, unserialize( $appFields['APP_DATA'] ) );
$folderPathParsed = G::replaceDataField( $folderPath, unserialize( $appFields['APP_DATA'] ), 'mysql', false );
$folderPathParsedArray = explode( "/", $folderPathParsed );
$folderRoot = "/"; //Always starting from Root
foreach ($folderPathParsedArray as $folderName) {
@@ -174,8 +173,7 @@ class AppFolder extends BaseAppFolder
$oApplication = new Application();
$appFields = $oApplication->Load( $sessionID );
$fileTagsParsed = G::replaceDataField( $fileTags, $appFields );
$fileTagsParsed = G::replaceDataField( $fileTags, unserialize( $appFields['APP_DATA'] ) );
$fileTagsParsed = G::replaceDataField( $fileTags, unserialize( $appFields['APP_DATA'] ), 'mysql', false );
return $fileTagsParsed;
}

View File

@@ -213,7 +213,7 @@ class AppNotes extends BaseAppNotes
$configNoteNotification['subject'] = G::LoadTranslation('ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION') . " @#APP_TITLE ";
//Define the body for the notification
$configNoteNotification['body'] = $this->getBodyCaseNote($authorName, $noteContent);
$body = nl2br(G::replaceDataField($configNoteNotification['body'], $fieldCase));
$body = nl2br(G::replaceDataField($configNoteNotification['body'], $fieldCase, 'mysql', false));
$users = new Users();
$recipientsArray = explode(",", $noteRecipients);
@@ -229,7 +229,7 @@ class AppNotes extends BaseAppNotes
$appUid,
$delIndex,
WsBase::MESSAGE_TYPE_CASE_NOTE,
G::replaceDataField($configNoteNotification['subject'], $fieldCase),
G::replaceDataField($configNoteNotification['subject'], $fieldCase, 'mysql', false),
G::buildFrom($configuration, $from),
$to,
$body,

View File

@@ -34,7 +34,7 @@ class ListInbox extends BaseListInbox implements ListInterface
if (isset($data['APP_TITLE'])) {
$oCase = new Cases();
$aData = $oCase->loadCase($data["APP_UID"]);
$data['APP_TITLE'] = G::replaceDataField($data['APP_TITLE'], $aData['APP_DATA']);
$data['APP_TITLE'] = G::replaceDataField($data['APP_TITLE'], $aData['APP_DATA'], 'mysql', false);
}
if (!empty($data['PRO_UID']) && empty($data['PRO_ID'])) {
$p = new Process();
@@ -124,7 +124,7 @@ class ListInbox extends BaseListInbox implements ListInterface
if (isset($data['APP_TITLE'])) {
$oCase = new Cases();
$aData = $oCase->loadCase($data["APP_UID"]);
$data['APP_TITLE'] = G::replaceDataField($data['APP_TITLE'], $aData['APP_DATA']);
$data['APP_TITLE'] = G::replaceDataField($data['APP_TITLE'], $aData['APP_DATA'], 'mysql', false);
}
if ($isSelfService) {
$listParticipatedLast = new ListParticipatedLast();

View File

@@ -508,29 +508,20 @@ class OutputDocument extends BaseOutputDocument
}
}
/**
/*
* Generate the output document
*
* @param string $outDocUid
* @param array $caseFields
* @param string $path
* @param string $filename
* @param string $content
* @param bool $landscape
* @param string $typeDocsToGen
* @param array $properties
*
* @return mixed
*
* @see workflow/engine/methods/cases/cases_Step.php
* @see workflow/engine/classes/class.pmFunctions.php:PMFGenerateOutputDocument()
* @param string $sUID
* @param array $aFields
* @param string $sPath
* @return variant
*/
public function generate($outDocUid, $caseFields, $path, $filename, $content, $landscape = false, $typeDocsToGen = 'BOTH', $properties = [])
{
if (($outDocUid != '') && is_array($caseFields) && ($path != '')) {
$content = G::replaceDataGridField($content, $caseFields, true, true);
if (strpos($content, '<!---{') !== false) {
public function generate($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $sTypeDocToGener = 'BOTH', $aProperties = array())
{
if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
$sContent = G::replaceDataGridField($sContent, $aFields);
if (strpos($sContent, '<!---{') !== false) {
$template = new Smarty();
$template->compile_dir = PATH_SMARTY_C;
$template->cache_dir = PATH_SMARTY_CACHE;
@@ -538,20 +529,20 @@ class OutputDocument extends BaseOutputDocument
$template->caching = false;
$template->left_delimiter = '<!---{';
$template->right_delimiter = '}--->';
$fp = fopen($path . $filename . '_smarty.html', 'wb');
fwrite($fp, $content);
fclose($fp);
$template->templateFile = $path . $filename . '_smarty.html';
$oFile = fopen($sPath . $sFilename . '_smarty.html', 'wb');
fwrite($oFile, $sContent);
fclose($oFile);
$template->templateFile = $sPath . $sFilename . '_smarty.html';
//assign the variables and use the template $template
$template->assign($caseFields);
$content = $template->fetch($template->templateFile);
$template->assign($aFields);
$sContent = $template->fetch($template->templateFile);
unlink($template->templateFile);
}
G::verifyPath($path, true);
G::verifyPath($sPath, true);
//Start - Create .doc
$fp = fopen($path . $filename . '.doc', 'wb');
$oFile = fopen($sPath . $sFilename . '.doc', 'wb');
$size = [];
$size["Letter"] = "216mm 279mm";
@@ -575,7 +566,6 @@ class OutputDocument extends BaseOutputDocument
$size["Screenshot800"] = "800mm 600mm";
$size["Screenshot1024"] = "1024mm 768mm";
$sizeLandscape = [];
$sizeLandscape["Letter"] = "279mm 216mm";
$sizeLandscape["Legal"] = "357mm 216mm";
$sizeLandscape["Executive"] = "267mm 184mm";
@@ -597,41 +587,41 @@ class OutputDocument extends BaseOutputDocument
$sizeLandscape["Screenshot800"] = "600mm 800mm";
$sizeLandscape["Screenshot1024"] = "768mm 1024mm";
if (!isset($properties['media'])) {
$properties['media'] = 'Letter';
if (!isset($aProperties['media'])) {
$aProperties['media'] = 'Letter';
}
if ($landscape) {
$media = $sizeLandscape[$properties['media']];
if ($sLandscape) {
$media = $sizeLandscape[$aProperties['media']];
} else {
$media = $size[$properties['media']];
$media = $size[$aProperties['media']];
}
$marginLeft = '15';
if (isset($properties['margins']['left'])) {
$marginLeft = $properties['margins']['left'];
if (isset($aProperties['margins']['left'])) {
$marginLeft = $aProperties['margins']['left'];
}
$marginRight = '15';
if (isset($properties['margins']['right'])) {
$marginRight = $properties['margins']['right'];
if (isset($aProperties['margins']['right'])) {
$marginRight = $aProperties['margins']['right'];
}
$marginTop = '15';
if (isset($properties['margins']['top'])) {
$marginTop = $properties['margins']['top'];
if (isset($aProperties['margins']['top'])) {
$marginTop = $aProperties['margins']['top'];
}
$marginBottom = '15';
if (isset($properties['margins']['bottom'])) {
$marginBottom = $properties['margins']['bottom'];
if (isset($aProperties['margins']['bottom'])) {
$marginBottom = $aProperties['margins']['bottom'];
}
fwrite($fp, '<html xmlns:v="urn:schemas-microsoft-com:vml"
fwrite($oFile, '<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
@@ -677,31 +667,31 @@ class OutputDocument extends BaseOutputDocument
<body>
<div class=WordSection1>');
fwrite($fp, $content);
fwrite($fp, "\n</div></body></html>\n\n");
fclose($fp);
fwrite($oFile, $sContent);
fwrite($oFile, "\n</div></body></html>\n\n");
fclose($oFile);
/* End - Create .doc */
if ($typeDocsToGen == 'BOTH' || $typeDocsToGen == 'PDF') {
$fp = fopen($path . $filename . '.html', 'wb');
fwrite($fp, $content);
fclose($fp);
if ($sTypeDocToGener == 'BOTH' || $sTypeDocToGener == 'PDF') {
$oFile = fopen($sPath . $sFilename . '.html', 'wb');
fwrite($oFile, $sContent);
fclose($oFile);
/* Start - Create .pdf */
if (isset($properties['report_generator'])) {
switch ($properties['report_generator']) {
if (isset($aProperties['report_generator'])) {
switch ($aProperties['report_generator']) {
case 'TCPDF':
$this->generateTcpdf($outDocUid, $caseFields, $path, $filename, $content, $landscape, $properties);
$this->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
break;
case 'HTML2PDF':
default:
$this->generateHtml2ps_pdf($outDocUid, $caseFields, $path, $filename, $content, $landscape, $properties);
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
break;
}
} else {
$this->generateHtml2ps_pdf($outDocUid, $caseFields, $path, $filename, $content, $landscape, $properties);
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
}
}
//end if $typeDocsToGen
//end if $sTypeDocToGener
/* End - Create .pdf */
} else {
return PEAR::raiseError(

View File

@@ -746,7 +746,13 @@ class Process extends BaseProcess
return $aProcesses;
}
public function getCasesCountForProcess($pro_uid)
/**
* This returns the number of cases for the process.
* @param string $pro_uid
* @return integer
* @see ProcessMaker\Project\Bpmn::canRemove()
*/
public static function getCasesCountForProcess($pro_uid)
{
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('COUNT(*) AS TOTAL_CASES');