Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-2039

This commit is contained in:
Victor Saisa Lopez
2015-04-15 15:05:17 -04:00
28 changed files with 581 additions and 692 deletions

View File

@@ -224,7 +224,8 @@ class FilesManager
$oProcessFiles->setPrfCreateDate($sDate);
$oProcessFiles->save();
$fp = fopen($sDirectory, 'w');
$content = $aData['prf_content'];
$content = stripslashes($aData['prf_content']);
$content = str_replace("@amp@", "&", $content);
fwrite($fp, $content);
fclose($fp);
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
@@ -372,7 +373,8 @@ class FilesManager
$oProcessFiles->setPrfUpdateDate($sDate);
$oProcessFiles->save();
$fp = fopen($path, 'w');
$content = $aData['prf_content'];
$content = stripslashes($aData['prf_content']);
$content = str_replace("@amp@", "&", $content);
fwrite($fp, $content);
fclose($fp);
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),

View File

@@ -333,6 +333,8 @@ class OutputDocument
$oOutputDocument->setOutDocFilename($outputDocumentData['OUT_DOC_FILENAME']);
}
if (isset($outputDocumentData['OUT_DOC_TEMPLATE'])) {
$outputDocumentData['OUT_DOC_TEMPLATE'] = stripslashes($outputDocumentData['OUT_DOC_TEMPLATE']);
$outputDocumentData['OUT_DOC_TEMPLATE'] = str_replace("@amp@", "&", $outputDocumentData['OUT_DOC_TEMPLATE']);
$oOutputDocument->setOutDocTemplate($outputDocumentData['OUT_DOC_TEMPLATE']);
}
$oOutputDocument->save();

View File

@@ -384,18 +384,20 @@ class Task
$result = $task->update($arrayProperty);
if (!empty($arrayProperty['CONSOLIDATE_DATA'])) {
G::LoadClass("consolidatedCases");
$consolidated = new \ConsolidatedCases();
$dataConso = array(
'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],
'tas_uid' => $arrayProperty['TAS_UID'],
'dyn_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'],
'pro_uid' => $arrayProperty['PRO_UID'],
'rep_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_report_table'],
'table_name' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_table'],
'title' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_title']
);
$consolidated->saveConsolidated($dataConso);
if (isset($arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'])) {
G::LoadClass("consolidatedCases");
$consolidated = new \ConsolidatedCases();
$dataConso = array(
'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],
'tas_uid' => $arrayProperty['TAS_UID'],
'dyn_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'],
'pro_uid' => $arrayProperty['PRO_UID'],
'rep_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_report_table'],
'table_name' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_table'],
'title' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_title']
);
$consolidated->saveConsolidated($dataConso);
}
}
$arrayResult["status"] = "OK";

View File

@@ -395,17 +395,16 @@ class WebEntry
$fileContent .= "\$_SESSION[\"PROCESS\"] = \"" . $processUid . "\";\n";
$fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n";
$fileContent .= "\$G_PUBLISH = new Publisher();\n";
$fileContent .= "G::LoadClass('pmDynaform');\n";
$fileContent .= "\$a = new pmDynaform(array('CURRENT_DYNAFORM'=>'" . $arrayWebEntryData["DYN_UID"] . "'));\n";
$fileContent .= "if(\$a->isResponsive()){";
$fileContent .= "\$a->printWebEntry('".$fileName."Post.php');";
$fileContent .= "}else {";
$fileContent .= "\$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . "/" . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
$fileContent .= "G::RenderPage(\"publish\", \"blank\");";
$fileContent .= "}";
$fileContent .= "G::LoadClass(\"pmDynaform\");\n";
$fileContent .= "\$a = new pmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $arrayWebEntryData["DYN_UID"] . "\"));\n";
$fileContent .= "if (\$a->isResponsive()) {";
$fileContent .= " \$a->printWebEntry(\"" . $fileName . "Post.php\");";
$fileContent .= "} else {";
$fileContent .= " \$G_PUBLISH->AddContent(\"dynaform\", \"xmlform\", \"" . $processUid . PATH_SEP . $dynaFormUid . "\", \"\", array(), \"" . $fileName . "Post.php\");\n";
$fileContent .= " G::RenderPage(\"publish\", \"blank\");";
$fileContent .= "}";
file_put_contents($pathDataPublicProcess . PATH_SEP . $fileName . ".php", $fileContent);
//Creating the second file, the post file who receive the post form.
@@ -442,7 +441,7 @@ class WebEntry
//Creating the third file, only if this wsClient.php file doesn't exist.
$fileName = $pathDataPublicProcess . PATH_SEP . "wsClient.php";
$pluginTpl = PATH_TEST . "unit" . PATH_SEP . "ws" . PATH_SEP . "wsClient.php";
$pluginTpl = PATH_CORE . "templates" . PATH_SEP . "processes" . PATH_SEP . "wsClient.php";
if (file_exists($fileName)) {
if (filesize($fileName) != filesize($pluginTpl)) {

View File

@@ -119,14 +119,16 @@ class Activity extends Api
$task = new \ProcessMaker\BusinessModel\Task();
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
/*----------------------------------********---------------------------------*/
/*----------------------------------********---------------------------------*/
if (\PMLicensedFeatures
::getSingleton()
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
if (isset($request_data['properties']['_features'])) {
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
}
}
/*----------------------------------********---------------------------------*/
/*----------------------------------********---------------------------------*/
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}