Merge remote branch 'upstream/master' into PM-2104
This commit is contained in:
@@ -2133,7 +2133,7 @@ function PMFCreateUser ($userId, $password, $firstname, $lastname, $email, $role
|
|||||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFUpdateUser.28.29
|
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFUpdateUser.28.29
|
||||||
*
|
*
|
||||||
* @param string(32) | $userUid | User UID | The user UID.
|
* @param string(32) | $userUid | User UID | The user UID.
|
||||||
* @param string(32) | $userName | User ID | The username for the user.
|
* @param string(32) | $userName | Username | The username for the user.
|
||||||
* @param string(32) | $firstName=null | Firstname of the user | Optional parameter. The first name of the user, which can be up to 50 characters long.
|
* @param string(32) | $firstName=null | Firstname of the user | Optional parameter. The first name of the user, which can be up to 50 characters long.
|
||||||
* @param string(32) | $lastName=null | Lastname of the user | Optional parameter. The last name of the user, which can be up to 50 characters long.
|
* @param string(32) | $lastName=null | Lastname of the user | Optional parameter. The last name of the user, which can be up to 50 characters long.
|
||||||
* @param string(32) | $email=null | Email the user | Optional parameter. The email of the user, which can be up to 100 characters long.
|
* @param string(32) | $email=null | Email the user | Optional parameter. The email of the user, which can be up to 100 characters long.
|
||||||
|
|||||||
@@ -113,6 +113,13 @@ class workspaceTools
|
|||||||
|
|
||||||
CLI::logging("> Updating Files Manager...\n\n");
|
CLI::logging("> Updating Files Manager...\n\n");
|
||||||
$this->upgradeFilesManager($workSpace);
|
$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");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -634,7 +641,7 @@ class workspaceTools
|
|||||||
$oStatement_sleep->executeQuery();
|
$oStatement_sleep->executeQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_query = "SELECT * FROM information_schema.processlist WHERE user = SUBSTRING_INDEX(USER(),'@',1) and db = DATABASE() ORDER BY id;";
|
$sql_query = "SELECT * FROM information_schema.processlist WHERE user = SUBSTRING_INDEX(USER(),'@',1) and db = DATABASE() and time > 0 ORDER BY id;";
|
||||||
$stmt_query = $connection->createStatement();
|
$stmt_query = $connection->createStatement();
|
||||||
$rs_query = $stmt_query->executeQuery( $sql_query, ResultSet::FETCHMODE_ASSOC );
|
$rs_query = $stmt_query->executeQuery( $sql_query, ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
@@ -1853,6 +1860,9 @@ class workspaceTools
|
|||||||
*/
|
*/
|
||||||
public function migrateList ($workSpace)
|
public function migrateList ($workSpace)
|
||||||
{
|
{
|
||||||
|
if ($this->listFirstExecution('check')) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
$this->initPropel(true);
|
$this->initPropel(true);
|
||||||
$appCache = new AppCacheView();
|
$appCache = new AppCacheView();
|
||||||
G::LoadClass("case");
|
G::LoadClass("case");
|
||||||
@@ -2034,13 +2044,15 @@ class workspaceTools
|
|||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'insert':
|
case 'insert':
|
||||||
$conf = new Configuration();
|
$conf = new Configuration();
|
||||||
$data["CFG_UID"] ='MIGRATED_LIST';
|
if (!($conf->exists('MIGRATED_LIST', 'list', 'list', 'list', 'list'))) {
|
||||||
$data["OBJ_UID"] ='list';
|
$data["CFG_UID"] ='MIGRATED_LIST';
|
||||||
$data["CFG_VALUE"]='true';
|
$data["OBJ_UID"] ='list';
|
||||||
$data["PRO_UID"] ='list';
|
$data["CFG_VALUE"]='true';
|
||||||
$data["USR_UID"] ='list';
|
$data["PRO_UID"] ='list';
|
||||||
$data["APP_UID"] ='list';
|
$data["USR_UID"] ='list';
|
||||||
$conf->create($data);
|
$data["APP_UID"] ='list';
|
||||||
|
$conf->create($data);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 'check':
|
case 'check':
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ class Content extends BaseContent
|
|||||||
$workSpace = new workspaceTools( $workSpace );
|
$workSpace = new workspaceTools( $workSpace );
|
||||||
$workSpace->getDBInfo();
|
$workSpace->getDBInfo();
|
||||||
|
|
||||||
$link = mysql_pconnect( $workSpace->dbHost, $workSpace->dbUser, $workSpace->dbPass) or die( "Could not connect" );
|
$link = @mysql_pconnect( $workSpace->dbHost, $workSpace->dbUser, $workSpace->dbPass) or die( "Could not connect" );
|
||||||
|
|
||||||
mysql_select_db( $workSpace->dbName, $link );
|
mysql_select_db( $workSpace->dbName, $link );
|
||||||
mysql_query( "SET NAMES 'utf8';" );
|
mysql_query( "SET NAMES 'utf8';" );
|
||||||
|
|||||||
@@ -150,8 +150,15 @@ class InputDocument extends BaseInputDocument
|
|||||||
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
|
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
|
||||||
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
|
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
|
||||||
}
|
}
|
||||||
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
|
$inputDocMaxFileSize = "";
|
||||||
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'].", Maximum Input Document file size: ".$inputDocMaxFileSize;
|
if(!empty($aData['INP_DOC_MAX_FILESIZE'])){
|
||||||
|
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
|
||||||
|
$inputDocMaxFileSize = ", Maximum Input Document file size: ".$inputDocMaxFileSize;
|
||||||
|
}
|
||||||
|
if(!empty($aData['INP_DOC_MAX_FILESIZE'])){
|
||||||
|
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'];
|
||||||
|
}
|
||||||
|
$description .= $inputDocMaxFileSize;
|
||||||
G::auditLog("CreateInputDocument", $description);
|
G::auditLog("CreateInputDocument", $description);
|
||||||
|
|
||||||
return $aData['INP_DOC_UID'];
|
return $aData['INP_DOC_UID'];
|
||||||
@@ -217,8 +224,15 @@ class InputDocument extends BaseInputDocument
|
|||||||
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
|
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
|
||||||
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
|
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
|
||||||
}
|
}
|
||||||
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
|
$inputDocMaxFileSize = "";
|
||||||
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'].", Maximum Input Document file size: ".$inputDocMaxFileSize;
|
if(!empty($aData['INP_DOC_MAX_FILESIZE'])){
|
||||||
|
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
|
||||||
|
$inputDocMaxFileSize = ", Maximum Input Document file size: ".$inputDocMaxFileSize;
|
||||||
|
}
|
||||||
|
if(!empty($aData['INP_DOC_MAX_FILESIZE'])){
|
||||||
|
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'];
|
||||||
|
}
|
||||||
|
$description .= $inputDocMaxFileSize;
|
||||||
G::auditLog("UpdateInputDocument", $description);
|
G::auditLog("UpdateInputDocument", $description);
|
||||||
|
|
||||||
return $iResult;
|
return $iResult;
|
||||||
|
|||||||
@@ -178,7 +178,12 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
if(!empty($aData['OUT_DOC_DESCRIPTION'])){
|
if(!empty($aData['OUT_DOC_DESCRIPTION'])){
|
||||||
$description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION'];
|
$description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION'];
|
||||||
}
|
}
|
||||||
$description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR'].", Output Document to Generate: ".$aData['OUT_DOC_GENERATE'];
|
if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){
|
||||||
|
$description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR'];
|
||||||
|
}
|
||||||
|
if(!empty($aData['OUT_DOC_GENERATE'])){
|
||||||
|
$description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE'];
|
||||||
|
}
|
||||||
if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){
|
if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){
|
||||||
$pdfSecurity = 'Disabled';
|
$pdfSecurity = 'Disabled';
|
||||||
}else{
|
}else{
|
||||||
@@ -194,12 +199,14 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
if(!empty($aData['OUT_DOC_TAGS'])){
|
if(!empty($aData['OUT_DOC_TAGS'])){
|
||||||
$description .= ", Tags: ".$aData['OUT_DOC_TAGS'];
|
$description .= ", Tags: ".$aData['OUT_DOC_TAGS'];
|
||||||
}
|
}
|
||||||
if($aData['OUT_DOC_OPEN_TYPE']==0){
|
if(!empty($aData['OUT_DOC_OPEN_TYPE'])){
|
||||||
$genLink = 'Open the file';
|
if($aData['OUT_DOC_OPEN_TYPE']==0){
|
||||||
}else{
|
$genLink = 'Open the file';
|
||||||
$genLink = 'Download the file';
|
}else{
|
||||||
|
$genLink = 'Download the file';
|
||||||
|
}
|
||||||
|
$description .= ", By clicking on the generated file link: ".$genLink;
|
||||||
}
|
}
|
||||||
$description .= ", By clicking on the generated file link: ".$genLink;
|
|
||||||
G::auditLog("CreateOutputDocument", $description);
|
G::auditLog("CreateOutputDocument", $description);
|
||||||
|
|
||||||
return $aData['OUT_DOC_UID'];
|
return $aData['OUT_DOC_UID'];
|
||||||
@@ -261,7 +268,12 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
if(!empty($aData['OUT_DOC_DESCRIPTION'])){
|
if(!empty($aData['OUT_DOC_DESCRIPTION'])){
|
||||||
$description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION'];
|
$description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION'];
|
||||||
}
|
}
|
||||||
$description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR'].", Output Document to Generate: ".$aData['OUT_DOC_GENERATE'];
|
if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){
|
||||||
|
$description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR'];
|
||||||
|
}
|
||||||
|
if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){
|
||||||
|
$description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE'];
|
||||||
|
}
|
||||||
if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){
|
if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){
|
||||||
$pdfSecurity = 'Disabled';
|
$pdfSecurity = 'Disabled';
|
||||||
}else{
|
}else{
|
||||||
@@ -277,12 +289,14 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
if(!empty($aData['OUT_DOC_TAGS'])){
|
if(!empty($aData['OUT_DOC_TAGS'])){
|
||||||
$description .= ", Tags: ".$aData['OUT_DOC_TAGS'];
|
$description .= ", Tags: ".$aData['OUT_DOC_TAGS'];
|
||||||
}
|
}
|
||||||
if($aData['OUT_DOC_OPEN_TYPE']==0){
|
if(!empty($aData['OUT_DOC_OPEN_TYPE'])){
|
||||||
$genLink = 'Open the file';
|
if($aData['OUT_DOC_OPEN_TYPE']==0){
|
||||||
}else{
|
$genLink = 'Open the file';
|
||||||
$genLink = 'Download the file';
|
}else{
|
||||||
|
$genLink = 'Download the file';
|
||||||
|
}
|
||||||
|
$description .= ", By clicking on the generated file link: ".$genLink;
|
||||||
}
|
}
|
||||||
$description .= ", By clicking on the generated file link: ".$genLink;
|
|
||||||
if (isset($aData['OUT_DOC_TEMPLATE'])) {
|
if (isset($aData['OUT_DOC_TEMPLATE'])) {
|
||||||
$description .= ", [EDIT TEMPLATE]";
|
$description .= ", [EDIT TEMPLATE]";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,7 +224,8 @@ class FilesManager
|
|||||||
$oProcessFiles->setPrfCreateDate($sDate);
|
$oProcessFiles->setPrfCreateDate($sDate);
|
||||||
$oProcessFiles->save();
|
$oProcessFiles->save();
|
||||||
$fp = fopen($sDirectory, 'w');
|
$fp = fopen($sDirectory, 'w');
|
||||||
$content = $aData['prf_content'];
|
$content = stripslashes($aData['prf_content']);
|
||||||
|
$content = str_replace("@amp@", "&", $content);
|
||||||
fwrite($fp, $content);
|
fwrite($fp, $content);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
|
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
|
||||||
@@ -372,7 +373,8 @@ class FilesManager
|
|||||||
$oProcessFiles->setPrfUpdateDate($sDate);
|
$oProcessFiles->setPrfUpdateDate($sDate);
|
||||||
$oProcessFiles->save();
|
$oProcessFiles->save();
|
||||||
$fp = fopen($path, 'w');
|
$fp = fopen($path, 'w');
|
||||||
$content = $aData['prf_content'];
|
$content = stripslashes($aData['prf_content']);
|
||||||
|
$content = str_replace("@amp@", "&", $content);
|
||||||
fwrite($fp, $content);
|
fwrite($fp, $content);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
|
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
|
||||||
|
|||||||
@@ -333,6 +333,8 @@ class OutputDocument
|
|||||||
$oOutputDocument->setOutDocFilename($outputDocumentData['OUT_DOC_FILENAME']);
|
$oOutputDocument->setOutDocFilename($outputDocumentData['OUT_DOC_FILENAME']);
|
||||||
}
|
}
|
||||||
if (isset($outputDocumentData['OUT_DOC_TEMPLATE'])) {
|
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->setOutDocTemplate($outputDocumentData['OUT_DOC_TEMPLATE']);
|
||||||
}
|
}
|
||||||
$oOutputDocument->save();
|
$oOutputDocument->save();
|
||||||
|
|||||||
@@ -384,18 +384,20 @@ class Task
|
|||||||
|
|
||||||
$result = $task->update($arrayProperty);
|
$result = $task->update($arrayProperty);
|
||||||
if (!empty($arrayProperty['CONSOLIDATE_DATA'])) {
|
if (!empty($arrayProperty['CONSOLIDATE_DATA'])) {
|
||||||
G::LoadClass("consolidatedCases");
|
if (isset($arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'])) {
|
||||||
$consolidated = new \ConsolidatedCases();
|
G::LoadClass("consolidatedCases");
|
||||||
$dataConso = array(
|
$consolidated = new \ConsolidatedCases();
|
||||||
'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],
|
$dataConso = array(
|
||||||
'tas_uid' => $arrayProperty['TAS_UID'],
|
'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],
|
||||||
'dyn_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'],
|
'tas_uid' => $arrayProperty['TAS_UID'],
|
||||||
'pro_uid' => $arrayProperty['PRO_UID'],
|
'dyn_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'],
|
||||||
'rep_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_report_table'],
|
'pro_uid' => $arrayProperty['PRO_UID'],
|
||||||
'table_name' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_table'],
|
'rep_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_report_table'],
|
||||||
'title' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_title']
|
'table_name' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_table'],
|
||||||
);
|
'title' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_title']
|
||||||
$consolidated->saveConsolidated($dataConso);
|
);
|
||||||
|
$consolidated->saveConsolidated($dataConso);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$arrayResult["status"] = "OK";
|
$arrayResult["status"] = "OK";
|
||||||
|
|
||||||
|
|||||||
@@ -119,14 +119,16 @@ class Activity extends Api
|
|||||||
$task = new \ProcessMaker\BusinessModel\Task();
|
$task = new \ProcessMaker\BusinessModel\Task();
|
||||||
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
|
$properties = $task->updateProperties($prj_uid, $act_uid, $request_data);
|
||||||
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
if (\PMLicensedFeatures
|
if (\PMLicensedFeatures
|
||||||
::getSingleton()
|
::getSingleton()
|
||||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||||
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
|
if (isset($request_data['properties']['_features'])) {
|
||||||
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
|
$actionsByEmailService = new \ProcessMaker\BusinessModel\ActionsByEmail();
|
||||||
|
$actionsByEmailService->saveConfiguration($request_data['properties']['_features']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -642,9 +642,8 @@ ImportPMTableCSV = function(){
|
|||||||
waitTitle : " ",
|
waitTitle : " ",
|
||||||
success : function(o, resp){
|
success : function(o, resp){
|
||||||
w.close();
|
w.close();
|
||||||
infoGrid.store.reload();
|
|
||||||
|
|
||||||
PMExt.notify('IMPORT RESULT', resp.result.message);
|
PMExt.notify('IMPORT RESULT', resp.result.message);
|
||||||
|
setTimeout(function(){location.reload();},1500);
|
||||||
},
|
},
|
||||||
failure: function(o, resp){
|
failure: function(o, resp){
|
||||||
w.close();
|
w.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user