Merge remote-tracking branch 'upstream/3.0.1.8' into 3.0.1.7-Gmail

This commit is contained in:
Dante
2016-03-22 09:09:59 -04:00
47 changed files with 4102 additions and 2567 deletions

View File

@@ -193,7 +193,7 @@ class actionsByEmailCoreClass extends PMPlugin
if(isset($variables['items'][0]['items'])){
$fields = $variables['items'][0]['items'];
foreach ($fields as $key => $value) {
foreach($value as $var){ G::pr($var);
foreach($value as $var){
if(isset($var['variable'])){
if ($var['variable'] == $actionField) {
$field->label = $var['label'];

View File

@@ -258,6 +258,7 @@ class Cases
$c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(ProcessPeer::PRO_SUBPROCESS, '0');
$c->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$c->add(TaskPeer::TAS_START, 'TRUE');
$c->add(TaskUserPeer::USR_UID, $sUIDUser);

View File

@@ -653,7 +653,7 @@ class indicatorsCalculator
G::loadClass('wsTools');
$currentWS = defined('SYS_SYS') ? SYS_SYS : 'Wokspace Undefined';
$workSpace = new workspaceTools($currentWS);
$arrayHost = split(":", $workSpace->dbHost);
$arrayHost = explode(':', $workSpace->dbHost);
$host = "host=".$arrayHost[0];
$port = count($arrayHost) > 1 ? ";port=".$arrayHost[1] : "";
$db = ";dbname=".$workSpace->dbName;

View File

@@ -115,7 +115,9 @@ class pmDynaform
$flagTrackerUser = false;
if (!isset($_SESSION['USER_LOGGED'])) {
if (!preg_match("/^.*\/" . SYS_SKIN . "\/tracker\/.*$/", $_SERVER["REQUEST_URI"])) {
if (!preg_match("/^.*\/" . SYS_SKIN . "\/tracker\/.*$/", $_SERVER["REQUEST_URI"]) &&
!preg_match("/^.*\/" . SYS_SKIN . "\/[a-z0-9A-Z]+\/[a-z0-9A-Z]+\.php$/", $_SERVER["REQUEST_URI"])
) {
return;
}
@@ -415,6 +417,7 @@ class pmDynaform
$oCriteria->add(AppDocumentPeer::APP_UID, $this->fields["APP_DATA"]["APPLICATION"]);
$oCriteria->add(AppDocumentPeer::APP_DOC_FIELDNAME, $json->name);
$oCriteria->add(ContentPeer::CON_CATEGORY, 'APP_DOC_FILENAME');
$oCriteria->add(ContentPeer::CON_LANG, $this->lang);
$rs = AppDocumentPeer::doSelectRS($oCriteria);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$links = array();
@@ -1529,7 +1532,7 @@ class pmDynaform
'scope' => implode(' ', $oauthServer->getScope())
));
$response = $oauthServer->postAuthorize($authorize, $userId, true);
$response = $oauthServer->postAuthorize($authorize, $userId, true, array('USER_LOGGED' => $_SESSION['USER_LOGGED']));
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=') + 5, 40);
return $code;

View File

@@ -245,7 +245,11 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
G::loadClass('system');
$blackList = System::getQueryBlackList();
$aListQueries = explode('|', $blackList['queries']);
$aListAllTables = explode('|', $blackList['tables'].$blackList['pmtables']);
$aListAllTables = explode(
'|',
((isset($blackList['tables']))? $blackList['tables'] : '') .
((isset($blackList['pmtables']))? $blackList['pmtables'] : '')
);
$parseSqlStm = new PHPSQLParser($SqlStatement);
try {
//Parsing queries and check the blacklist

View File

@@ -104,6 +104,7 @@ class AppCacheView extends BaseAppCacheView
$criteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
$criteria->addSelectColumn(AppCacheViewPeer::PRO_UID);
$criteria->addSelectColumn(AppCacheViewPeer::DEL_RISK_DATE);
$criteria->add(AppCacheViewPeer::APP_STATUS, "TO_DO", CRITERIA::EQUAL);

View File

@@ -67,7 +67,7 @@ class Language extends BaseLanguage
public function findById ($LAN_ID)
{
if (strpos($LAN_ID, '_') !== false) {
$aux = split('_', $LAN_ID);
$aux = explode('_', $LAN_ID);
$LAN_ID = $aux[0];
}
$oCriteria = new Criteria( 'workflow' );

View File

@@ -520,6 +520,7 @@ class ListInbox extends BaseListInbox
$criteria->addSelectColumn(ListInboxPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListInboxPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListInboxPeer::DEL_PRIORITY);
$criteria->addSelectColumn(ListInboxPeer::DEL_RISK_DATE);
$criteria->addSelectColumn(UsersPeer::USR_UID);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);

4
workflow/engine/content/languages/translation.en Executable file → Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: ProcessMaker (Branch 3.0.1.7)\n"
"Project-Id-Version: ProcessMaker (Branch 3.0.1.8)\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2015-12-10 16:08:31\n"
"PO-Revision-Date: 2016-03-18 20:11:58\n"
"Last-Translator: \n"
"Language-Team: Colosa Developers Team <developers@colosa.com>\n"
"MIME-Version: 1.0\n"
@@ -11086,8 +11086,8 @@ msgstr "File \"{0}\" imported successfully."
# TRANSLATION
# LABEL/ID_PMTABLE_IMPORT_WITH_ERRORS
#: LABEL/ID_PMTABLE_IMPORT_WITH_ERRORS
msgid "File \"{0}\" imported but with errors."
msgstr "File \"{0}\" imported but with errors."
msgid "File \"{0}\" imported but with errors:"
msgstr "File \"{0}\" imported but with errors:"
# TRANSLATION
# LABEL/DBS_NAME
@@ -16168,8 +16168,8 @@ msgstr "The output with {0}: '{1}' does not exist."
# TRANSLATION
# LABEL/ID_PROCESS_NOT_EXIST
#: LABEL/ID_PROCESS_NOT_EXIST
msgid "The process with {0}: '{1}' does not exist."
msgstr "The process with {0}: '{1}' does not exist."
msgid "The report table '{0}' is related to a process not present in the workspace, import the related process first. To relate the report table to other process, open the process in the designer and import from there. The report table can't be imported."
msgstr "The report table '{0}' is related to a process not present in the workspace, import the related process first. To relate the report table to other process, open the process in the designer and import from there. The report table can't be imported."
# TRANSLATION
# LABEL/ID_PROJECT_NOT_EXIST
@@ -18916,8 +18916,8 @@ msgstr "Grid Variables"
# TRANSLATION
# LABEL/ID_OVERWRITE_PMTABLE
#: LABEL/ID_OVERWRITE_PMTABLE
msgid "The table name already exists, do you wish overwrite it?"
msgstr "The table name already exists, do you wish overwrite it?"
msgid "The PMTable '{0}' already exists in the workspace, what do you want to do?"
msgstr "The PMTable '{0}' already exists in the workspace, what do you want to do?"
# TRANSLATION
# LABEL/ID_NO_RELATED_PROCESS
@@ -18928,14 +18928,14 @@ msgstr "The related process does not exists"
# TRANSLATION
# LABEL/ID_OVERWRITE_RELATED_PROCESS
#: LABEL/ID_OVERWRITE_RELATED_PROCESS
msgid "The related process does not exists, do you wish relate it with the current process?"
msgstr "The related process does not exists, do you wish relate it with the current process?"
msgid "The report table '{0}' that you want to import is related to other process, what do you want to do?"
msgstr "The report table '{0}' that you want to import is related to other process, what do you want to do?"
# TRANSLATION
# LABEL/ID_ALREADY_RELATED_TABLE
#: LABEL/ID_ALREADY_RELATED_TABLE
msgid "The table is already related to another process, it won't be imported"
msgstr "The table is already related to another process, it won't be imported"
msgid "The table is already related with the '{0}' process, do you want to continue? (Note: The table will be imported to the original process)."
msgstr "The table is already related with the '{0}' process, do you want to continue? (Note: The table will be imported to the original process)."
# TRANSLATION
# LABEL/ID_DASH_COMPARE_INIT_PERIOD
@@ -18958,8 +18958,8 @@ msgstr "Supervisor does not have a permission for Dynaform(s)."
# TRANSLATION
# LABEL/ID_NO_REPORT_TABLE
#: LABEL/ID_NO_REPORT_TABLE
msgid "The table that you trying to import is not a report table"
msgstr "The table that you trying to import is not a report table"
msgid "The table '{0}' that you trying to import is not a report table."
msgstr "The table '{0}' that you trying to import is not a report table."
# TRANSLATION
# LABEL/ID_TASK_OVERDUE
@@ -24136,14 +24136,14 @@ msgstr "Service Account Certificate"
# TRANSLATION
# LABEL/ID_PMG_TYPE_ACCEPT
#: LABEL/ID_PMG_TYPE_ACCEPT
msgid "Only accepts files in format P12"
msgstr "Only accepts files in format P12"
msgid "Only accepts files in format json"
msgstr "Only accepts files in format json"
# TRANSLATION
# LABEL/ID_PMG_SELECT_FILE
#: LABEL/ID_PMG_SELECT_FILE
msgid "Please select a P12 file to upload"
msgstr "Please select a P12 file to upload"
msgid "Please select a json file to upload"
msgstr "Please select a json file to upload"
# TRANSLATION
# LABEL/ID_PMGMAIL
@@ -26755,6 +26755,418 @@ msgstr "There are problems removing task"
msgid "Invalid operation, please delete elements individually"
msgstr "Invalid operation, please delete elements individually"
# TRANSLATION
# LABEL/ID_CASES1
#: LABEL/ID_CASES1
msgid "[LABEL/ID_CASES1] Cases"
msgstr "Cases"
# TRANSLATION
# LABEL/ID_QUOTA_TYPE
#: LABEL/ID_QUOTA_TYPE
msgid "Quota type"
msgstr "Quota type"
# TRANSLATION
# LABEL/ID_QUOTA_TOTAL
#: LABEL/ID_QUOTA_TOTAL
msgid "Quota total"
msgstr "Quota total"
# TRANSLATION
# LABEL/ID_QUOTA_USED
#: LABEL/ID_QUOTA_USED
msgid "Quota used"
msgstr "Quota used"
# TRANSLATION
# LABEL/ID_MAFE_03de5d2d75b7dd914fbc5c775bf21b63
#: LABEL/ID_MAFE_03de5d2d75b7dd914fbc5c775bf21b63
msgid "Input Document<span style='color:red;'>*</span>:"
msgstr "Input Document<span style='color:red;'>*</span>:"
# TRANSLATION
# LABEL/ID_MAFE_99493c187e709deb387b6ee3ec6c8179
#: LABEL/ID_MAFE_99493c187e709deb387b6ee3ec6c8179
msgid "The input document is required, please select the value."
msgstr "The input document is required, please select the value."
# TRANSLATION
# LABEL/ID_GOOGLEINTEGRATION
#: LABEL/ID_GOOGLEINTEGRATION
msgid "Google Integration"
msgstr "Google Integration"
# TRANSLATION
# LABEL/ID_PMGMAIL_DISABLE
#: LABEL/ID_PMGMAIL_DISABLE
msgid "Are you sure to disable the Gmail Integration? If you do this, all the mails and relabelling sent to Gmail will be disabled."
msgstr "Are you sure to disable the Gmail Integration? If you do this, all the mails and relabelling sent to Gmail will be disabled."
# TRANSLATION
# LABEL/ID_PMDRIVE_DISABLE
#: LABEL/ID_PMDRIVE_DISABLE
msgid "Are you sure to disable the Google Drive Integration? If you do this, the input, output and file documents will be stored only in your ProcessMaker server."
msgstr "Are you sure to disable the Google Drive Integration? If you do this, the input, output and file documents will be stored only in your ProcessMaker server."
# TRANSLATION
# LABEL/ID_GMAIL_HELP_ENABLE
#: LABEL/ID_GMAIL_HELP_ENABLE
msgid "Enabling this option, users will be able to use the Gmail extension that allows to interact with Processamaker from the urser's Gmail web page."
msgstr "Enabling this option, users will be able to use the Gmail extension that allows to interact with Processamaker from the urser's Gmail web page."
# TRANSLATION
# LABEL/ID_DRIVE_HELP_ENABLE
#: LABEL/ID_DRIVE_HELP_ENABLE
msgid "Enabling this option will allow to store all input, output and attached documents generated in your processes in Google Drive."
msgstr "Enabling this option will allow to store all input, output and attached documents generated in your processes in Google Drive."
# TRANSLATION
# LABEL/ID_ENABLE_PMDRIVE
#: LABEL/ID_ENABLE_PMDRIVE
msgid "Enable Google Drive."
msgstr "Enable Google Drive."
# TRANSLATION
# LABEL/ID_GOOGLE_CERTIFICATE_ERROR
#: LABEL/ID_GOOGLE_CERTIFICATE_ERROR
msgid "Google's JSON account certificate does not exist. Please contact the system administrator."
msgstr "Google's JSON account certificate does not exist. Please contact the system administrator."
# TRANSLATION
# LABEL/ID_ACTIONS_BY_EMAIL_LOG
#: LABEL/ID_ACTIONS_BY_EMAIL_LOG
msgid "Actions By Email Log"
msgstr "Actions By Email Log"
# TRANSLATION
# LABEL/ID_MAFE_9bea7040abc67529a463697e233bcbe9
#: LABEL/ID_MAFE_9bea7040abc67529a463697e233bcbe9
msgid "The colspan change is going to remove columns and content fields. Do you want to continue?"
msgstr "The colspan change is going to remove columns and content fields. Do you want to continue?"
# TRANSLATION
# LABEL/ID_DISPATCH_PARAMS_BODY
#: LABEL/ID_DISPATCH_PARAMS_BODY
msgid "Invalid Request, multipart without body."
msgstr "Invalid Request, multipart without body."
# TRANSLATION
# LABEL/ID_DISPATCH_PARAMS_CALLS
#: LABEL/ID_DISPATCH_PARAMS_CALLS
msgid "Invalid Request, multipart body without calls."
msgstr "Invalid Request, multipart body without calls."
# TRANSLATION
# LABEL/ID_VARIABLE_ASSOCIATED_WITH_REPORT_TABLE
#: LABEL/ID_VARIABLE_ASSOCIATED_WITH_REPORT_TABLE
msgid "The variable with \"{0}\", it is associated with a report table."
msgstr "The variable with \"{0}\", it is associated with a report table."
# TRANSLATION
# LABEL/ID_USER_NOT_EXIST_DEPARTMENT
#: LABEL/ID_USER_NOT_EXIST_DEPARTMENT
msgid "The user with \"{0}\", does not exist in the Department"
msgstr "The user with \"{0}\", does not exist in the Department"
# TRANSLATION
# LABEL/ID_MAFE_fc4786f4974405965a4a00dde8d6e9f9
#: LABEL/ID_MAFE_fc4786f4974405965a4a00dde8d6e9f9
msgid "Create/Select Variable"
msgstr "Create/Select Variable"
# TRANSLATION
# LABEL/ID_PMTABLE_NOT_IMPORT_HAS_ERRORS
#: LABEL/ID_PMTABLE_NOT_IMPORT_HAS_ERRORS
msgid "File \"{0}\" was not imported has errors:"
msgstr "File \"{0}\" was not imported has errors:"
# TRANSLATION
# LABEL/ID_WARNING_PMTABLES
#: LABEL/ID_WARNING_PMTABLES
msgid "Error uploading the PM Table(s)"
msgstr "Error uploading the PM Table(s)"
# TRANSLATION
# LABEL/ID_GRID_DOES_NOT_EXIST_IN_DYNAFORM
#: LABEL/ID_GRID_DOES_NOT_EXIST_IN_DYNAFORM
msgid "The Grid with {0}: \"{1}\" does not exist in DynaForm"
msgstr "The Grid with {0}: \"{1}\" does not exist in DynaForm"
# TRANSLATION
# LABEL/ID_GRID_DOES_NOT_HAVE_FIELDS
#: LABEL/ID_GRID_DOES_NOT_HAVE_FIELDS
msgid "The Grid with {0}: \"{1}\" does not have fields defined"
msgstr "The Grid with {0}: \"{1}\" does not have fields defined"
# TRANSLATION
# LABEL/ID_GRID_FIELD_DOES_NOT_EXIST
#: LABEL/ID_GRID_FIELD_DOES_NOT_EXIST
msgid "The Field with {0}: \"{1}\" does not exist"
msgstr "The Field with {0}: \"{1}\" does not exist"
# TRANSLATION
# LABEL/ID_CASE_VARIABLE_DOES_NOT_EXIST
#: LABEL/ID_CASE_VARIABLE_DOES_NOT_EXIST
msgid "The Variable with {0}: \"{1}\" does not exist in Case"
msgstr "The Variable with {0}: \"{1}\" does not exist in Case"
# TRANSLATION
# LABEL/ID_CASE_VARIABLE_ALREADY_EXISTS
#: LABEL/ID_CASE_VARIABLE_ALREADY_EXISTS
msgid "The Variable with {0}: \"{1}\" already exists in Case"
msgstr "The Variable with {0}: \"{1}\" already exists in Case"
# TRANSLATION
# LABEL/ID_VARIABLE_NO_IS_GRID
#: LABEL/ID_VARIABLE_NO_IS_GRID
msgid "The Variable with {0}: \"{1}\" is not a grid"
msgstr "The Variable with {0}: \"{1}\" is not a grid"
# TRANSLATION
# LABEL/ID_CAPTCHA_INPUT_CODE
#: LABEL/ID_CAPTCHA_INPUT_CODE
msgid "Security Code"
msgstr "Security Code"
# TRANSLATION
# LABEL/ID_CAPTCHA_REFRESH_CODE
#: LABEL/ID_CAPTCHA_REFRESH_CODE
msgid "Click to refresh code"
msgstr "Click to refresh code"
# TRANSLATION
# LABEL/ID_CAPTCHA_CODE
#: LABEL/ID_CAPTCHA_CODE
msgid "[LABEL/ID_CAPTCHA_CODE] Code"
msgstr "Code"
# TRANSLATION
# LABEL/ID_CAPTCHA_CODE_INCORRECT
#: LABEL/ID_CAPTCHA_CODE_INCORRECT
msgid "The Captcha Code is incorrect"
msgstr "The Captcha Code is incorrect"
# TRANSLATION
# LABEL/ID_AFFECTED_GROUPS
#: LABEL/ID_AFFECTED_GROUPS
msgid "Affected Groups"
msgstr "Affected Groups"
# TRANSLATION
# LABEL/ID_SEE_FULL_LIST
#: LABEL/ID_SEE_FULL_LIST
msgid "See complete list"
msgstr "See complete list"
# TRANSLATION
# LABEL/ID_BATCH_ROUTING
#: LABEL/ID_BATCH_ROUTING
msgid "Batch Routing"
msgstr "Batch Routing"
# TRANSLATION
# LABEL/ID_CONFIRM_ROUTING
#: LABEL/ID_CONFIRM_ROUTING
msgid "Confirm Routing"
msgstr "Confirm Routing"
# TRANSLATION
# LABEL/ID_ROUTE_BATCH_ROUTING
#: LABEL/ID_ROUTE_BATCH_ROUTING
msgid "Route cases per batch?"
msgstr "Route cases per batch?"
# TRANSLATION
# LABEL/ID_SUMMARY_DERIVATION_BATCH_ROUTING
#: LABEL/ID_SUMMARY_DERIVATION_BATCH_ROUTING
msgid "Summary of Derivations"
msgstr "Summary of Derivations"
# TRANSLATION
# LABEL/ID_DERIVATION_RESULT
#: LABEL/ID_DERIVATION_RESULT
msgid "Derivation Result"
msgstr "Derivation Result"
# TRANSLATION
# LABEL/ID_CREATE_NEW_PROCESS_UID
#: LABEL/ID_CREATE_NEW_PROCESS_UID
msgid "Do you wish to create a new UID for this process?"
msgstr "Do you wish to create a new UID for this process?"
# TRANSLATION
# LABEL/ID_KEEP_PROCESS_UID
#: LABEL/ID_KEEP_PROCESS_UID
msgid "Keep imported process UID"
msgstr "Keep imported process UID"
# TRANSLATION
# LABEL/ID_OVERWRITE_RPTABLE
#: LABEL/ID_OVERWRITE_RPTABLE
msgid "The report table '{0}' already exist, what do you want to do?"
msgstr "The report table '{0}' already exist, what do you want to do?"
# TRANSLATION
# LABEL/ID_BLOCKER_MSG
#: LABEL/ID_BLOCKER_MSG
msgid "Warning: Processmaker does not permit you to open multiple tabs in the same browser session because of security restrictions.\n"
"\n"
"This page will be closed."
msgstr "Warning: Processmaker does not permit you to open multiple tabs in the same browser session because of security restrictions.\n"
"\n"
"This page will be closed."
# TRANSLATION
# LABEL/ID_THE
#: LABEL/ID_THE
msgid "The"
msgstr "The"
# TRANSLATION
# LABEL/ID_FIELD_NOT_EMPTY_OR_SPECIAL_CHAR
#: LABEL/ID_FIELD_NOT_EMPTY_OR_SPECIAL_CHAR
msgid "cannot be empty or contain special characters"
msgstr "cannot be empty or contain special characters"
# TRANSLATION
# LABEL/ID_DELETE_CASES
#: LABEL/ID_DELETE_CASES
msgid "Delete Cases"
msgstr "Delete Cases"
# TRANSLATION
# LABEL/ID_DELETE_PROCESS_CASES
#: LABEL/ID_DELETE_PROCESS_CASES
msgid "Are you sure you want to delete all the cases of the selected process(es)?"
msgstr "Are you sure you want to delete all the cases of the selected process(es)?"
# TRANSLATION
# LABEL/ID_RADIO_RELATED_PROCESS
#: LABEL/ID_RADIO_RELATED_PROCESS
msgid "Import and relate it to the current process"
msgstr "Import and relate it to the current process"
# TRANSLATION
# LABEL/ID_RADIO_NOT_IMPORTED_RPT
#: LABEL/ID_RADIO_NOT_IMPORTED_RPT
msgid "Do not import the report table"
msgstr "Do not import the report table"
# TRANSLATION
# LABEL/ID_RADIO_CREATE_NEW
#: LABEL/ID_RADIO_CREATE_NEW
msgid "Create a new copy of the Table"
msgstr "Create a new copy of the Table"
# TRANSLATION
# LABEL/ID_RADIO_OVERWRITE
#: LABEL/ID_RADIO_OVERWRITE
msgid "Overwrite the existing Table"
msgstr "Overwrite the existing Table"
# TRANSLATION
# LABEL/ID_RADIO_NOT_IMPORTED_PMT
#: LABEL/ID_RADIO_NOT_IMPORTED_PMT
msgid "Do not import the Table"
msgstr "Do not import the Table"
# TRANSLATION
# LABEL/ID_RADIO_NOT_IMPORTED
#: LABEL/ID_RADIO_NOT_IMPORTED
msgid "[LABEL/ID_RADIO_NOT_IMPORTED] Do not import the Table"
msgstr "Do not import the Table"
# TRANSLATION
# LABEL/ID_ERROR_CREATE_TABLE
#: LABEL/ID_ERROR_CREATE_TABLE
msgid "Error creating table:"
msgstr "Error creating table:"
# TRANSLATION
# LABEL/ID_CHECK
#: LABEL/ID_CHECK
msgid "Check"
msgstr "Check"
# TRANSLATION
# LABEL/ID_UNCHECK
#: LABEL/ID_UNCHECK
msgid "Uncheck"
msgstr "Uncheck"
# TRANSLATION
# LABEL/ID_MAFE_5896ecd1d83886eb157d9cbfb988f1da
#: LABEL/ID_MAFE_5896ecd1d83886eb157d9cbfb988f1da
msgid "protected value"
msgstr "protected value"
# TRANSLATION
# LABEL/ID_MAFE_1ea7e575defdf6bc3f26a3f127e98170
#: LABEL/ID_MAFE_1ea7e575defdf6bc3f26a3f127e98170
msgid "datasource"
msgstr "datasource"
# TRANSLATION
# LABEL/ID_MAFE_11e0eed8d3696c0a632f822df385ab3c
#: LABEL/ID_MAFE_11e0eed8d3696c0a632f822df385ab3c
msgid "database"
msgstr "database"
# TRANSLATION
# LABEL/ID_MAFE_c9838204ecea4595edd1ef4a76b66846
#: LABEL/ID_MAFE_c9838204ecea4595edd1ef4a76b66846
msgid "array variable"
msgstr "array variable"
# TRANSLATION
# LABEL/ID_MAFE_59d0ce20b062e00466be1ad296c22407
#: LABEL/ID_MAFE_59d0ce20b062e00466be1ad296c22407
msgid "data variable"
msgstr "data variable"
# TRANSLATION
# LABEL/ID_MAFE_e16d24cd68030dda478e6ca7151010e2
#: LABEL/ID_MAFE_e16d24cd68030dda478e6ca7151010e2
msgid "@@myData"
msgstr "@@myData"
# TRANSLATION
# LABEL/ID_MAFE_944b95760dc358a122162ce63974488a
#: LABEL/ID_MAFE_944b95760dc358a122162ce63974488a
msgid "Enter a regular expression which is a search pattern which matches the text entered in the field."
msgstr "Enter a regular expression which is a search pattern which matches the text entered in the field."
# TRANSLATION
# LABEL/ID_MAFE_8bf8bd52a2df4f9292a3a9b7c469fada
#: LABEL/ID_MAFE_8bf8bd52a2df4f9292a3a9b7c469fada
msgid "To learn more about regular expressions, see the <a href=\"http://wiki.processmaker.com/3.0/Text_and_Textarea_Controls#Validate\" target=\"_blank\">wiki</a>.<br><br>"
msgstr "To learn more about regular expressions, see the <a href=\"http://wiki.processmaker.com/3.0/Text_and_Textarea_Controls#Validate\" target=\"_blank\">wiki</a>.<br><br>"
# TRANSLATION
# LABEL/ID_MAFE_e787b4cb0cdefd8881e38a4f54305701
#: LABEL/ID_MAFE_e787b4cb0cdefd8881e38a4f54305701
msgid "Examples:<br>"
msgstr "Examples:<br>"
# TRANSLATION
# LABEL/ID_MAFE_cf9f7adb0fd03f4072c4f44f8328433f
#: LABEL/ID_MAFE_cf9f7adb0fd03f4072c4f44f8328433f
msgid "An integer"
msgstr "An integer"
# TRANSLATION
# LABEL/ID_MAFE_a1d5cbaf61c018e7d8456c66df0332c3
#: LABEL/ID_MAFE_a1d5cbaf61c018e7d8456c66df0332c3
msgid "An integer or decimal number"
msgstr "An integer or decimal number"
# TRANSLATION
# LABEL/ID_MAFE_33e7ca8872a98fe4b44833054a5ccc3e
#: LABEL/ID_MAFE_33e7ca8872a98fe4b44833054a5ccc3e
msgid "An email address"
msgstr "An email address"
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
# additionalTables/additionalTablesData.xml
#: text - ADD_TAB_NAME

View File

@@ -1139,11 +1139,13 @@ class pmTablesProxy extends HttpProxyController
$aErrors[$count]['IS_PMTABLE'] = $isPmTable;
$aErrors[$count]['PRO_UID'] = $tableProUid;
} else {
$aErrors[$count]['NAME_TABLE'] = $contentSchema['ADD_TAB_NAME'];
$aErrors[$count]['ERROR_TYPE'] = ERROR_RP_TABLES_OVERWRITE;
$aErrors[$count]['ERROR_MESS'] = G::loadTranslation('ID_OVERWRITE_RPTABLE', array($contentSchema['ADD_TAB_NAME']));
$aErrors[$count]['IS_PMTABLE'] = $isPmTable;
$aErrors[$count]['PRO_UID'] = $tableProUid;
if ($tableExists !== false && !$overWrite) {
$aErrors[$count]['NAME_TABLE'] = $contentSchema['ADD_TAB_NAME'];
$aErrors[$count]['ERROR_TYPE'] = ERROR_RP_TABLES_OVERWRITE;
$aErrors[$count]['ERROR_MESS'] = G::loadTranslation('ID_OVERWRITE_RPTABLE', array($contentSchema['ADD_TAB_NAME']));
$aErrors[$count]['IS_PMTABLE'] = $isPmTable;
$aErrors[$count]['PRO_UID'] = $tableProUid;
}
}
}
} else {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2310,7 +2310,7 @@ CREATE TABLE `LIST_PARTICIPATED_LAST`
(
`APP_UID` VARCHAR(32) default '' NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL,
`DEL_INDEX` INTEGER default NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`APP_NUMBER` INTEGER default 0 NOT NULL,
@@ -2943,7 +2943,7 @@ CREATE TABLE `GMAIL_RELABELING` (
`CURRENT_LAST_INDEX` INT(11) NOT NULL DEFAULT '0',
`UNASSIGNED` INT(11) NOT NULL DEFAULT '0',
`STATUS` VARCHAR(32) NOT NULL DEFAULT 'pending',
`MSG_ERROR` TEXT NULL,
`MSG_ERROR` MEDIUMTEXT NULL,
PRIMARY KEY (`LABELING_UID`),
KEY `indexStatus` (`STATUS`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Task to synchronize Gmail Labels';

View File

@@ -15,35 +15,31 @@ if (!isset($_REQUEST['start'])) {
//Initialize response object
$response = new stdclass();
$response->status = 'OK';
//Main switch
try {
$actionsByEmail = new \ProcessMaker\BusinessModel\ActionsByEmail();
switch ($_REQUEST['action']) {
case 'editTemplate':
$actionsByEmail->editTemplate($_REQUEST);
die();
$response = $actionsByEmail->editTemplate($_REQUEST);
break;
case 'updateTemplate':
$actionsByEmail->updateTemplate($_REQUEST);
$response = $actionsByEmail->updateTemplate($_REQUEST);
break;
case 'loadFields':
$actionsByEmail->loadFields($_REQUEST);
$response = $actionsByEmail->loadFields($_REQUEST);
break;
case 'saveConfiguration':
$actionsByEmail->saveConfiguration2($_REQUEST);
$response = $actionsByEmail->saveConfiguration2($_REQUEST);
break;
case 'loadActionByEmail':
$actionsByEmail->loadActionByEmail($_REQUEST);
$response = $actionsByEmail->loadActionByEmail($_REQUEST);
break;
case 'forwardMail':
$actionsByEmail->forwardMail($_REQUEST);
die;
$response = $actionsByEmail->forwardMail($_REQUEST);
break;
case 'viewForm':
$actionsByEmail->viewForm($_REQUEST);
die;
$response = $actionsByEmail->viewForm($_REQUEST);
break;
}
} catch (Exception $error) {

View File

@@ -68,6 +68,7 @@ $aFields = $oCase->loadCase( $sAppUid, $iDelIndex );
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = $aFields['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
/* Redirect to next step */

View File

@@ -296,7 +296,7 @@ switch ($request) {
$passwd = $_POST['password'];
$server = $_POST['host'];
$code = $_POST['codeCaptcha'];
$aServer = split(":", $server);
$aServer = explode(':', $server);
$serverName = $aServer[0];
$port = (count($aServer) > 1) ? $aServer[1] : "none";

View File

@@ -789,7 +789,7 @@ form.formDefault .content,
}
@media screen\0 {
form.formDefault .content, .pagedTableDefault {
width:450px;
}
}
.pagedTableDefault {

View File

@@ -345,6 +345,12 @@ class ActionsByEmail
return $response;
}
/**
* Forward the Mail
* @param array $arrayData
*
* @return string $message
*/
public function forwardMail(array $arrayData)
{
if (!isset($arrayData['REQ_UID'])) {
@@ -371,7 +377,7 @@ class ActionsByEmail
$criteria->addJoin(\AbeRequestsPeer::ABE_UID, \AbeConfigurationPeer::ABE_UID);
$criteria->addJoin(\AppDelegationPeer::APP_UID, \AbeRequestsPeer::APP_UID);
$criteria->addJoin(\AppDelegationPeer::DEL_INDEX, \AbeRequestsPeer::DEL_INDEX);
$resultRes = AbeRequestsPeer::doSelectRS($criteria);
$resultRes = \AbeRequestsPeer::doSelectRS($criteria);
$resultRes->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$resultRes->next();
@@ -381,37 +387,20 @@ class ActionsByEmail
if (is_null($dataRes['DEL_FINISH_DATE'])) {
\G::LoadClass('spool');
$configuration = new \Configuration();
$sDelimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria('workflow');
$criteria->add(\ConfigurationPeer::CFG_UID, 'Emails');
$criteria->add(\ConfigurationPeer::OBJ_UID, '');
$criteria->add(\ConfigurationPeer::PRO_UID, '');
$criteria->add(\ConfigurationPeer::USR_UID, '');
$criteria->add(\ConfigurationPeer::APP_UID, '');
$emailServer = new \ProcessMaker\BusinessModel\EmailServer();
$criteria = $emailServer->getEmailServerCriteria();
$rsCriteria = \EmailServerPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
if ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
if (\ConfigurationPeer::doCount($criteria) == 0) {
$configuration->create(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => '', 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
$newConfiguration = array();
} else {
$newConfiguration = $configuration->load('Emails', '', '', '', '');
if ($newConfiguration['CFG_VALUE'] != '') {
$newConfiguration = unserialize($newConfiguration['CFG_VALUE']);
} else {
$newConfiguration = array();
}
$arrayConfigAux = $row;
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
}
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \System::getEmailConfiguration();
$spool = new \spoolRun();
$spool->setConfig(array(
'MESS_ENGINE' => $newConfiguration['MESS_ENGINE'],
'MESS_SERVER' => $newConfiguration['MESS_SERVER'],
'MESS_PORT' => $newConfiguration['MESS_PORT'],
'MESS_ACCOUNT' => $newConfiguration['MESS_ACCOUNT'],
'MESS_PASSWORD' => $newConfiguration['MESS_PASSWORD'],
'SMTPAuth' => $newConfiguration['MESS_RAUTH']
));
$spool->setConfig($aSetup);
$spool->create(array(
'msg_uid' => '',
@@ -419,7 +408,7 @@ class ActionsByEmail
'del_index' => $dataRes['DEL_INDEX'],
'app_msg_type' => 'TEST',
'app_msg_subject' => $dataRes['ABE_REQ_SUBJECT'],
'app_msg_from' => $newConfiguration['MESS_ACCOUNT'],
'app_msg_from' => $aSetup['MESS_ACCOUNT'],
'app_msg_to' => $dataRes['ABE_REQ_SENT_TO'],
'app_msg_body' => $dataRes['ABE_REQ_BODY'],
'app_msg_cc' => '',
@@ -432,10 +421,10 @@ class ActionsByEmail
if ($spool->sendMail()) {
$dataRes['ABE_REQ_STATUS'] = 'SENT';
$message = G::LoadTranslation('ID_EMAIL_RESENT_TO') . ': '. $dataRes['ABE_REQ_SENT_TO'];
$message = \G::LoadTranslation('ID_EMAIL_RESENT_TO') . ': '. $dataRes['ABE_REQ_SENT_TO'];
} else {
$dataRes['ABE_REQ_STATUS'] = 'ERROR';
$message = G::LoadTranslation('ID_THERE_PROBLEM_SENDING_EMAIL') . ': '. $dataRes['ABE_REQ_SENT_TO'] . ', ' . G::LoadTranslation('ID_PLEASE_TRY_LATER');
$message = \G::LoadTranslation('ID_THERE_PROBLEM_SENDING_EMAIL') . ': '. $dataRes['ABE_REQ_SENT_TO'] . ', ' . G::LoadTranslation('ID_PLEASE_TRY_LATER');
}
try {
@@ -455,6 +444,12 @@ class ActionsByEmail
return $message;
}
/**
* Get the decision from Actions By Email and check if is Bpmn Process
* @param array $arrayData
*
* @return string $message
*/
public function viewForm(array $arrayData)
{
//coment
@@ -479,51 +474,148 @@ class ActionsByEmail
$criteria->add(\AbeRequestsPeer::ABE_REQ_UID, $arrayData['REQ_UID']);
$criteria->addJoin(\AbeRequestsPeer::ABE_UID, \AbeConfigurationPeer::ABE_UID);
$criteria->addJoin(\AbeResponsesPeer::ABE_REQ_UID, \AbeRequestsPeer::ABE_REQ_UID);
$resultRes = AbeRequestsPeer::doSelectRS($criteria);
$resultRes = \AbeRequestsPeer::doSelectRS($criteria);
$resultRes->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$resultRes->next();
$dataRes = Array();
$message = \G::LoadTranslation('ID_USER_NOT_RESPONDED_REQUEST');
if ($dataRes = $resultRes->getRow()) {
$_SESSION['CURRENT_DYN_UID'] = trim($dataRes['DYN_UID']);
$dynaform = new \Form($dataRes['PRO_UID'] . PATH_SEP . trim($dataRes['DYN_UID']), PATH_DYNAFORM, SYS_LANG, false);
$dynaform->mode = 'view';
if ($dataRes['ABE_RES_DATA'] != '') {
$value = unserialize($dataRes['ABE_RES_DATA']);
$process = new \Process();
$isBpmn = $process->isBpmnProcess($dataRes['PRO_UID']);
if($isBpmn) {
$message = $this->viewFormBpmn($dataRes);
} else {
$message = $this->viewFormClassic($dataRes);
}
}
if (is_array($value)) {
$dynaform->values = $value;
return $message;
}
foreach ($dynaform->fields as $fieldName => $field) {
if ($field->type == 'submit') {
unset($dynaform->fields[$fieldName]);
/**
* Get the decision from Actions By Email by Classic dynaform
* @param array $dataRes
*
* @return string $message
*/
public function viewFormClassic(array $dataRes)
{
$dynaform = new \Form($dataRes['PRO_UID'] . PATH_SEP . trim($dataRes['DYN_UID']), PATH_DYNAFORM, SYS_LANG, false);
$dynaform->mode = 'view';
if ($dataRes['ABE_RES_DATA'] != '') {
$value = unserialize($dataRes['ABE_RES_DATA']);
if (is_array($value)) {
$dynaform->values = $value;
foreach ($dynaform->fields as $fieldName => $field) {
if ($field->type == 'submit') {
unset($dynaform->fields[$fieldName]);
}
}
$message = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
} else {
$response = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
$field = $dynaform->fields[$dataRes['ABE_ACTION_FIELD']];
$message = '<b>Type: </b>' . $field->type . '<br>';
switch ($field->type) {
case 'dropdown':
case 'radiogroup':
$message .=$field->label . ' - ';
$message .= $field->options[$value];
break;
case 'yesno':
$message .= '<b>' . $field->label . ' </b>- ';
$message .= ($value == 1) ? G::loadTranslation('ID_YES') : G::loadTranslation('ID_NO');
break;
case 'checkbox':
$message .= '<b>' . $field->label . '</b> - ';
$message .= ($value == 'On') ? G::loadTranslation('ID_CHECK') : G::loadTranslation('ID_UNCHECK');
break;
}
}
}
//Return
return $message;
}
/**
* Get the decision from Actions By Email by BPMN dynaform
* @param array $arrayData
*
* @return string $message
*/
public function viewFormBpmn(array $dataRes)
{
$_SESSION['CURRENT_DYN_UID'] = trim($dataRes['DYN_UID']);
$configuration['DYN_UID'] = trim($dataRes['DYN_UID']);
$configuration['CURRENT_DYNAFORM'] = trim($dataRes['DYN_UID']);
$configuration['PRO_UID'] = trim($dataRes['PRO_UID']);
$criteriaD = new \Criteria();
$criteriaD->addSelectColumn(\DynaformPeer::DYN_CONTENT);
$criteriaD->addSelectColumn(\DynaformPeer::PRO_UID);
$criteriaD->add(\DynaformPeer::DYN_UID, trim($dataRes['DYN_UID']));
$resultD = \DynaformPeer::doSelectRS($criteriaD);
$resultD->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$resultD->next();
$configuration = $resultD->getRow();
\G::LoadClass('pmDynaform');
$field = new \stdClass();
$obj = new \pmDynaform($configuration);
if ($dataRes['ABE_RES_DATA'] !== '') {
$value = unserialize($dataRes['ABE_RES_DATA']);
$actionField = str_replace(array('@@','@#','@=','@%','@?','@$'), '', $dataRes['ABE_ACTION_FIELD']);
$variables = \G::json_decode($configuration['DYN_CONTENT'], true);
if (is_array($value)) {
if(isset($variables['items'][0]['items'])) {
$fields = $variables['items'][0]['items'];
}
} else {
if(isset($variables['items'][0]['items'])) {
$fields = $variables['items'][0]['items'];
foreach ($fields as $key => $row) {
foreach($row as $var) {
if(isset($var['variable'])) {
if ($var['variable'] === $actionField) {
$field->label = isset($var['label']) ? $var['label'] : '';
$field->type = isset($var['type']) ? $var['type'] : '';
$values = $var['options'];
foreach ($values as $val){
$field->options[$val['value']] = $val['value'];
}
}
}
}
}
$message = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
} else {
$response = $dynaform->render(PATH_CORE . 'templates/xmlform.html', $scriptCode);
$field = $dynaform->fields[$dataRes['ABE_ACTION_FIELD']];
$message = '<b>Type: </b>' . $field->type . '<br>';
switch ($field->type) {
case 'dropdown':
case 'radiogroup':
$message .=$field->label . ' - ';
$message .= $field->options[$value];
break;
case 'yesno':
$message .= '<b>' . $field->label . ' </b>- ';
$message .= ($value == 1) ? 'Yes' : 'No';
break;
case 'checkbox':
$message .= '<b>' . $field->label . '</b> - ';
$message .= ($value == 'On') ? 'Check' : 'Uncheck';
break;
}
}
$message = '';
switch ($field->type) {
case 'dropdown':
case 'radiogroup':
case 'radio':
$message .= $field->label . ': ';
$message .= $field->options[$value];
break;
case 'yesno':
$message .= $field->label . ': ';
$message .= ($value == 1) ? G::loadTranslation('ID_YES') : G::loadTranslation('ID_NO');
break;
case 'checkgroup':
case 'checkbox':
$message .= $field->label . ': ';
$message .= ($value == 'On') ? G::loadTranslation('ID_CHECK') : G::loadTranslation('ID_UNCHECK');
break;
}
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace ProcessMaker\BusinessModel;
class BpmnProcess
{
/**
* Update all processes data by project uid
* @param $prjUid
* @param $data
* @throws \PropelException
*/
public function updateAllProcessesByProject($prjUid, $data)
{
$oCriteria = new \Criteria();
$oCriteria->addSelectColumn(\BpmnProcessPeer::PRO_UID);
$oCriteria->add(\BpmnProcessPeer::PRJ_UID, $prjUid);
$rs = \BpmnProcessPeer::doSelectRS($oCriteria);
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
if (!empty($data['PRO_UID'])) {
unset($data['PRO_UID']);
}
while ($rs->next()) {
$row = $rs->getRow();
$project = \BpmnProcessPeer::retrieveByPK($row['PRO_UID']);
if (!empty($project)) {
$project->fromArray($data, \BasePeer::TYPE_FIELDNAME);
$project->save();
}
}
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace ProcessMaker\BusinessModel;
class BpmnProject
{
public function update($prj_uid, $data)
{
$project = \BpmnProjectPeer::retrieveByPK($prj_uid);
$project->fromArray($data, \BasePeer::TYPE_FIELDNAME);
$project->save();
}
}

View File

@@ -874,24 +874,26 @@ class EmailServer
try {
$emailServer = \EmailServerPeer::retrieveByPK($emailServerUid);
$passwd = $arrayData["MESS_PASSWORD"];
$passwdDec = \G::decrypt($passwd, "EMAILENCRYPT");
$auxPass = explode("hash:", $passwdDec);
if (isset($arrayData['MESS_PASSWORD'])) {
$passwd = $arrayData['MESS_PASSWORD'];
$passwdDec = \G::decrypt($passwd, 'EMAILENCRYPT');
$auxPass = explode('hash:', $passwdDec);
if (count($auxPass) > 1) {
if (count($auxPass) == 2) {
$passwd = $auxPass[1];
} else {
array_shift($auxPass);
$passwd = implode("", $auxPass);
if (count($auxPass) > 1) {
if (count($auxPass) == 2) {
$passwd = $auxPass[1];
} else {
array_shift($auxPass);
$passwd = implode('', $auxPass);
}
}
}
$arrayData["MESS_PASSWORD"] = $passwd;
$arrayData['MESS_PASSWORD'] = $passwd;
if ($arrayData["MESS_PASSWORD"] != "") {
$arrayData["MESS_PASSWORD"] = "hash:" . $arrayData["MESS_PASSWORD"];
$arrayData["MESS_PASSWORD"] = \G::encrypt($arrayData["MESS_PASSWORD"], "EMAILENCRYPT");
if ($arrayData['MESS_PASSWORD'] != '') {
$arrayData['MESS_PASSWORD'] = 'hash:' . $arrayData['MESS_PASSWORD'];
$arrayData['MESS_PASSWORD'] = \G::encrypt($arrayData['MESS_PASSWORD'], 'EMAILENCRYPT');
}
}
$emailServer->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);

View File

@@ -902,30 +902,29 @@ class Light
public function postUidUploadFiles($userUid, $app_uid, $request_data)
{
$response = array();
if (count( $request_data ) > 0) {
if (is_array($request_data)) {
foreach ($request_data as $k => $file) {
$indocUid = null;
$fieldName = null;
$oCase = new \Cases();
$DEL_INDEX = $oCase->getCurrentDelegation( $app_uid, $userUid );
$aFields = array (
"APP_UID" => $app_uid,
"DEL_INDEX" => $DEL_INDEX,
"USR_UID" => $userUid,
"DOC_UID" => - 1,
"APP_DOC_TYPE" => "ATTACHED",
"APP_DOC_CREATE_DATE" => date( "Y-m-d H:i:s" ),
"APP_DOC_COMMENT" => "",
"APP_DOC_TITLE" => "",
"APP_DOC_FILENAME" => $file['name'],
"APP_DOC_FIELDNAME" => $fieldName
$delIndex = $oCase->getCurrentDelegation($app_uid, $userUid);
$docUid = !empty($file['docUid']) ? $file['docUid'] : -1;
$appDocType = !empty($file['appDocType']) ? $file['appDocType'] : "ATTACHED";
$fieldName = !empty($file['fieldName']) ? $file['fieldName'] : null;
$aFields = array(
"APP_UID" => $app_uid,
"DEL_INDEX" => $delIndex,
"USR_UID" => $userUid,
"DOC_UID" => $docUid,
"APP_DOC_TYPE" => $appDocType,
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
"APP_DOC_COMMENT" => "",
"APP_DOC_TITLE" => "",
"APP_DOC_FILENAME" => $file['name'],
"APP_DOC_FIELDNAME" => $fieldName
);
$oAppDocument = new \AppDocument();
$oAppDocument->create( $aFields );
$oAppDocument->create($aFields);
$response[$k]['docVersion'] = $iDocVersion = $oAppDocument->getDocVersion();
$response[$k]['appDocUid'] = $sAppDocUid = $oAppDocument->getAppDocUid();
$response[$k]['appDocUid'] = $sAppDocUid = $oAppDocument->getAppDocUid();
}
}
return $response;

View File

@@ -562,6 +562,12 @@ class Process
$this->throwExceptionIfNotExistsUser($arrayData["PRO_CREATE_USER"], $this->arrayFieldNameForException["processCreateUser"]);
}
//Update name in table Bpmn_Project and Bpmn_Process
$oProject = new BpmnProject();
$oProject->update($processUid, array('PRJ_NAME'=>$arrayData['PRO_TITLE']));
$oProcess = new BpmnProcess();
//The relationship Bpmn_Project with Bpmn_Process is 1:n
$oProcess->updateAllProcessesByProject($processUid, array('PRO_NAME'=>$arrayData['PRO_TITLE']));
//Update
$process = new \Process();

View File

@@ -12,6 +12,11 @@ abstract class Importer
protected $filename = "";
protected $saveDir = "";
protected $metadata = array();
/**
* Title of the process before being updated/deleted.
* @var string
*/
protected $currentProcessTitle = "";
public static $affectedGroups = array();
const IMPORT_OPTION_OVERWRITE = "project.import.override";
@@ -165,7 +170,7 @@ abstract class Importer
case self::IMPORT_OPTION_OVERWRITE:
//Shouldn't generate new UID for all objects
$this->removeProject();
$name = $this->currentProcessTitle;
$generateUid = false;
break;
case self::IMPORT_OPTION_DISABLE_AND_CREATE_NEW:
@@ -278,6 +283,10 @@ abstract class Importer
public function removeProject()
{
/* @var $process \Process */
$process = new \Process();
$process->load($this->metadata["uid"]);
$this->currentProcessTitle = $process->getProTitle();
$project = \ProcessMaker\Project\Adapter\BpmnWorkflow::load($this->metadata["uid"]);
$project->remove(true, false);
}

View File

@@ -189,6 +189,7 @@ class Light extends Api
'DEL_TASK_DUE_DATE' => 'dueDate',
'DEL_INDEX' => 'delIndex',
'DEL_DELEGATE_DATE' => 'delegateDate',
'DEL_RISK_DATE' => 'delRiskDate',
'user' => array(
'USR_UID' => 'userId'
),

View File

@@ -236,10 +236,14 @@ class Server implements iAuthenticate
*
* @format JsonFormat,UploadFormat
*/
public function postAuthorize($authorize = null, $userId = null, $returnResponse = false)
public function postAuthorize($authorize = null, $userId = null, $returnResponse = false, $cacheSessionValue = array())
{
@session_start();
foreach ($cacheSessionValue as $key => $value) {
$_SESSION[$key] = $value;
}
if (! isset($_SESSION['USER_LOGGED'])) {
throw new RestException(400, "Local Authentication Error, user session is not started.");
}

View File

@@ -317,7 +317,7 @@ Ext.onReady(function () {
data: [['left', _('ID_LEFT')], ['center', _('ID_CENTER')], ['right', _('ID_RIGHT')]]
}),
valueField: 'id',
displayField: 'label',
displayField: 'label'
});
var alignComboBoxLabel = new Ext.form.ComboBox ({

View File

@@ -7,7 +7,7 @@
<div class="b"></div>
<div class="c"></div>
</div>
<div class="content" style="height: 100%;">
<div class="content" style="height: 100%;">
<table width="99%">
<tr>
<td valign='top'>
@@ -321,7 +321,7 @@
{/literal}
setNestedProperty(this, Array('disabled'), 'true');
setNestedProperty(this, Array('value'), '{$PROCESSING_MESSAGE}');
setNestedProperty(this, Array('value'), '{$PROCESSING_MESSAGE|escape:javascript}');
{literal}
return true;

View File

@@ -198,8 +198,12 @@ Ext.onReady(function(){
}
},
validator: function(v) {
return valueInputField= /^[0-9a-zA-Z\_|-]+$/.test(v)?true:false;
}
if (v != "") {
return (/^[0-9a-zA-Z\_|-]+$/.test(v))? true : false;
} else {
return true;
}
},
}
}, {
id: 'field_label',
@@ -219,8 +223,12 @@ Ext.onReady(function(){
}
},
validator: function(v) {
return valueInputField= /^[0-9a-zA-Z \|-]+$/.test(v)?true:_('ID_THE') + ' ' +_('ID_FIELD_LABEL') + ' ' + _('ID_FIELD_NOT_EMPTY_OR_SPECIAL_CHAR');
}
if (v != "") {
return (/^[0-9a-zA-Z \|-]+$/.test(v))? true : _('ID_THE') + ' ' +_('ID_FIELD_LABEL') + ' ' + _('ID_FIELD_NOT_EMPTY_OR_SPECIAL_CHAR');
} else {
return true;
}
},
}
}, {
id: 'field_type',
@@ -416,7 +424,10 @@ Ext.onReady(function(){
showTooltip: function (msg)
{
if (flagShowMessageError == 1) {
Ext.msgBoxSlider.msgTopCenter("error", _("ID_ERROR"), msg, 3);
if (msg != "" && msg != "<ul><li></li></ul>") {
Ext.msgBoxSlider.msgTopCenter("error", _("ID_ERROR"), msg, 3);
}
flagShowMessageError = 0;
}
},