This commit is contained in:
Paula Quispe
2019-07-22 15:04:57 -04:00
86 changed files with 8179 additions and 3237 deletions

View File

@@ -0,0 +1,2 @@
<?php
require_once("cron.php");

View File

@@ -12,6 +12,9 @@
*/
use Illuminate\Foundation\Http\Kernel;
/*----------------------------------********---------------------------------*/
use ProcessMaker\BusinessModel\ActionsByEmail\ResponseReader;
/*----------------------------------********---------------------------------*/
require_once __DIR__ . '/../../../gulliver/system/class.g.php';
require_once __DIR__ . '/../../../bootstrap/autoload.php';
@@ -170,7 +173,8 @@ try {
} else {
eprintln('WARNING! No server info found!', 'red');
}
//load Processmaker translations
Bootstrap::LoadTranslationObject(SYS_LANG);
//DB
$phpCode = '';
@@ -280,6 +284,11 @@ try {
case 'sendnotificationscron':
sendNotifications();
break;
/*----------------------------------********---------------------------------*/
case 'actionsByEmailEmailResponse':
(new ResponseReader)->actionsByEmailEmailResponse();
break;
/*----------------------------------********---------------------------------*/
}
} catch (Exception $e) {
$token = strtotime("now");

View File

@@ -5,14 +5,16 @@ use ProcessMaker\Core\System;
CLI::taskName('upgrade');
CLI::taskDescription("Upgrade workspaces.\n\n This command should be run after upgrading ProcessMaker to a new version so that all workspaces are also upgraded to the\n new version.");
CLI::taskOpt('child', "Used by the main upgrade thread", 'child', 'child');
CLI::taskOpt('buildACV', 'If this option is enabled, the Cache View is built.', 'ACV', 'buildACV');
CLI::taskOpt('noxml', 'If this option is enabled, the XML files translation is not built.', 'NoXml', 'no-xml');
CLI::taskOpt('nomafe', 'If this option is enabled, the MAFE files translation is not built.', 'nomafe', 'no-mafe');
/*----------------------------------********---------------------------------*/
CLI::taskOpt('keep_dyn_content', "Include the DYN_CONTENT_HISTORY value. Ex: --keep_dyn_content", 'i', 'keep_dyn_content');
/*----------------------------------********---------------------------------*/
CLI::taskRun("run_upgrade");
/*----------------------------------********---------------------------------*/
CLI::taskName('unify-database');
CLI::taskDescription(
<<<EOT
@@ -34,179 +36,164 @@ CLI::taskArg('workspace');
/*----------------------------------********---------------------------------*/
CLI::taskRun("run_unify_database");
/*----------------------------------********---------------------------------*/
CLI::taskName('upgrade-query');
CLI::taskRun('runUpgradeQuery');
/**
* A version of rm_dir which does not exits on error.
* Execute the upgrade
*
* @param string $filename directory or file to remove
* @param bool $filesOnly either to remove the containing directory as well or not
* @param array $parameters
* @param array $args
*/
function rm_dir($filename, $filesOnly = false)
function run_upgrade($parameters, $args)
{
if (is_file($filename)) {
@unlink($filename) or CLI::logging(CLI::error("Could not remove file $filename")."\n");
} else {
foreach (glob("$filename/*") as $f) {
rm_dir($f);
}
if (!$filesOnly) {
@rmdir($filename) or CLI::logging(CLI::error("Could not remove directory $filename")."\n");
}
}
}
// Get values from command and arguments
$workspaces = get_workspaces_from_args($parameters);
$mainThread = $printHF = !array_key_exists('child', $args);
$updateXmlForms = !array_key_exists('noxml', $args);
$updateMafe = !array_key_exists('nomafe', $args);
$keepDynContent = false;
/*----------------------------------********---------------------------------*/
$keepDynContent = array_key_exists('keep_dyn_content', $args); //In community version this section will be removed
/*----------------------------------********---------------------------------*/
function run_upgrade($command, $args)
{
CLI::logging("UPGRADE", PROCESSMAKER_PATH . "upgrade.log");
CLI::logging("Checking files integrity...\n");
//setting flag to true to check into sysGeneric.php
$workspaces = get_workspaces_from_args($command);
$oneWorkspace = 'true';
if (count($workspaces) == 1) {
foreach ($workspaces as $index => $workspace) {
$oneWorkspace = $workspace->name;
// Initializing variables
$globalStartTime = microtime(true);
$numberOfWorkspaces = count($workspaces);
$countWorkspace = 1;
if ($printHF) {
// Set upgrade flag
if (count($workspaces) === 1) {
// For the specific workspace send in the command
G::isPMUnderUpdating(1, $workspaces[0]->name);
} else {
// For all workspaces
G::isPMUnderUpdating(1);
}
// Print information when start the upgrade process
CLI::logging('UPGRADE LOG INITIALIZED', PROCESSMAKER_PATH . 'upgrade.log');
CLI::logging("UPGRADE STARTED\n");
}
$flag = G::isPMUnderUpdating(1, $oneWorkspace);
//start to upgrade
$checksum = System::verifyChecksum();
if ($checksum === false) {
CLI::logging(CLI::error("checksum.txt not found, integrity check is not possible") . "\n");
if (!CLI::question("Integrity check failed, do you want to continue the upgrade?")) {
CLI::logging("Upgrade failed\n");
$flag = G::isPMUnderUpdating(0);
die();
}
} else {
if (!empty($checksum['missing'])) {
CLI::logging(CLI::error("The following files were not found in the installation:")."\n");
foreach ($checksum['missing'] as $missing) {
CLI::logging(" $missing\n");
foreach ($workspaces as $workspace) {
if ($mainThread) {
CLI::logging("FOLDERS AND FILES OF THE SYSTEM\n");
// Upgrade actions for global files
CLI::logging("* Start cleaning compiled folder...\n");
$start = microtime(true);
if (defined('PATH_C')) {
G::rm_dir(PATH_C);
G::mk_dir(PATH_C, 0777);
}
}
if (!empty($checksum['diff'])) {
CLI::logging(CLI::error("The following files have modifications:")."\n");
foreach ($checksum['diff'] as $diff) {
CLI::logging(" $diff\n");
CLI::logging("* End cleaning compiled folder...(Completed on " . (microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start to remove deprecated files...\n");
$start = microtime(true);
$workspace->removeDeprecatedFiles();
CLI::logging("* End to remove deprecated files...(Completed on " . (microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start checking Enterprise folder/files...\n");
$start = microtime(true);
$workspace->verifyFilesOldEnterprise();
CLI::logging("* End checking Enterprise folder/files...(Completed on " . (microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start checking framework paths...\n");
$start = microtime(true);
$workspace->checkFrameworkPaths();
CLI::logging("* End checking framework paths...(Completed on " . (microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start fixing serialized instance in serverConf.singleton file...\n");
$start = microtime(true);
$serverConf = ServerConf::getSingleton();
$serverConf->updateClassNameInFile();
CLI::logging("* End fixing serialized instance in serverConf.singleton file...(Completed on " .
(microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start the safe upgrade for javascript files cached by the browser (Maborak, ExtJs)...\n");
$start = microtime(true);
G::browserCacheFilesSetUid();
CLI::logging("* End the safe upgrade for javascript files cached by the browser (Maborak, ExtJs)...(Completed on " .
(microtime(true) - $start) . " seconds)\n");
CLI::logging("* Start to backup patch files...\n");
$arrayPatch = glob(PATH_TRUNK . 'patch-*');
if ($arrayPatch) {
foreach ($arrayPatch as $value) {
if (file_exists($value)) {
// Copy patch content
$names = pathinfo($value);
$nameFile = $names['basename'];
$contentFile = file_get_contents($value);
$contentFile = preg_replace("[\n|\r|\n\r]", '', $contentFile);
CLI::logging($contentFile . ' installed (' . $nameFile . ')', PATH_DATA . 'log/upgrades.log');
// Move patch file
$newFile = PATH_DATA . $nameFile;
G::rm_dir($newFile);
copy($value, $newFile);
G::rm_dir($value);
}
}
}
}
if (!(empty($checksum['missing']) || empty($checksum['diff']))) {
if (!CLI::question("Integrity check failed, do you want to continue the upgrade?")) {
CLI::logging("Upgrade failed\n");
$flag = G::isPMUnderUpdating(0);
die();
}
}
}
CLI::logging("Clearing cache...\n");
if (defined('PATH_C')) {
G::rm_dir(PATH_C);
G::mk_dir(PATH_C, 0777);
}
CLI::logging("* End to backup patch files...(Completed on " . (microtime(true) - $start) . " seconds)\n");
$count = count($workspaces);
$first = true;
$errors = false;
$countWorkspace = 0;
$buildCacheView = array_key_exists('buildACV', $args);
$flagUpdateXml = !array_key_exists('noxml', $args);
$optionMigrateHistoryData = [
/*----------------------------------********---------------------------------*/
'keepDynContent' => array_key_exists('keep_dyn_content', $args)
/*----------------------------------********---------------------------------*/
];
CLI::logging("* Start to backup log files...\n");
$start = microtime(true);
$workspace->backupLogFiles();
CLI::logging("* End to backup log files... (Completed on " . (microtime(true) - $start) . " seconds)\n");
foreach ($workspaces as $index => $workspace) {
if (empty(config("system.workspace"))) {
define("SYS_SYS", $workspace->name);
config(["system.workspace" => $workspace->name]);
// The previous actions should be executed only the first time
$mainThread = false;
}
if ($numberOfWorkspaces === 1) {
// Displaying information of the current workspace to upgrade
CLI::logging("UPGRADING DATABASE AND FILES OF WORKSPACE '{$workspace->name}' ($countWorkspace/$numberOfWorkspaces)\n");
if (!defined("PATH_DATA_SITE")) {
define("PATH_DATA_SITE", PATH_DATA . "sites" . PATH_SEP . config("system.workspace") . PATH_SEP);
}
// Build parameters
$arrayOptTranslation = [
'updateXml' => $updateXmlForms,
'updateMafe' => $updateMafe
];
$optionMigrateHistoryData = [
'keepDynContent' => $keepDynContent
];
if (!defined('DB_ADAPTER')) {
define('DB_ADAPTER', 'mysql');
}
try {
$countWorkspace++;
CLI::logging("Upgrading workspaces ($countWorkspace/$count): " . CLI::info($workspace->name) . "\n");
$workspace->upgrade($buildCacheView, $workspace->name, false, 'en', ['updateXml' => $flagUpdateXml, 'updateMafe' => $first], $optionMigrateHistoryData);
// Upgrade database and files from a specific workspace
$workspace->upgrade($workspace->name, SYS_LANG, $arrayOptTranslation, $optionMigrateHistoryData);
$workspace->close();
$first = false;
$flagUpdateXml = false;
} catch (Exception $e) {
CLI::logging("Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n");
$errors = true;
} else {
// Build arguments
$args = '--child';
$args .= $updateXmlForms ? '' : ' --no-xml';
$args .= $updateMafe ? '' : ' --no-mafe';
$args .= $keepDynContent ? ' --keep_dyn_content' : '';
// Build and execute command in another thread
$command = PHP_BINARY . ' processmaker upgrade ' . $args . ' ' . $workspace->name;
passthru($command);
}
// After the first execution is required set this values to false
$updateXmlForms = false;
$updateMafe = false;
// Increment workspaces counter
$countWorkspace++;
}
//Verify the information of the singleton ServConf by changing the name of the class if is required.
CLI::logging("\nCheck/Fix serialized instance in serverConf.singleton file\n\n");
$serverConf = ServerConf::getSingleton();
$serverConf->updateClassNameInFile();
if ($printHF) {
// Print information when finish the upgrade process
CLI::logging('UPGRADE FINISHED (Completed on ' . (microtime(true) - $globalStartTime) .
' seconds), ProcessMaker ' . System::getVersion() . ' installed)' . "\n\n");
// SAVE Upgrades/Patches
$arrayPatch = glob(PATH_TRUNK . 'patch-*');
if ($arrayPatch) {
foreach ($arrayPatch as $value) {
if (file_exists($value)) {
// copy content the patch
$names = pathinfo($value);
$nameFile = $names['basename'];
$contentFile = file_get_contents($value);
$contentFile = preg_replace("[\n|\r|\n\r]", '', $contentFile);
CLI::logging($contentFile . ' installed (' . $nameFile . ')', PATH_DATA . 'log/upgrades.log');
// move file of patch
$newFile = PATH_DATA . $nameFile;
G::rm_dir($newFile);
copy($value, $newFile);
G::rm_dir($value);
}
}
} else {
CLI::logging('ProcessMaker ' . System::getVersion(). ' installed', PATH_DATA . 'log/upgrades.log');
// Delete upgrade flag
G::isPMUnderUpdating(0);
}
//Safe upgrade for JavaScript files
CLI::logging("\nSafe upgrade for files cached by the browser\n\n");
G::browserCacheFilesSetUid();
//Status
if ($errors) {
CLI::logging("Upgrade finished but there were errors upgrading workspaces.\n");
CLI::logging(CLI::error("Please check the log above to correct any issues.") . "\n");
} else {
CLI::logging("Upgrade successful\n");
}
//setting flag to false
$flag = G::isPMUnderUpdating(0);
}
function listFiles($dir)
{
$files = array();
$lista = glob($dir.'/*');
foreach ($lista as $valor) {
if (is_dir($valor)) {
$inner_files = listFiles($valor);
if (is_array($inner_files)) {
$files = array_merge($files, $inner_files);
}
}
if (is_file($valor)) {
array_push($files, $valor);
}
}
return $files;
}
/*----------------------------------********---------------------------------*/
function run_unify_database($args)
{
@@ -314,3 +301,25 @@ function run_unify_database($args)
$flag = G::isPMUnderUpdating(0);
}
/*----------------------------------********---------------------------------*/
/**
* Execute a query, used internally for upgrade process
*
* @param array $options
*/
function runUpgradeQuery($options)
{
// Initializing variables
$workspaceName = $options[0];
$query = base64_decode($options[1]);
$isRbac = (bool)$options[2];
// Creating a new instance of the extended class
$workspace = new WorkspaceTools($workspaceName);
// Execute the query
$workspace->upgradeQuery($query, $isRbac);
// Terminate without error
exit('success');
}

View File

@@ -1,5 +1,8 @@
<?php
use ProcessMaker\Model\Process;
use ProcessMaker\Validation\MySQL57;
CLI::taskName('info');
CLI::taskDescription(<<<EOT
Print information about the current system and any specified workspaces.
@@ -103,26 +106,6 @@ EOT
CLI::taskArg('workspace', true, true);
CLI::taskRun("run_plugins_database_upgrade");
CLI::taskName('workspace-upgrade');
CLI::taskDescription(<<<EOT
Upgrade the specified workspace(s).
If no workspace is specified, the command will be run in all workspaces. More
than one workspace can be specified.
This command is a shortcut to execute all the upgrade commands for workspaces.
Upgrading a workspace will make it correspond to the current version of
ProcessMaker.
Use this command to upgrade workspaces individually, otherwise use the
'processmaker upgrade' command to upgrade the entire system.
EOT
);
CLI::taskArg('workspace-name', true, true);
CLI::taskOpt('buildACV', 'If this option is enabled, the Cache View is built.', 'ACV', 'buildACV');
CLI::taskOpt('noxml', 'If this option is enabled, the XML files translation is not built.', 'NoXml', 'no-xml');
CLI::taskRun("run_workspace_upgrade");
CLI::taskName('translation-repair');
CLI::taskDescription(<<<EOT
Upgrade or repair translations for the specified workspace(s).
@@ -372,6 +355,21 @@ EOT
);
CLI::taskRun("remove_deprecated_files");
/*********************************************************************/
CLI::taskName("check-queries-incompatibilities");
CLI::taskDescription(<<<EOT
Check queries incompatibilities (MySQL 5.7) for the specified workspace(s).
This command checks the queries incompatibilities (MySQL 5.7) in the specified workspace(s).
If no workspace is specified, the command will be run in all workspaces.
More than one workspace can be specified.
EOT
);
CLI::taskArg("workspace-name", true, true);
CLI::taskRun("run_check_queries_incompatibilities");
/*********************************************************************/
/**
* Function run_info
*
@@ -394,69 +392,6 @@ function run_info($args, $opts)
}
}
/**
* Check if we need to execute the workspace-upgrade
* If we apply the command for all workspaces, we will need to execute one by one by redefining the constants
*
* @param string $args, workspace name that we need to apply the database-upgrade
* @param string $opts, additional arguments
*
* @return void
*/
function run_workspace_upgrade($args, $opts)
{
//Read the additional parameters for this command
$parameters = '';
$parameters .= array_key_exists('buildACV', $opts) ? '--buildACV ' : '';
$parameters .= array_key_exists('noxml', $opts) ? '--no-xml ' : '';
$parameters .= array_key_exists("lang", $opts) ? 'lang=' . $opts['lang'] : 'lang=' . SYS_LANG;
//Check if the command is executed by a specific workspace
if (count($args) === 1) {
workspace_upgrade($args, $opts);
} else {
$workspaces = get_workspaces_from_args($args);
foreach ($workspaces as $workspace) {
passthru(PHP_BINARY . ' processmaker upgrade ' . $parameters . ' ' . $workspace->name);
}
}
}
/**
* This function is executed only by one workspace, for the command workspace-upgrade
*
* @param array $args, workspace name for to apply the upgrade
* @param array $opts, specify additional arguments for language, flag for buildACV, flag for noxml
*
* @return void
*/
function workspace_upgrade($args, $opts) {
$first = true;
$workspaces = get_workspaces_from_args($args);
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
$buildCacheView = array_key_exists('buildACV', $opts);
$flagUpdateXml = !array_key_exists('noxml', $opts);
$wsName = $workspaces[key($workspaces)]->name;
Bootstrap::setConstantsRelatedWs($wsName);
//Loop, read all the attributes related to the one workspace
foreach ($workspaces as $workspace) {
try {
$workspace->upgrade(
$buildCacheView,
$workspace->name,
false,
$lang,
['updateXml' => $flagUpdateXml, 'updateMafe' => $first]
);
$first = false;
$flagUpdateXml = false;
} catch (Exception $e) {
G::outRes("Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n");
}
}
}
/**
* We will upgrade the CONTENT table
* If we apply the command for all workspaces, we will need to execute one by one by redefining the constants
@@ -477,6 +412,7 @@ function run_upgrade_content($args, $opts)
}
}
}
/**
* This function will upgrade the CONTENT table for a workspace
* This function is executed only for one workspace
@@ -1102,7 +1038,7 @@ function migrate_new_cases_lists($command, $args, $opts)
foreach ($workspaces as $workspace) {
print_r("Upgrading database in " . pakeColor::colorize($workspace->name, "INFO") . "\n");
try {
$workspace->migrateList($workspace->name, true, $lang);
$workspace->migrateList(true, $lang);
echo "> List tables are done\n";
} catch (Exception $e) {
G::outRes("> Error: " . CLI::error($e->getMessage()) . "\n");
@@ -1127,17 +1063,15 @@ function migrate_counters($command, $args)
}
}
function migrate_list_unassigned($command, $args, $opts)
function migrate_list_unassigned($command, $args)
{
$filter = new InputFilter();
$opts = $filter->xssFilterHard($opts);
$args = $filter->xssFilterHard($args);
$lang = array_key_exists("lang", $opts) ? $opts['lang'] : 'en';
$workspaces = get_workspaces_from_args($args);
foreach ($workspaces as $workspace) {
print_r("Upgrading Unassigned List in" . pakeColor::colorize($workspace->name, "INFO") . "\n");
try {
$workspace->regenerateListUnassigned();
$workspace->runRegenerateListUnassigned();
echo "> Unassigned List is done\n";
} catch (Exception $e) {
G::outRes("> Error: " . CLI::error($e->getMessage()) . "\n");
@@ -1191,7 +1125,7 @@ function migrate_content($args, $opts)
foreach ($workspaces as $workspace) {
print_r('Regenerating content in: ' . pakeColor::colorize($workspace->name, 'INFO') . "\n");
CLI::logging("-> Regenerating content \n");
$workspace->migrateContentRun($workspace->name, $lang);
$workspace->migrateContentRun($lang);
}
$stop = microtime(true);
CLI::logging("<*> Optimizing content data Process took " . ($stop - $start) . " seconds.\n");
@@ -1373,3 +1307,74 @@ function remove_deprecated_files()
$workspaceTools->removeDeprecatedFiles();
CLI::logging("<*> The deprecated files has been removed. \n");
}
/**
* This function review the queries for each workspace or for an specific workspace
*
* @param array $args
*
* @return void
*/
function run_check_queries_incompatibilities($args)
{
try {
$workspaces = get_workspaces_from_args($args);
if (count($args) === 1) {
CLI::logging("> Workspace: " . $workspaces[0]->name . PHP_EOL);
check_queries_incompatibilities($workspaces[0]->name);
} else {
foreach ($workspaces as $workspace) {
passthru(PHP_BINARY . " processmaker check-queries-incompatibilities " . $workspace->name);
}
}
echo "Done!\n\n";
} catch (Exception $e) {
G::outRes(CLI::error($e->getMessage()) . "\n");
}
}
/**
* Check for the incompatibilities in the queries for the specific workspace
*
* @param string $wsName
*/
function check_queries_incompatibilities($wsName)
{
Bootstrap::setConstantsRelatedWs($wsName);
require_once(PATH_DB . $wsName . '/db.php');
System::initLaravel();
$query = Process::query()->select('PRO_UID', 'PRO_TITLE');
$processesToCheck = $query->get()->values()->toArray();
$obj = new MySQL57();
$resTriggers = $obj->checkIncompatibilityTriggers($processesToCheck);
if (!empty($resTriggers)) {
foreach ($resTriggers as $trigger) {
echo ">> The \"" . $trigger['PRO_TITLE'] . "\" process has a trigger called: \"" . $trigger['TRI_TITLE'] . "\" that contains UNION queries. Review the code to discard incompatibilities with MySQL5.7." . PHP_EOL;
}
} else {
echo ">> No MySQL 5.7 incompatibilities in triggers found for this workspace." . PHP_EOL;
}
$resDynaforms = $obj->checkIncompatibilityDynaforms($processesToCheck);
if (!empty($resDynaforms)) {
foreach ($resDynaforms as $dynaform) {
echo ">> The \"" . $dynaform['PRO_TITLE'] . "\" process has a dynaform called: \"" . $dynaform['DYN_TITLE'] . "\" that contains UNION queries. Review the code to discard incompatibilities with MySQL5.7." . PHP_EOL;
}
} else {
echo ">> No MySQL 5.7 incompatibilities in dynaforms found for this workspace." . PHP_EOL;
}
$resVariables = $obj->checkIncompatibilityVariables($processesToCheck);
if (!empty($resVariables)) {
foreach ($resVariables as $variable) {
echo ">> The \"" . $variable['PRO_TITLE'] . "\" process has a variable called: \"" . $variable['VAR_NAME'] . "\" that contains UNION queries. Review the code to discard incompatibilities with MySQL5.7." . PHP_EOL;
}
} else {
echo ">> No MySQL 5.7 incompatibilities in variables found for this workspace." . PHP_EOL;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -94,11 +94,21 @@ class MultipleFilesBackup
}
}
/* Restore from file(s) commpressed by letsBackup function, into a temporary directory
* @ filename got the name and path of the compressed file(s), if there are many files with file extention as a numerical series, the extention should be discriminated.
* @ srcWorkspace contains the workspace to be restored.
* @ dstWorkspace contains the workspace to be overwriting.
* @ overwrite got the option true if the workspace will be overwrite.
/**
* Restore from file(s) compressed by letsBackup function, into a temporary directory
*
* @param string $filename Got the name and path of the compressed file(s), if there are many files with file extention as a numerical series, the extention should be discriminated.
* @param string $srcWorkspace Contains the workspace to be restored.
* @param bool $dstWorkspace Contains the workspace to be overwriting.
* @param bool $overwrite Got the option true if the workspace will be overwrite.
*
* @throws Exception
*
* @see workflow/engine/bin/tasks/cliWorkspaces.php::run_workspace_restore()
*
* @link https://wiki.processmaker.com/3.0/Backing_up_and_Restoring_ProcessMaker#RestoringWorkspaces
*
* @deprecated Method outdated, only run the upgrade of APP_CACHE_VIEW table
*/
public static function letsRestore($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true)
{

193
workflow/engine/classes/PmDynaform.php Normal file → Executable file
View File

@@ -15,27 +15,65 @@ class PmDynaform
{
use SuggestTrait;
public static $instance = null;
public $fields = null;
public $record = null;
public $records = null;
private $cache = [];
private $context = [];
private $databaseProviders = null;
private $dataSources = null;
private $lastQueryError = null;
private $propertiesToExclude = [];
private $sysSys = null;
public $credentials = null;
public $displayMode = null;
public $fields = null;
public $isRTL = false;
public $lang = SYS_LANG;
public $langs = null;
public $displayMode = null;
public $onPropertyRead = "onPropertyReadFormInstance";
public $isRTL = false;
public $pathRTLCss = '';
public $record = null;
public $records = null;
public $serverConf = null;
private $cache = array();
private $sysSys = null;
private $context = array();
private $dataSources = null;
private $databaseProviders = null;
private $propertiesToExclude = array();
public static $prefixs = array("@@", "@#", "@%", "@?", "@$", "@=");
public static $instance = null;
public static $prefixs = ["@@", "@#", "@%", "@?", "@$", "@="];
public function __construct($fields = array())
/**
* Constructor
*
* @param array $fields
* @see workflow/engine/classes/class.pmFunctions.php PMFDynaFormFields()
* @see workflow/engine/classes/class.pmFunctions.php PMFgetLabelOption()
* @see \ConsolidatedCases->processConsolidated()
* @see \WorkspaceTools->syncFormsWithInputDocumentInfo()
* @see workflow/engine/methods/cases/ajaxListener.php Ajax->dynaformViewFromHistory()
* @see workflow/engine/methods/cases/caseConsolidated.php
* @see workflow/engine/methods/cases/cases_SaveData.php
* @see workflow/engine/methods/cases/cases_Step.php
* @see workflow/engine/methods/cases/cases_StepToRevise.php
* @see workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php
* @see workflow/engine/methods/cases/pmDynaform.php
* @see workflow/engine/methods/cases/summary.php
* @see workflow/engine/methods/services/ActionsByEmailDataForm.php
* @see workflow/engine/plugins/EnterpriseSearch/display_dynaform.php
* @see workflow/engine/plugins/EnterpriseSearch/dynaform_view1.php
* @see \ProcessMaker\BusinessModel\ActionsByEmail->viewFormBpmn()
* @see \ProcessMaker\BusinessModel\Cases->getCaseVariables()
* @see \ProcessMaker\BusinessModel\Consolidated->getDataGenerate()
* @see \ProcessMaker\BusinessModel\InputDocument->update()
* @see \ProcessMaker\BusinessModel\Light\Tracker->showObjects()
* @see \ProcessMaker\BusinessModel\Variable->delete()
* @see \ProcessMaker\BusinessModel\Variable->executeSqlControl()
* @see \ProcessMaker\BusinessModel\Variable->update()
* @see \ProcessMaker\Core\System\ActionsByEmailCoreClass->sendActionsByEmail()
* @see \ProcessMaker\Services\Api\Light->doGetDynaForm()
* @see \ProcessMaker\Services\Api\Light->doGetDynaformProcessed()
* @see \ProcessMaker\Services\Api\Light->doGetDynaForms()
* @see \ProcessMaker\Services\Api\Light->doGetDynaFormsId()
* @see \ProcessMaker\Services\Api\Project\DynaForm->doDeleteDynaFormLanguage()
* @see \ProcessMaker\Services\Api\Project\DynaForm->doGetDynaFormLanguage()
* @see \ProcessMaker\Services\Api\Project\DynaForm->doGetListDynaFormLanguage()
* @see \ProcessMaker\Services\Api\Project\DynaForm->doPostDynaFormLanguage()
*/
public function __construct($fields = [])
{
$this->sysSys = (!empty(config("system.workspace"))) ? config("system.workspace") : "Undefined";
$this->context = \Bootstrap::getDefaultContextLog();
@@ -280,16 +318,7 @@ class PmDynaform
}
}
if ($value === "suggest" && isset($json->queryField) && $json->queryField == true) {
$json->queryOutputData = array();
foreach ($json->optionsSql as $option) {
if ($json->queryFilter !== '') {
if (stripos($option->label, $json->queryFilter) !== false) {
$json->queryOutputData[] = $option;
}
} else {
$json->queryOutputData[] = $option;
}
}
$this->searchResultInDataSource($json);
}
}
}
@@ -642,6 +671,8 @@ class PmDynaform
}
$json->rows = count($rows);
$json->data = $rows;
$this->setDataSchema($json, $this->fields["APP_DATA"][$json->name]);
}
}
//languages
@@ -685,6 +716,59 @@ class PmDynaform
}
}
/**
* This function will be search in the dataSource and will be add the new row in the queryOutputData property
*
* @param object $json
*
* @return void
*/
private function searchResultInDataSource($json)
{
$json->queryOutputData = [];
foreach ($json->optionsSql as $option) {
//We will to check the limit parameter
if (count($json->queryOutputData) < $json->queryLimit) {
//Searching by filter parameter
if ($json->queryFilter !== '') {
if (stripos($option->label, $json->queryFilter) !== false) {
$json->queryOutputData[] = $option;
}
} elseif (isset($json->querySearch) && is_array($json->querySearch) && !empty($json->querySearch)) {
//Searching by query parameter
$dataSearch = $json->querySearch;
$valueAdded = false;
//The match has priority
//We will to search match in the dataSource
if (isset($dataSearch['match'])) {
$value = isset($dataSearch['match']['value']) ? $dataSearch['match']['value'] : '';
$label = isset($dataSearch['match']['text']) ? $dataSearch['match']['text'] : '';
if (!empty($value) && $option->value === $value) {
$valueAdded = true;
$json->queryOutputData[] = $option;
}
if (!empty($label) && $option->label === $label && !$valueAdded) {
$json->queryOutputData[] = $option;
}
} elseif (isset($dataSearch['term'])) {
//We will to search term in the dataSource
$value = isset($dataSearch['term']['value']) ? $dataSearch['term']['value'] : '';
$label = isset($dataSearch['term']['text']) ? $dataSearch['term']['text'] : '';
if (!empty($value) && stripos($option->value, $value) !== false) {
$valueAdded = true;
$json->queryOutputData[] = $option;
}
if (!empty($label) && stripos($option->label, $label) !== false && !$valueAdded) {
$json->queryOutputData[] = $option;
}
}
} else {
$json->queryOutputData[] = $option;
}
}
}
}
private function getValuesDependentFields($json)
{
if (!isset($this->record["DYN_CONTENT"])) {
@@ -736,6 +820,17 @@ class PmDynaform
return $data;
}
/**
* Get data from cache query.
*
* @param string $connection
* @param string $sql
* @param string $type
* @param boolean $clearCache
* @return array
* @see \PmDynaform->jsonr()
* @see \PmDynaform->getValuesDependentFields()
*/
private function getCacheQueryData($connection, $sql, $type = "", $clearCache = false)
{
$data = [];
@@ -764,6 +859,7 @@ class PmDynaform
} catch (Exception $e) {
$this->context["action"] = "execute-sql" . $type;
$this->context["exception"] = (array) $e;
$this->lastQueryError = $e;
\Bootstrap::registerMonolog("sqlExecution",
400,
"Sql Execution",
@@ -2215,6 +2311,27 @@ class PmDynaform
$googleMaps->signature = $config['google_map_signature'];
$result = 'var googleMaps = ' . G::json_encode($googleMaps) . ';';
return $result;
}
/**
* Get last query error.
*
* @return object
* @see ProcessMaker\BusinessModel\Variable->executeSqlControl()
*/
public function getLastQueryError()
{
return $this->lastQueryError;
}
/**
* Clear last query error.
*
* @see ProcessMaker\BusinessModel\Variable->executeSqlControl()
*/
public function clearLastQueryError()
{
$this->lastQueryError = null;
}
/**
@@ -2265,4 +2382,32 @@ class PmDynaform
}
return $message;
}
/**
* This adds a new definition on the json dynaform
* @param json $json
*
* @link https://wiki.processmaker.com/3.0/Grid_Control
* @see workflow/engine/classes/PmDynaform->jsonr
*/
public function setDataSchema($json, $appDataVariables)
{
foreach ($json->data as $key => $value) {
$columnsData = [];
foreach ($json->columns as $keyData => $valueData) {
foreach ($appDataVariables as $keyAppData => $valueAppData) {
if (array_key_exists($valueData->id, $valueAppData) || array_key_exists($valueData->id . "_label",
$valueAppData) || array_key_exists($valueData->name,
$valueAppData) || array_key_exists($valueData->name . "_label", $valueAppData)) {
array_push($columnsData, ["defined" => true]);
break;
} else {
array_push($columnsData, ["defined" => false]);
break;
}
}
}
$json->dataSchema[$key] = $columnsData;
}
}
}

View File

@@ -91,6 +91,26 @@ class SpoolRun
$this->appMsgUid = $v;
}
/**
* Set the $spoolId
*
* @param string
*/
public function setSpoolId($v)
{
$this->spoolId = $v;
}
/**
* Get the $spoolId
*
* @return string
*/
public function getSpoolId()
{
return $this->spoolId;
}
/**
* Get the fileData property
*
@@ -489,11 +509,13 @@ class SpoolRun
switch ($this->config['MESS_ENGINE']) {
case 'MAIL':
case 'PHPMAILER':
case 'IMAP':
switch ($this->config['MESS_ENGINE']) {
case 'MAIL':
$phpMailer = new PHPMailer();
$phpMailer->Mailer = 'mail';
break;
case 'IMAP':
case 'PHPMAILER':
$phpMailer = new PHPMailer(true);
$phpMailer->Mailer = 'smtp';
@@ -505,6 +527,7 @@ class SpoolRun
switch ($this->config['MESS_ENGINE']) {
case 'MAIL':
break;
case 'IMAP':
case 'PHPMAILER':
//Posible Options for SMTPSecure are: "", "ssl" or "tls"
if (isset($this->config['SMTPSecure']) && preg_match('/^(ssl|tls)$/', $this->config['SMTPSecure'])) {

View File

@@ -1,128 +0,0 @@
<?php
use ProcessMaker\Core\System;
class Upgrade
{
private $addon = null;
public function __construct($addon)
{
$this->addon = $addon;
}
public function install()
{
$filter = new InputFilter();
$start = microtime(1);
$filename = $this->addon->getDownloadFilename();
$time = microtime(1);
$archive = new Archive_Tar ($filename);
$time = microtime(1);
$extractDir = dirname($this->addon->getDownloadFilename()) . "/extract";
$extractDir = $filter->xssFilterHard($extractDir);
$backupDir = dirname($this->addon->getDownloadFilename()) . "/backup";
$backupDir = $filter->xssFilterHard($backupDir);
if (file_exists($extractDir)) {
G::rm_dir($extractDir);
}
if (file_exists($backupDir)) {
G::rm_dir($backupDir);
}
if (!is_dir($backupDir)) {
mkdir($backupDir);
}
$time = microtime(1);
echo "Extracting files...\n";
$archive->extractModify($extractDir, 'processmaker');
$checksumFile = file_get_contents("$extractDir/checksum.txt");
$time = microtime(1);
$checksums = array();
foreach (explode("\n", $checksumFile) as $line) {
$checksums[trim(substr($line, 33))] = substr($line, 0, 32);
}
$checksum = array();
$changedFiles = array();
$time = microtime(1);
$files = $this->ls_dir($extractDir);
echo "Updating ProcessMaker files...\n";
$time = microtime(1);
$checksumTime = 0;
foreach ($checksums as $filename => $checksum) {
if (is_dir("$extractDir/$filename")) {
$filename = $filter->xssFilterHard($filename);
print $filename;
continue;
}
$installedFile = PATH_TRUNK . "/$filename";
if (!file_exists($installedFile)) {
$installedMD5 = "";
} else {
$time = microtime(1);
$installedMD5 = G::encryptFileOld($installedFile);
$checksumTime += microtime(1) - $time;
}
$archiveMD5 = $checksum;
if (strcasecmp($archiveMD5, $installedMD5) != 0) {
$changedFiles[] = $filename;
if (!is_dir(dirname($backupDir.'/'.$filename))) {
mkdir(dirname($backupDir.'/'.$filename), 0777, true);
}
if (file_exists($installedFile) && is_file($installedFile)) {
copy($installedFile, $backupDir.'/'.$filename);
}
if (!is_dir(dirname($installedFile))) {
mkdir(dirname($installedFile), 0777, true);
}
if (!copy("$extractDir/$filename", $installedFile)) {
throw new Exception("Could not overwrite '$filename'");
}
}
}
printf("Updated %d files\n", count($changedFiles));
printf("Clearing cache...\n");
if (defined('PATH_C')) {
G::rm_dir(PATH_C);
mkdir(PATH_C, 0777, true);
}
$workspaces = System::listWorkspaces();
$count = count($workspaces);
$first = true;
$num = 0;
foreach ($workspaces as $index => $workspace) {
try {
$num += 1;
printf("Upgrading workspaces ($num/$count): {$workspace->name}\n");
$workspace->upgrade(false, config("system.workspace"), false, 'en', ['updateXml' => $first, 'updateMafe' => $first]);
$workspace->close();
$first = false;
} catch (Exception $e) {
printf("Errors upgrading workspace {$workspace->name}: {$e->getMessage()}\n");
}
}
}
private function ls_dir($dir, $basename = null)
{
$files = array();
if ($basename == null) {
$basename = $dir;
}
foreach (glob("$dir/*") as $filename) {
if (is_dir($filename)) {
$files = array_merge($files, $this->ls_dir($filename, $basename));
} else {
$files[] = substr($filename, strlen($basename) + 1);
}
}
return $files;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ use ProcessMaker\BusinessModel\EmailServer;
use ProcessMaker\ChangeLog\ChangeLog;
/*----------------------------------********---------------------------------*/
use ProcessMaker\Core\System;
use ProcessMaker\Util\WsMessageResponse;
class WsBase
{
@@ -1010,7 +1011,8 @@ class WsBase
$spool->sendMail();
if ($spool->status == 'sent') {
$result = new WsResponse(0, G::loadTranslation('ID_MESSAGE_SENT') . ": " . $to);
$result = new WsMessageResponse(0, G::loadTranslation('ID_MESSAGE_SENT') . ": " . $to);
$result->setAppMessUid($spool->getSpoolId());
} else {
$result = new WsResponse(29, $spool->status . ' ' . $spool->error . print_r($setup, 1));
}

View File

@@ -26,6 +26,7 @@ class AbeConfiguration extends BaseAbeConfiguration
'DYN_UID',
'ABE_EMAIL_FIELD',
'ABE_ACTION_FIELD',
'ABE_ACTION_BODY_FIELD',
'ABE_CASE_NOTE_IN_RESPONSE',
'ABE_FORCE_LOGIN',
'ABE_CREATE_DATE',
@@ -33,7 +34,8 @@ class AbeConfiguration extends BaseAbeConfiguration
'ABE_SUBJECT_FIELD',
'ABE_MAILSERVER_OR_MAILCURRENT',
'ABE_CUSTOM_GRID',
'ABE_EMAIL_SERVER_UID'
'ABE_EMAIL_SERVER_UID',
'ABE_EMAIL_SERVER_RECEIVER_UID'
];
public function load($abeUid)
@@ -152,6 +154,7 @@ class AbeConfiguration extends BaseAbeConfiguration
$criteria->addSelectColumn(AbeConfigurationPeer::DYN_UID);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_BODY_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_SUBJECT_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_CUSTOM_GRID);

View File

@@ -385,13 +385,7 @@ class AddonsManager extends BaseAddonsManager
$this->setState();
} else {
if ($this->getAddonType() == "core") {
$upgrade = new Upgrade($this);
$upgrade->install();
} else {
throw new Exception("Addon type {$this->getAddonType()} not supported.");
}
throw new Exception("Addon type {$this->getAddonType()} not supported.");
}
}

View File

@@ -288,7 +288,10 @@ class AppCacheView extends BaseAppCacheView
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE');
$c->add(TaskPeer::TAS_GROUP_VARIABLE, '');
$c->add(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, '')->addOr(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, null, Criteria::ISNULL))
);
$c->add(TaskUserPeer::USR_UID, $userUid);
$rs = TaskPeer::doSelectRS($c);
@@ -314,7 +317,10 @@ class AppCacheView extends BaseAppCacheView
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE');
$c->add(TaskPeer::TAS_GROUP_VARIABLE, '');
$c->add(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, '')->addOr(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, null, Criteria::ISNULL))
);
$c->add(TaskUserPeer::USR_UID, $aGroups, Criteria::IN);
$rs = TaskPeer::doSelectRS($c);

View File

@@ -199,6 +199,8 @@ class AppDelay extends BaseAppDelay
if (empty($usrUid)) {
global $RBAC;
$usrUid = $RBAC->aUserInfo['USER_INFO']['USR_UID'];
}
if (empty($usrId)) {
$u = new Users();
$usrId = $u->load($usrUid)['USR_ID'];
}

View File

@@ -300,5 +300,24 @@ class AppMessage extends BaseAppMessage
return $messages;
}
/**
* Get the APP_MSG_BODY related to the key
*
* @param string $key
*
* @return string
* @throws Exception
*/
public static function getAppMsgBodyByKey($key)
{
try {
$appMessage = AppMessagePeer::retrieveByPk($key);
return $appMessage->getAppMsgBody();
} catch (Exception $error) {
throw $error;
}
}
}

View File

@@ -398,7 +398,10 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE');
$c->add(TaskPeer::TAS_GROUP_VARIABLE, '');
$c->add(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, '')->addOr(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, null, Criteria::ISNULL))
);
$c->add(TaskUserPeer::USR_UID, $userUid);
//TU_TYPE = 2 is a AdHoc task
if (!$adHocUsers) {
@@ -430,7 +433,10 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE');
$c->add(TaskPeer::TAS_GROUP_VARIABLE, '');
$c->add(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, '')->addOr(
$c->getNewCriterion(TaskPeer::TAS_GROUP_VARIABLE, null, Criteria::ISNULL))
);
$c->add(TaskUserPeer::USR_UID, $groupsList, Criteria::IN);
//TU_TYPE = 2 is a AdHoc task
if (!$adHocUsers) {

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');

View File

@@ -83,6 +83,8 @@ class AbeConfigurationMapBuilder
$tMap->addColumn('ABE_ACTION_FIELD', 'AbeActionField', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('ABE_ACTION_BODY_FIELD', 'AbeActionBodyField', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('ABE_CASE_NOTE_IN_RESPONSE', 'AbeCaseNoteInResponse', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('ABE_FORCE_LOGIN', 'AbeForceLogin', 'int', CreoleTypes::INTEGER, false, null);
@@ -99,6 +101,8 @@ class AbeConfigurationMapBuilder
$tMap->addColumn('ABE_EMAIL_SERVER_UID', 'AbeEmailServerUid', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('ABE_EMAIL_SERVER_RECEIVER_UID', 'AbeEmailServerReceiverUid', 'string', CreoleTypes::VARCHAR, false, 32);
} // doBuild()
} // AbeConfigurationMapBuilder

View File

@@ -73,6 +73,10 @@ class EmailServerMapBuilder
$tMap->addColumn('MESS_PORT', 'MessPort', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('MESS_INCOMING_SERVER', 'MessIncomingServer', 'string', CreoleTypes::VARCHAR, true, 256);
$tMap->addColumn('MESS_INCOMING_PORT', 'MessIncomingPort', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('MESS_RAUTH', 'MessRauth', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('MESS_ACCOUNT', 'MessAccount', 'string', CreoleTypes::VARCHAR, true, 256);

View File

@@ -75,6 +75,8 @@ class UsersPropertiesMapBuilder
$tMap->addColumn('USR_SETTING_DESIGNER', 'UsrSettingDesigner', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('PMDYNAFORM_FIRST_TIME', 'PmdynaformFirstTime', 'string', CreoleTypes::CHAR, false, 1);
} // doBuild()
} // UsersPropertiesMapBuilder

View File

@@ -81,6 +81,12 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
*/
protected $abe_action_field = '';
/**
* The value for the abe_action_body_field field.
* @var string
*/
protected $abe_action_body_field = '';
/**
* The value for the abe_case_note_in_response field.
* @var int
@@ -129,6 +135,12 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
*/
protected $abe_email_server_uid = '';
/**
* The value for the abe_email_server_receiver_uid field.
* @var string
*/
protected $abe_email_server_receiver_uid = '';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -242,6 +254,17 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
return $this->abe_action_field;
}
/**
* Get the [abe_action_body_field] column value.
*
* @return string
*/
public function getAbeActionBodyField()
{
return $this->abe_action_body_field;
}
/**
* Get the [abe_case_note_in_response] column value.
*
@@ -372,6 +395,17 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
return $this->abe_email_server_uid;
}
/**
* Get the [abe_email_server_receiver_uid] column value.
*
* @return string
*/
public function getAbeEmailServerReceiverUid()
{
return $this->abe_email_server_receiver_uid;
}
/**
* Set the value of [abe_uid] column.
*
@@ -570,6 +604,28 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
} // setAbeActionField()
/**
* Set the value of [abe_action_body_field] column.
*
* @param string $v new value
* @return void
*/
public function setAbeActionBodyField($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->abe_action_body_field !== $v || $v === '') {
$this->abe_action_body_field = $v;
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_ACTION_BODY_FIELD;
}
} // setAbeActionBodyField()
/**
* Set the value of [abe_case_note_in_response] column.
*
@@ -760,6 +816,28 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
} // setAbeEmailServerUid()
/**
* Set the value of [abe_email_server_receiver_uid] column.
*
* @param string $v new value
* @return void
*/
public function setAbeEmailServerReceiverUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->abe_email_server_receiver_uid !== $v || $v === '') {
$this->abe_email_server_receiver_uid = $v;
$this->modifiedColumns[] = AbeConfigurationPeer::ABE_EMAIL_SERVER_RECEIVER_UID;
}
} // setAbeEmailServerReceiverUid()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -795,28 +873,32 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->abe_action_field = $rs->getString($startcol + 8);
$this->abe_case_note_in_response = $rs->getInt($startcol + 9);
$this->abe_action_body_field = $rs->getString($startcol + 9);
$this->abe_force_login = $rs->getInt($startcol + 10);
$this->abe_case_note_in_response = $rs->getInt($startcol + 10);
$this->abe_create_date = $rs->getTimestamp($startcol + 11, null);
$this->abe_force_login = $rs->getInt($startcol + 11);
$this->abe_update_date = $rs->getTimestamp($startcol + 12, null);
$this->abe_create_date = $rs->getTimestamp($startcol + 12, null);
$this->abe_subject_field = $rs->getString($startcol + 13);
$this->abe_update_date = $rs->getTimestamp($startcol + 13, null);
$this->abe_mailserver_or_mailcurrent = $rs->getInt($startcol + 14);
$this->abe_subject_field = $rs->getString($startcol + 14);
$this->abe_custom_grid = $rs->getString($startcol + 15);
$this->abe_mailserver_or_mailcurrent = $rs->getInt($startcol + 15);
$this->abe_email_server_uid = $rs->getString($startcol + 16);
$this->abe_custom_grid = $rs->getString($startcol + 16);
$this->abe_email_server_uid = $rs->getString($startcol + 17);
$this->abe_email_server_receiver_uid = $rs->getString($startcol + 18);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 17; // 17 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 19; // 19 = AbeConfigurationPeer::NUM_COLUMNS - AbeConfigurationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AbeConfiguration object", $e);
@@ -1048,29 +1130,35 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
return $this->getAbeActionField();
break;
case 9:
return $this->getAbeCaseNoteInResponse();
return $this->getAbeActionBodyField();
break;
case 10:
return $this->getAbeForceLogin();
return $this->getAbeCaseNoteInResponse();
break;
case 11:
return $this->getAbeCreateDate();
return $this->getAbeForceLogin();
break;
case 12:
return $this->getAbeUpdateDate();
return $this->getAbeCreateDate();
break;
case 13:
return $this->getAbeSubjectField();
return $this->getAbeUpdateDate();
break;
case 14:
return $this->getAbeMailserverOrMailcurrent();
return $this->getAbeSubjectField();
break;
case 15:
return $this->getAbeCustomGrid();
return $this->getAbeMailserverOrMailcurrent();
break;
case 16:
return $this->getAbeCustomGrid();
break;
case 17:
return $this->getAbeEmailServerUid();
break;
case 18:
return $this->getAbeEmailServerReceiverUid();
break;
default:
return null;
break;
@@ -1100,14 +1188,16 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$keys[6] => $this->getDynUid(),
$keys[7] => $this->getAbeEmailField(),
$keys[8] => $this->getAbeActionField(),
$keys[9] => $this->getAbeCaseNoteInResponse(),
$keys[10] => $this->getAbeForceLogin(),
$keys[11] => $this->getAbeCreateDate(),
$keys[12] => $this->getAbeUpdateDate(),
$keys[13] => $this->getAbeSubjectField(),
$keys[14] => $this->getAbeMailserverOrMailcurrent(),
$keys[15] => $this->getAbeCustomGrid(),
$keys[16] => $this->getAbeEmailServerUid(),
$keys[9] => $this->getAbeActionBodyField(),
$keys[10] => $this->getAbeCaseNoteInResponse(),
$keys[11] => $this->getAbeForceLogin(),
$keys[12] => $this->getAbeCreateDate(),
$keys[13] => $this->getAbeUpdateDate(),
$keys[14] => $this->getAbeSubjectField(),
$keys[15] => $this->getAbeMailserverOrMailcurrent(),
$keys[16] => $this->getAbeCustomGrid(),
$keys[17] => $this->getAbeEmailServerUid(),
$keys[18] => $this->getAbeEmailServerReceiverUid(),
);
return $result;
}
@@ -1167,29 +1257,35 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$this->setAbeActionField($value);
break;
case 9:
$this->setAbeCaseNoteInResponse($value);
$this->setAbeActionBodyField($value);
break;
case 10:
$this->setAbeForceLogin($value);
$this->setAbeCaseNoteInResponse($value);
break;
case 11:
$this->setAbeCreateDate($value);
$this->setAbeForceLogin($value);
break;
case 12:
$this->setAbeUpdateDate($value);
$this->setAbeCreateDate($value);
break;
case 13:
$this->setAbeSubjectField($value);
$this->setAbeUpdateDate($value);
break;
case 14:
$this->setAbeMailserverOrMailcurrent($value);
$this->setAbeSubjectField($value);
break;
case 15:
$this->setAbeCustomGrid($value);
$this->setAbeMailserverOrMailcurrent($value);
break;
case 16:
$this->setAbeCustomGrid($value);
break;
case 17:
$this->setAbeEmailServerUid($value);
break;
case 18:
$this->setAbeEmailServerReceiverUid($value);
break;
} // switch()
}
@@ -1250,35 +1346,43 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
}
if (array_key_exists($keys[9], $arr)) {
$this->setAbeCaseNoteInResponse($arr[$keys[9]]);
$this->setAbeActionBodyField($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setAbeForceLogin($arr[$keys[10]]);
$this->setAbeCaseNoteInResponse($arr[$keys[10]]);
}
if (array_key_exists($keys[11], $arr)) {
$this->setAbeCreateDate($arr[$keys[11]]);
$this->setAbeForceLogin($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setAbeUpdateDate($arr[$keys[12]]);
$this->setAbeCreateDate($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setAbeSubjectField($arr[$keys[13]]);
$this->setAbeUpdateDate($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setAbeMailserverOrMailcurrent($arr[$keys[14]]);
$this->setAbeSubjectField($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setAbeCustomGrid($arr[$keys[15]]);
$this->setAbeMailserverOrMailcurrent($arr[$keys[15]]);
}
if (array_key_exists($keys[16], $arr)) {
$this->setAbeEmailServerUid($arr[$keys[16]]);
$this->setAbeCustomGrid($arr[$keys[16]]);
}
if (array_key_exists($keys[17], $arr)) {
$this->setAbeEmailServerUid($arr[$keys[17]]);
}
if (array_key_exists($keys[18], $arr)) {
$this->setAbeEmailServerReceiverUid($arr[$keys[18]]);
}
}
@@ -1328,6 +1432,10 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$criteria->add(AbeConfigurationPeer::ABE_ACTION_FIELD, $this->abe_action_field);
}
if ($this->isColumnModified(AbeConfigurationPeer::ABE_ACTION_BODY_FIELD)) {
$criteria->add(AbeConfigurationPeer::ABE_ACTION_BODY_FIELD, $this->abe_action_body_field);
}
if ($this->isColumnModified(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE)) {
$criteria->add(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, $this->abe_case_note_in_response);
}
@@ -1360,6 +1468,10 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$criteria->add(AbeConfigurationPeer::ABE_EMAIL_SERVER_UID, $this->abe_email_server_uid);
}
if ($this->isColumnModified(AbeConfigurationPeer::ABE_EMAIL_SERVER_RECEIVER_UID)) {
$criteria->add(AbeConfigurationPeer::ABE_EMAIL_SERVER_RECEIVER_UID, $this->abe_email_server_receiver_uid);
}
return $criteria;
}
@@ -1430,6 +1542,8 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$copyObj->setAbeActionField($this->abe_action_field);
$copyObj->setAbeActionBodyField($this->abe_action_body_field);
$copyObj->setAbeCaseNoteInResponse($this->abe_case_note_in_response);
$copyObj->setAbeForceLogin($this->abe_force_login);
@@ -1446,6 +1560,8 @@ abstract class BaseAbeConfiguration extends BaseObject implements Persistent
$copyObj->setAbeEmailServerUid($this->abe_email_server_uid);
$copyObj->setAbeEmailServerReceiverUid($this->abe_email_server_receiver_uid);
$copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseAbeConfigurationPeer
const CLASS_DEFAULT = 'classes.model.AbeConfiguration';
/** The total number of columns. */
const NUM_COLUMNS = 17;
const NUM_COLUMNS = 19;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -58,6 +58,9 @@ abstract class BaseAbeConfigurationPeer
/** the column name for the ABE_ACTION_FIELD field */
const ABE_ACTION_FIELD = 'ABE_CONFIGURATION.ABE_ACTION_FIELD';
/** the column name for the ABE_ACTION_BODY_FIELD field */
const ABE_ACTION_BODY_FIELD = 'ABE_CONFIGURATION.ABE_ACTION_BODY_FIELD';
/** the column name for the ABE_CASE_NOTE_IN_RESPONSE field */
const ABE_CASE_NOTE_IN_RESPONSE = 'ABE_CONFIGURATION.ABE_CASE_NOTE_IN_RESPONSE';
@@ -82,6 +85,9 @@ abstract class BaseAbeConfigurationPeer
/** the column name for the ABE_EMAIL_SERVER_UID field */
const ABE_EMAIL_SERVER_UID = 'ABE_CONFIGURATION.ABE_EMAIL_SERVER_UID';
/** the column name for the ABE_EMAIL_SERVER_RECEIVER_UID field */
const ABE_EMAIL_SERVER_RECEIVER_UID = 'ABE_CONFIGURATION.ABE_EMAIL_SERVER_RECEIVER_UID';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -93,10 +99,10 @@ abstract class BaseAbeConfigurationPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeCaseNoteInResponse', 'AbeForceLogin', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', 'AbeMailserverOrMailcurrent', 'AbeCustomGrid', 'AbeEmailServerUid', ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_FORCE_LOGIN, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT, AbeConfigurationPeer::ABE_CUSTOM_GRID, AbeConfigurationPeer::ABE_EMAIL_SERVER_UID, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_FORCE_LOGIN', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', 'ABE_MAILSERVER_OR_MAILCURRENT', 'ABE_CUSTOM_GRID', 'ABE_EMAIL_SERVER_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
BasePeer::TYPE_PHPNAME => array ('AbeUid', 'ProUid', 'TasUid', 'AbeType', 'AbeTemplate', 'AbeDynType', 'DynUid', 'AbeEmailField', 'AbeActionField', 'AbeActionBodyField', 'AbeCaseNoteInResponse', 'AbeForceLogin', 'AbeCreateDate', 'AbeUpdateDate', 'AbeSubjectField', 'AbeMailserverOrMailcurrent', 'AbeCustomGrid', 'AbeEmailServerUid', 'AbeEmailServerReceiverUid', ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID, AbeConfigurationPeer::PRO_UID, AbeConfigurationPeer::TAS_UID, AbeConfigurationPeer::ABE_TYPE, AbeConfigurationPeer::ABE_TEMPLATE, AbeConfigurationPeer::ABE_DYN_TYPE, AbeConfigurationPeer::DYN_UID, AbeConfigurationPeer::ABE_EMAIL_FIELD, AbeConfigurationPeer::ABE_ACTION_FIELD, AbeConfigurationPeer::ABE_ACTION_BODY_FIELD, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE, AbeConfigurationPeer::ABE_FORCE_LOGIN, AbeConfigurationPeer::ABE_CREATE_DATE, AbeConfigurationPeer::ABE_UPDATE_DATE, AbeConfigurationPeer::ABE_SUBJECT_FIELD, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT, AbeConfigurationPeer::ABE_CUSTOM_GRID, AbeConfigurationPeer::ABE_EMAIL_SERVER_UID, AbeConfigurationPeer::ABE_EMAIL_SERVER_RECEIVER_UID, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID', 'PRO_UID', 'TAS_UID', 'ABE_TYPE', 'ABE_TEMPLATE', 'ABE_DYN_TYPE', 'DYN_UID', 'ABE_EMAIL_FIELD', 'ABE_ACTION_FIELD', 'ABE_ACTION_BODY_FIELD', 'ABE_CASE_NOTE_IN_RESPONSE', 'ABE_FORCE_LOGIN', 'ABE_CREATE_DATE', 'ABE_UPDATE_DATE', 'ABE_SUBJECT_FIELD', 'ABE_MAILSERVER_OR_MAILCURRENT', 'ABE_CUSTOM_GRID', 'ABE_EMAIL_SERVER_UID', 'ABE_EMAIL_SERVER_RECEIVER_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
);
/**
@@ -106,10 +112,10 @@ abstract class BaseAbeConfigurationPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeCaseNoteInResponse' => 9, 'AbeForceLogin' => 10, 'AbeCreateDate' => 11, 'AbeUpdateDate' => 12, 'AbeSubjectField' => 13, 'AbeMailserverOrMailcurrent' => 14, 'AbeCustomGrid' => 15, 'AbeEmailServerUid' => 16, ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 9, AbeConfigurationPeer::ABE_FORCE_LOGIN => 10, AbeConfigurationPeer::ABE_CREATE_DATE => 11, AbeConfigurationPeer::ABE_UPDATE_DATE => 12, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 13, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT => 14, AbeConfigurationPeer::ABE_CUSTOM_GRID => 15, AbeConfigurationPeer::ABE_EMAIL_SERVER_UID => 16, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_CASE_NOTE_IN_RESPONSE' => 9, 'ABE_FORCE_LOGIN' => 10, 'ABE_CREATE_DATE' => 11, 'ABE_UPDATE_DATE' => 12, 'ABE_SUBJECT_FIELD' => 13, 'ABE_MAILSERVER_OR_MAILCURRENT' => 14, 'ABE_CUSTOM_GRID' => 15, 'ABE_EMAIL_SERVER_UID' => 16, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
BasePeer::TYPE_PHPNAME => array ('AbeUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'AbeType' => 3, 'AbeTemplate' => 4, 'AbeDynType' => 5, 'DynUid' => 6, 'AbeEmailField' => 7, 'AbeActionField' => 8, 'AbeActionBodyField' => 9, 'AbeCaseNoteInResponse' => 10, 'AbeForceLogin' => 11, 'AbeCreateDate' => 12, 'AbeUpdateDate' => 13, 'AbeSubjectField' => 14, 'AbeMailserverOrMailcurrent' => 15, 'AbeCustomGrid' => 16, 'AbeEmailServerUid' => 17, 'AbeEmailServerReceiverUid' => 18, ),
BasePeer::TYPE_COLNAME => array (AbeConfigurationPeer::ABE_UID => 0, AbeConfigurationPeer::PRO_UID => 1, AbeConfigurationPeer::TAS_UID => 2, AbeConfigurationPeer::ABE_TYPE => 3, AbeConfigurationPeer::ABE_TEMPLATE => 4, AbeConfigurationPeer::ABE_DYN_TYPE => 5, AbeConfigurationPeer::DYN_UID => 6, AbeConfigurationPeer::ABE_EMAIL_FIELD => 7, AbeConfigurationPeer::ABE_ACTION_FIELD => 8, AbeConfigurationPeer::ABE_ACTION_BODY_FIELD => 9, AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE => 10, AbeConfigurationPeer::ABE_FORCE_LOGIN => 11, AbeConfigurationPeer::ABE_CREATE_DATE => 12, AbeConfigurationPeer::ABE_UPDATE_DATE => 13, AbeConfigurationPeer::ABE_SUBJECT_FIELD => 14, AbeConfigurationPeer::ABE_MAILSERVER_OR_MAILCURRENT => 15, AbeConfigurationPeer::ABE_CUSTOM_GRID => 16, AbeConfigurationPeer::ABE_EMAIL_SERVER_UID => 17, AbeConfigurationPeer::ABE_EMAIL_SERVER_RECEIVER_UID => 18, ),
BasePeer::TYPE_FIELDNAME => array ('ABE_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'ABE_TYPE' => 3, 'ABE_TEMPLATE' => 4, 'ABE_DYN_TYPE' => 5, 'DYN_UID' => 6, 'ABE_EMAIL_FIELD' => 7, 'ABE_ACTION_FIELD' => 8, 'ABE_ACTION_BODY_FIELD' => 9, 'ABE_CASE_NOTE_IN_RESPONSE' => 10, 'ABE_FORCE_LOGIN' => 11, 'ABE_CREATE_DATE' => 12, 'ABE_UPDATE_DATE' => 13, 'ABE_SUBJECT_FIELD' => 14, 'ABE_MAILSERVER_OR_MAILCURRENT' => 15, 'ABE_CUSTOM_GRID' => 16, 'ABE_EMAIL_SERVER_UID' => 17, 'ABE_EMAIL_SERVER_RECEIVER_UID' => 18, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
);
/**
@@ -228,6 +234,8 @@ abstract class BaseAbeConfigurationPeer
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_ACTION_BODY_FIELD);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_CASE_NOTE_IN_RESPONSE);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_FORCE_LOGIN);
@@ -244,6 +252,8 @@ abstract class BaseAbeConfigurationPeer
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_SERVER_UID);
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_EMAIL_SERVER_RECEIVER_UID);
}
const COUNT = 'COUNT(ABE_CONFIGURATION.ABE_UID)';

View File

@@ -51,6 +51,18 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
*/
protected $mess_port = 0;
/**
* The value for the mess_incoming_server field.
* @var string
*/
protected $mess_incoming_server = '';
/**
* The value for the mess_incoming_port field.
* @var int
*/
protected $mess_incoming_port = 0;
/**
* The value for the mess_rauth field.
* @var int
@@ -163,6 +175,28 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
return $this->mess_port;
}
/**
* Get the [mess_incoming_server] column value.
*
* @return string
*/
public function getMessIncomingServer()
{
return $this->mess_incoming_server;
}
/**
* Get the [mess_incoming_port] column value.
*
* @return int
*/
public function getMessIncomingPort()
{
return $this->mess_incoming_port;
}
/**
* Get the [mess_rauth] column value.
*
@@ -350,6 +384,50 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
} // setMessPort()
/**
* Set the value of [mess_incoming_server] column.
*
* @param string $v new value
* @return void
*/
public function setMessIncomingServer($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->mess_incoming_server !== $v || $v === '') {
$this->mess_incoming_server = $v;
$this->modifiedColumns[] = EmailServerPeer::MESS_INCOMING_SERVER;
}
} // setMessIncomingServer()
/**
* Set the value of [mess_incoming_port] column.
*
* @param int $v new value
* @return void
*/
public function setMessIncomingPort($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->mess_incoming_port !== $v || $v === 0) {
$this->mess_incoming_port = $v;
$this->modifiedColumns[] = EmailServerPeer::MESS_INCOMING_PORT;
}
} // setMessIncomingPort()
/**
* Set the value of [mess_rauth] column.
*
@@ -573,30 +651,34 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
$this->mess_port = $rs->getInt($startcol + 3);
$this->mess_rauth = $rs->getInt($startcol + 4);
$this->mess_incoming_server = $rs->getString($startcol + 4);
$this->mess_account = $rs->getString($startcol + 5);
$this->mess_incoming_port = $rs->getInt($startcol + 5);
$this->mess_password = $rs->getString($startcol + 6);
$this->mess_rauth = $rs->getInt($startcol + 6);
$this->mess_from_mail = $rs->getString($startcol + 7);
$this->mess_account = $rs->getString($startcol + 7);
$this->mess_from_name = $rs->getString($startcol + 8);
$this->mess_password = $rs->getString($startcol + 8);
$this->smtpsecure = $rs->getString($startcol + 9);
$this->mess_from_mail = $rs->getString($startcol + 9);
$this->mess_try_send_inmediatly = $rs->getInt($startcol + 10);
$this->mess_from_name = $rs->getString($startcol + 10);
$this->mail_to = $rs->getString($startcol + 11);
$this->smtpsecure = $rs->getString($startcol + 11);
$this->mess_default = $rs->getInt($startcol + 12);
$this->mess_try_send_inmediatly = $rs->getInt($startcol + 12);
$this->mail_to = $rs->getString($startcol + 13);
$this->mess_default = $rs->getInt($startcol + 14);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 13; // 13 = EmailServerPeer::NUM_COLUMNS - EmailServerPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 15; // 15 = EmailServerPeer::NUM_COLUMNS - EmailServerPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating EmailServer object", $e);
@@ -813,30 +895,36 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
return $this->getMessPort();
break;
case 4:
return $this->getMessRauth();
return $this->getMessIncomingServer();
break;
case 5:
return $this->getMessAccount();
return $this->getMessIncomingPort();
break;
case 6:
return $this->getMessPassword();
return $this->getMessRauth();
break;
case 7:
return $this->getMessFromMail();
return $this->getMessAccount();
break;
case 8:
return $this->getMessFromName();
return $this->getMessPassword();
break;
case 9:
return $this->getSmtpsecure();
return $this->getMessFromMail();
break;
case 10:
return $this->getMessTrySendInmediatly();
return $this->getMessFromName();
break;
case 11:
return $this->getMailTo();
return $this->getSmtpsecure();
break;
case 12:
return $this->getMessTrySendInmediatly();
break;
case 13:
return $this->getMailTo();
break;
case 14:
return $this->getMessDefault();
break;
default:
@@ -863,15 +951,17 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
$keys[1] => $this->getMessEngine(),
$keys[2] => $this->getMessServer(),
$keys[3] => $this->getMessPort(),
$keys[4] => $this->getMessRauth(),
$keys[5] => $this->getMessAccount(),
$keys[6] => $this->getMessPassword(),
$keys[7] => $this->getMessFromMail(),
$keys[8] => $this->getMessFromName(),
$keys[9] => $this->getSmtpsecure(),
$keys[10] => $this->getMessTrySendInmediatly(),
$keys[11] => $this->getMailTo(),
$keys[12] => $this->getMessDefault(),
$keys[4] => $this->getMessIncomingServer(),
$keys[5] => $this->getMessIncomingPort(),
$keys[6] => $this->getMessRauth(),
$keys[7] => $this->getMessAccount(),
$keys[8] => $this->getMessPassword(),
$keys[9] => $this->getMessFromMail(),
$keys[10] => $this->getMessFromName(),
$keys[11] => $this->getSmtpsecure(),
$keys[12] => $this->getMessTrySendInmediatly(),
$keys[13] => $this->getMailTo(),
$keys[14] => $this->getMessDefault(),
);
return $result;
}
@@ -916,30 +1006,36 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
$this->setMessPort($value);
break;
case 4:
$this->setMessRauth($value);
$this->setMessIncomingServer($value);
break;
case 5:
$this->setMessAccount($value);
$this->setMessIncomingPort($value);
break;
case 6:
$this->setMessPassword($value);
$this->setMessRauth($value);
break;
case 7:
$this->setMessFromMail($value);
$this->setMessAccount($value);
break;
case 8:
$this->setMessFromName($value);
$this->setMessPassword($value);
break;
case 9:
$this->setSmtpsecure($value);
$this->setMessFromMail($value);
break;
case 10:
$this->setMessTrySendInmediatly($value);
$this->setMessFromName($value);
break;
case 11:
$this->setMailTo($value);
$this->setSmtpsecure($value);
break;
case 12:
$this->setMessTrySendInmediatly($value);
break;
case 13:
$this->setMailTo($value);
break;
case 14:
$this->setMessDefault($value);
break;
} // switch()
@@ -982,39 +1078,47 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
}
if (array_key_exists($keys[4], $arr)) {
$this->setMessRauth($arr[$keys[4]]);
$this->setMessIncomingServer($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setMessAccount($arr[$keys[5]]);
$this->setMessIncomingPort($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setMessPassword($arr[$keys[6]]);
$this->setMessRauth($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
$this->setMessFromMail($arr[$keys[7]]);
$this->setMessAccount($arr[$keys[7]]);
}
if (array_key_exists($keys[8], $arr)) {
$this->setMessFromName($arr[$keys[8]]);
$this->setMessPassword($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
$this->setSmtpsecure($arr[$keys[9]]);
$this->setMessFromMail($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setMessTrySendInmediatly($arr[$keys[10]]);
$this->setMessFromName($arr[$keys[10]]);
}
if (array_key_exists($keys[11], $arr)) {
$this->setMailTo($arr[$keys[11]]);
$this->setSmtpsecure($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setMessDefault($arr[$keys[12]]);
$this->setMessTrySendInmediatly($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setMailTo($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setMessDefault($arr[$keys[14]]);
}
}
@@ -1044,6 +1148,14 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
$criteria->add(EmailServerPeer::MESS_PORT, $this->mess_port);
}
if ($this->isColumnModified(EmailServerPeer::MESS_INCOMING_SERVER)) {
$criteria->add(EmailServerPeer::MESS_INCOMING_SERVER, $this->mess_incoming_server);
}
if ($this->isColumnModified(EmailServerPeer::MESS_INCOMING_PORT)) {
$criteria->add(EmailServerPeer::MESS_INCOMING_PORT, $this->mess_incoming_port);
}
if ($this->isColumnModified(EmailServerPeer::MESS_RAUTH)) {
$criteria->add(EmailServerPeer::MESS_RAUTH, $this->mess_rauth);
}
@@ -1140,6 +1252,10 @@ abstract class BaseEmailServer extends BaseObject implements Persistent
$copyObj->setMessPort($this->mess_port);
$copyObj->setMessIncomingServer($this->mess_incoming_server);
$copyObj->setMessIncomingPort($this->mess_incoming_port);
$copyObj->setMessRauth($this->mess_rauth);
$copyObj->setMessAccount($this->mess_account);

View File

@@ -25,7 +25,7 @@ abstract class BaseEmailServerPeer
const CLASS_DEFAULT = 'classes.model.EmailServer';
/** The total number of columns. */
const NUM_COLUMNS = 13;
const NUM_COLUMNS = 15;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -43,6 +43,12 @@ abstract class BaseEmailServerPeer
/** the column name for the MESS_PORT field */
const MESS_PORT = 'EMAIL_SERVER.MESS_PORT';
/** the column name for the MESS_INCOMING_SERVER field */
const MESS_INCOMING_SERVER = 'EMAIL_SERVER.MESS_INCOMING_SERVER';
/** the column name for the MESS_INCOMING_PORT field */
const MESS_INCOMING_PORT = 'EMAIL_SERVER.MESS_INCOMING_PORT';
/** the column name for the MESS_RAUTH field */
const MESS_RAUTH = 'EMAIL_SERVER.MESS_RAUTH';
@@ -81,10 +87,10 @@ abstract class BaseEmailServerPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MessUid', 'MessEngine', 'MessServer', 'MessPort', 'MessRauth', 'MessAccount', 'MessPassword', 'MessFromMail', 'MessFromName', 'Smtpsecure', 'MessTrySendInmediatly', 'MailTo', 'MessDefault', ),
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID, EmailServerPeer::MESS_ENGINE, EmailServerPeer::MESS_SERVER, EmailServerPeer::MESS_PORT, EmailServerPeer::MESS_RAUTH, EmailServerPeer::MESS_ACCOUNT, EmailServerPeer::MESS_PASSWORD, EmailServerPeer::MESS_FROM_MAIL, EmailServerPeer::MESS_FROM_NAME, EmailServerPeer::SMTPSECURE, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY, EmailServerPeer::MAIL_TO, EmailServerPeer::MESS_DEFAULT, ),
BasePeer::TYPE_FIELDNAME => array ('MESS_UID', 'MESS_ENGINE', 'MESS_SERVER', 'MESS_PORT', 'MESS_RAUTH', 'MESS_ACCOUNT', 'MESS_PASSWORD', 'MESS_FROM_MAIL', 'MESS_FROM_NAME', 'SMTPSECURE', 'MESS_TRY_SEND_INMEDIATLY', 'MAIL_TO', 'MESS_DEFAULT', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
BasePeer::TYPE_PHPNAME => array ('MessUid', 'MessEngine', 'MessServer', 'MessPort', 'MessIncomingServer', 'MessIncomingPort', 'MessRauth', 'MessAccount', 'MessPassword', 'MessFromMail', 'MessFromName', 'Smtpsecure', 'MessTrySendInmediatly', 'MailTo', 'MessDefault', ),
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID, EmailServerPeer::MESS_ENGINE, EmailServerPeer::MESS_SERVER, EmailServerPeer::MESS_PORT, EmailServerPeer::MESS_INCOMING_SERVER, EmailServerPeer::MESS_INCOMING_PORT, EmailServerPeer::MESS_RAUTH, EmailServerPeer::MESS_ACCOUNT, EmailServerPeer::MESS_PASSWORD, EmailServerPeer::MESS_FROM_MAIL, EmailServerPeer::MESS_FROM_NAME, EmailServerPeer::SMTPSECURE, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY, EmailServerPeer::MAIL_TO, EmailServerPeer::MESS_DEFAULT, ),
BasePeer::TYPE_FIELDNAME => array ('MESS_UID', 'MESS_ENGINE', 'MESS_SERVER', 'MESS_PORT', 'MESS_INCOMING_SERVER', 'MESS_INCOMING_PORT', 'MESS_RAUTH', 'MESS_ACCOUNT', 'MESS_PASSWORD', 'MESS_FROM_MAIL', 'MESS_FROM_NAME', 'SMTPSECURE', 'MESS_TRY_SEND_INMEDIATLY', 'MAIL_TO', 'MESS_DEFAULT', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -94,10 +100,10 @@ abstract class BaseEmailServerPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MessUid' => 0, 'MessEngine' => 1, 'MessServer' => 2, 'MessPort' => 3, 'MessRauth' => 4, 'MessAccount' => 5, 'MessPassword' => 6, 'MessFromMail' => 7, 'MessFromName' => 8, 'Smtpsecure' => 9, 'MessTrySendInmediatly' => 10, 'MailTo' => 11, 'MessDefault' => 12, ),
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID => 0, EmailServerPeer::MESS_ENGINE => 1, EmailServerPeer::MESS_SERVER => 2, EmailServerPeer::MESS_PORT => 3, EmailServerPeer::MESS_RAUTH => 4, EmailServerPeer::MESS_ACCOUNT => 5, EmailServerPeer::MESS_PASSWORD => 6, EmailServerPeer::MESS_FROM_MAIL => 7, EmailServerPeer::MESS_FROM_NAME => 8, EmailServerPeer::SMTPSECURE => 9, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY => 10, EmailServerPeer::MAIL_TO => 11, EmailServerPeer::MESS_DEFAULT => 12, ),
BasePeer::TYPE_FIELDNAME => array ('MESS_UID' => 0, 'MESS_ENGINE' => 1, 'MESS_SERVER' => 2, 'MESS_PORT' => 3, 'MESS_RAUTH' => 4, 'MESS_ACCOUNT' => 5, 'MESS_PASSWORD' => 6, 'MESS_FROM_MAIL' => 7, 'MESS_FROM_NAME' => 8, 'SMTPSECURE' => 9, 'MESS_TRY_SEND_INMEDIATLY' => 10, 'MAIL_TO' => 11, 'MESS_DEFAULT' => 12, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
BasePeer::TYPE_PHPNAME => array ('MessUid' => 0, 'MessEngine' => 1, 'MessServer' => 2, 'MessPort' => 3, 'MessIncomingServer' => 4, 'MessIncomingPort' => 5, 'MessRauth' => 6, 'MessAccount' => 7, 'MessPassword' => 8, 'MessFromMail' => 9, 'MessFromName' => 10, 'Smtpsecure' => 11, 'MessTrySendInmediatly' => 12, 'MailTo' => 13, 'MessDefault' => 14, ),
BasePeer::TYPE_COLNAME => array (EmailServerPeer::MESS_UID => 0, EmailServerPeer::MESS_ENGINE => 1, EmailServerPeer::MESS_SERVER => 2, EmailServerPeer::MESS_PORT => 3, EmailServerPeer::MESS_INCOMING_SERVER => 4, EmailServerPeer::MESS_INCOMING_PORT => 5, EmailServerPeer::MESS_RAUTH => 6, EmailServerPeer::MESS_ACCOUNT => 7, EmailServerPeer::MESS_PASSWORD => 8, EmailServerPeer::MESS_FROM_MAIL => 9, EmailServerPeer::MESS_FROM_NAME => 10, EmailServerPeer::SMTPSECURE => 11, EmailServerPeer::MESS_TRY_SEND_INMEDIATLY => 12, EmailServerPeer::MAIL_TO => 13, EmailServerPeer::MESS_DEFAULT => 14, ),
BasePeer::TYPE_FIELDNAME => array ('MESS_UID' => 0, 'MESS_ENGINE' => 1, 'MESS_SERVER' => 2, 'MESS_PORT' => 3, 'MESS_INCOMING_SERVER' => 4, 'MESS_INCOMING_PORT' => 5, 'MESS_RAUTH' => 6, 'MESS_ACCOUNT' => 7, 'MESS_PASSWORD' => 8, 'MESS_FROM_MAIL' => 9, 'MESS_FROM_NAME' => 10, 'SMTPSECURE' => 11, 'MESS_TRY_SEND_INMEDIATLY' => 12, 'MAIL_TO' => 13, 'MESS_DEFAULT' => 14, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
);
/**
@@ -206,6 +212,10 @@ abstract class BaseEmailServerPeer
$criteria->addSelectColumn(EmailServerPeer::MESS_PORT);
$criteria->addSelectColumn(EmailServerPeer::MESS_INCOMING_SERVER);
$criteria->addSelectColumn(EmailServerPeer::MESS_INCOMING_PORT);
$criteria->addSelectColumn(EmailServerPeer::MESS_RAUTH);
$criteria->addSelectColumn(EmailServerPeer::MESS_ACCOUNT);

View File

@@ -57,6 +57,12 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
*/
protected $usr_setting_designer;
/**
* The value for the pmdynaform_first_time field.
* @var string
*/
protected $pmdynaform_first_time = '0';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -147,6 +153,17 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
return $this->usr_setting_designer;
}
/**
* Get the [pmdynaform_first_time] column value.
*
* @return string
*/
public function getPmdynaformFirstTime()
{
return $this->pmdynaform_first_time;
}
/**
* Set the value of [usr_uid] column.
*
@@ -264,6 +281,28 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
} // setUsrSettingDesigner()
/**
* Set the value of [pmdynaform_first_time] column.
*
* @param string $v new value
* @return void
*/
public function setPmdynaformFirstTime($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->pmdynaform_first_time !== $v || $v === '0') {
$this->pmdynaform_first_time = $v;
$this->modifiedColumns[] = UsersPropertiesPeer::PMDYNAFORM_FIRST_TIME;
}
} // setPmdynaformFirstTime()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -291,12 +330,14 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
$this->usr_setting_designer = $rs->getString($startcol + 4);
$this->pmdynaform_first_time = $rs->getString($startcol + 5);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 5; // 5 = UsersPropertiesPeer::NUM_COLUMNS - UsersPropertiesPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 6; // 6 = UsersPropertiesPeer::NUM_COLUMNS - UsersPropertiesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating UsersProperties object", $e);
@@ -515,6 +556,9 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
case 4:
return $this->getUsrSettingDesigner();
break;
case 5:
return $this->getPmdynaformFirstTime();
break;
default:
return null;
break;
@@ -540,6 +584,7 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
$keys[2] => $this->getUsrLoggedNextTime(),
$keys[3] => $this->getUsrPasswordHistory(),
$keys[4] => $this->getUsrSettingDesigner(),
$keys[5] => $this->getPmdynaformFirstTime(),
);
return $result;
}
@@ -586,6 +631,9 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
case 4:
$this->setUsrSettingDesigner($value);
break;
case 5:
$this->setPmdynaformFirstTime($value);
break;
} // switch()
}
@@ -629,6 +677,10 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
$this->setUsrSettingDesigner($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setPmdynaformFirstTime($arr[$keys[5]]);
}
}
/**
@@ -660,6 +712,10 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
$criteria->add(UsersPropertiesPeer::USR_SETTING_DESIGNER, $this->usr_setting_designer);
}
if ($this->isColumnModified(UsersPropertiesPeer::PMDYNAFORM_FIRST_TIME)) {
$criteria->add(UsersPropertiesPeer::PMDYNAFORM_FIRST_TIME, $this->pmdynaform_first_time);
}
return $criteria;
}
@@ -722,6 +778,8 @@ abstract class BaseUsersProperties extends BaseObject implements Persistent
$copyObj->setUsrSettingDesigner($this->usr_setting_designer);
$copyObj->setPmdynaformFirstTime($this->pmdynaform_first_time);
$copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseUsersPropertiesPeer
const CLASS_DEFAULT = 'classes.model.UsersProperties';
/** The total number of columns. */
const NUM_COLUMNS = 5;
const NUM_COLUMNS = 6;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -46,6 +46,9 @@ abstract class BaseUsersPropertiesPeer
/** the column name for the USR_SETTING_DESIGNER field */
const USR_SETTING_DESIGNER = 'USERS_PROPERTIES.USR_SETTING_DESIGNER';
/** the column name for the PMDYNAFORM_FIRST_TIME field */
const PMDYNAFORM_FIRST_TIME = 'USERS_PROPERTIES.PMDYNAFORM_FIRST_TIME';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -57,10 +60,10 @@ abstract class BaseUsersPropertiesPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('UsrUid', 'UsrLastUpdateDate', 'UsrLoggedNextTime', 'UsrPasswordHistory', 'UsrSettingDesigner', ),
BasePeer::TYPE_COLNAME => array (UsersPropertiesPeer::USR_UID, UsersPropertiesPeer::USR_LAST_UPDATE_DATE, UsersPropertiesPeer::USR_LOGGED_NEXT_TIME, UsersPropertiesPeer::USR_PASSWORD_HISTORY, UsersPropertiesPeer::USR_SETTING_DESIGNER, ),
BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'USR_LAST_UPDATE_DATE', 'USR_LOGGED_NEXT_TIME', 'USR_PASSWORD_HISTORY', 'USR_SETTING_DESIGNER', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
BasePeer::TYPE_PHPNAME => array ('UsrUid', 'UsrLastUpdateDate', 'UsrLoggedNextTime', 'UsrPasswordHistory', 'UsrSettingDesigner', 'PmdynaformFirstTime', ),
BasePeer::TYPE_COLNAME => array (UsersPropertiesPeer::USR_UID, UsersPropertiesPeer::USR_LAST_UPDATE_DATE, UsersPropertiesPeer::USR_LOGGED_NEXT_TIME, UsersPropertiesPeer::USR_PASSWORD_HISTORY, UsersPropertiesPeer::USR_SETTING_DESIGNER, UsersPropertiesPeer::PMDYNAFORM_FIRST_TIME, ),
BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'USR_LAST_UPDATE_DATE', 'USR_LOGGED_NEXT_TIME', 'USR_PASSWORD_HISTORY', 'USR_SETTING_DESIGNER', 'PMDYNAFORM_FIRST_TIME', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
@@ -70,10 +73,10 @@ abstract class BaseUsersPropertiesPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'UsrLastUpdateDate' => 1, 'UsrLoggedNextTime' => 2, 'UsrPasswordHistory' => 3, 'UsrSettingDesigner' => 4, ),
BasePeer::TYPE_COLNAME => array (UsersPropertiesPeer::USR_UID => 0, UsersPropertiesPeer::USR_LAST_UPDATE_DATE => 1, UsersPropertiesPeer::USR_LOGGED_NEXT_TIME => 2, UsersPropertiesPeer::USR_PASSWORD_HISTORY => 3, UsersPropertiesPeer::USR_SETTING_DESIGNER => 4, ),
BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'USR_LAST_UPDATE_DATE' => 1, 'USR_LOGGED_NEXT_TIME' => 2, 'USR_PASSWORD_HISTORY' => 3, 'USR_SETTING_DESIGNER' => 4, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'UsrLastUpdateDate' => 1, 'UsrLoggedNextTime' => 2, 'UsrPasswordHistory' => 3, 'UsrSettingDesigner' => 4, 'PmdynaformFirstTime' => 5, ),
BasePeer::TYPE_COLNAME => array (UsersPropertiesPeer::USR_UID => 0, UsersPropertiesPeer::USR_LAST_UPDATE_DATE => 1, UsersPropertiesPeer::USR_LOGGED_NEXT_TIME => 2, UsersPropertiesPeer::USR_PASSWORD_HISTORY => 3, UsersPropertiesPeer::USR_SETTING_DESIGNER => 4, UsersPropertiesPeer::PMDYNAFORM_FIRST_TIME => 5, ),
BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'USR_LAST_UPDATE_DATE' => 1, 'USR_LOGGED_NEXT_TIME' => 2, 'USR_PASSWORD_HISTORY' => 3, 'USR_SETTING_DESIGNER' => 4, 'PMDYNAFORM_FIRST_TIME' => 5, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
@@ -184,6 +187,8 @@ abstract class BaseUsersPropertiesPeer
$criteria->addSelectColumn(UsersPropertiesPeer::USR_SETTING_DESIGNER);
$criteria->addSelectColumn(UsersPropertiesPeer::PMDYNAFORM_FIRST_TIME);
}
const COUNT = 'COUNT(USERS_PROPERTIES.USR_UID)';

View File

@@ -2399,6 +2399,7 @@
<column name="USR_LOGGED_NEXT_TIME" type="INTEGER" default="0"/>
<column name="USR_PASSWORD_HISTORY" type="LONGVARCHAR" required="false"/>
<column name="USR_SETTING_DESIGNER" type="LONGVARCHAR"/>
<column name="PMDYNAFORM_FIRST_TIME" type="CHAR" size="1" default="0"/>
</table>
<table name="ADDITIONAL_TABLES">
<vendor type="mysql">
@@ -4866,6 +4867,8 @@
<column name="MESS_ENGINE" type="VARCHAR" size="256" required="true" default=""/>
<column name="MESS_SERVER" type="VARCHAR" size="256" required="true" default=""/>
<column name="MESS_PORT" type="INTEGER" required="true" default="0"/>
<column name="MESS_INCOMING_SERVER" type="VARCHAR" size="256" required="true" default=""/>
<column name="MESS_INCOMING_PORT" type="INTEGER" required="true" default="0"/>
<column name="MESS_RAUTH" type="INTEGER" required="true" default="0"/>
<column name="MESS_ACCOUNT" type="VARCHAR" size="256" required="true" default=""/>
<column name="MESS_PASSWORD" type="VARCHAR" size="256" required="true" default=""/>
@@ -5094,6 +5097,16 @@
<parameter name="Extra" value=""/>
</vendor>
</column>
<column name="ABE_ACTION_BODY_FIELD" type="VARCHAR" size="255" required="false" default="">
<vendor type="mysql">
<parameter name="Field" value="ABE_ACTION_BODY_FIELD"/>
<parameter name="Type" value="varchar(255)"/>
<parameter name="Null" value="YES"/>
<parameter name="Key" value=""/>
<parameter name="Default" value=""/>
<parameter name="Extra" value=""/>
</vendor>
</column>
<column name="ABE_CASE_NOTE_IN_RESPONSE" type="INTEGER" default="0"/>
<column name="ABE_FORCE_LOGIN" type="INTEGER" default="0"/>
<column name="ABE_CREATE_DATE" type="TIMESTAMP" required="true">
@@ -5141,6 +5154,7 @@
</vendor>
</column>
<column name="ABE_EMAIL_SERVER_UID" type="VARCHAR" size="32" required="false" default=""/>
<column name="ABE_EMAIL_SERVER_RECEIVER_UID" type="VARCHAR" size="32" required="false" default=""/>
<index name="indexAbeProcess">
<index-column name="PRO_UID"/>
</index>
@@ -5769,7 +5783,7 @@
<column name="PLUGIN_TASK_EXTENDED_PROPERTIES" type="LONGVARCHAR"/>
<column name="PLUGIN_ATTRIBUTES" type="LONGVARCHAR"/>
</table>
<table name="APP_DATA_CHANGE_LOG" idMethod="native">
<vendor type="mysql">
<parameter name="Name" value="APP_DATA_CHANGE_LOG"/>

View File

@@ -1699,6 +1699,30 @@ msgstr "3 days at least"
msgid "The answer has been submitted. Thank you."
msgstr "The answer has been submitted. Thank you."
# TRANSLATION
# LABEL/ID_ABE_EMAIL_RESPONSE_BODY_NOTE
#: LABEL/ID_ABE_EMAIL_RESPONSE_BODY_NOTE
msgid "Please add your comments above this section. Don't modify or delete this section."
msgstr "Please add your comments above this section. Don't modify or delete this section."
# TRANSLATION
# LABEL/ID_ABE_CASE_NOTE_ANSWER
#: LABEL/ID_ABE_CASE_NOTE_ANSWER
msgid "Answer: {optionLabel}"
msgstr "Answer: {optionLabel}"
# TRANSLATION
# LABEL/ID_ABE_CASE_NOTE_COMMENT
#: LABEL/ID_ABE_CASE_NOTE_COMMENT
msgid "Comment: {emailBody}"
msgstr "Comment: {emailBody}"
# TRANSLATION
# LABEL/ID_ABE_CASE_NOTE_HEADER
#: LABEL/ID_ABE_CASE_NOTE_HEADER
msgid "{emailAccount} has completed a task from Actions by Email."
msgstr "{emailAccount} has completed a task from Actions by Email."
# TRANSLATION
# LABEL/ID_ABE_FORM_ALREADY_FILLED
#: LABEL/ID_ABE_FORM_ALREADY_FILLED
@@ -1711,6 +1735,54 @@ msgstr "The form has already been filled and sent."
msgid "The information was submitted. Thank you."
msgstr "The information was submitted. Thank you."
# TRANSLATION
# LABEL/ID_ABE_LOG_ALREADY_ROUTED
#: LABEL/ID_ABE_LOG_ALREADY_ROUTED
msgid "The case was identified correctly but it was already routed."
msgstr "The case was identified correctly but it was already routed."
# TRANSLATION
# LABEL/ID_ABE_LOG_CANNOT_BE_IDENTIFIED
#: LABEL/ID_ABE_LOG_CANNOT_BE_IDENTIFIED
msgid "The case cannot be identified."
msgstr "The case cannot be identified."
# TRANSLATION
# LABEL/ID_ABE_LOG_CANNOT_READ
#: LABEL/ID_ABE_LOG_CANNOT_READ
msgid "The application cannot read the email receiver account."
msgstr "The application cannot read the email receiver account."
# TRANSLATION
# LABEL/ID_ABE_LOG_PROCESSED_OK
#: LABEL/ID_ABE_LOG_PROCESSED_OK
msgid "The answer was processed correctly."
msgstr "The answer was processed correctly."
# TRANSLATION
# LABEL/ID_ABE_LOG_ROUTING_FAILED
#: LABEL/ID_ABE_LOG_ROUTING_FAILED
msgid "The case was identified correctly but the routing process has failed."
msgstr "The case was identified correctly but the routing process has failed."
# TRANSLATION
# LABEL/ID_ABE_RESPONSE_ALREADY_ROUTED
#: LABEL/ID_ABE_RESPONSE_ALREADY_ROUTED
msgid "Your answer cannot be processed because the case was already routed or is no longer assigned to you."
msgstr "Your answer cannot be processed because the case was already routed or is no longer assigned to you."
# TRANSLATION
# LABEL/ID_ABE_RESPONSE_CANNOT_BE_IDENTIFIED
#: LABEL/ID_ABE_RESPONSE_CANNOT_BE_IDENTIFIED
msgid "Your answer cannot be processed, please try again and make sure to keep the subject code untouched."
msgstr "Your answer cannot be processed, please try again and make sure to keep the subject code untouched."
# TRANSLATION
# LABEL/ID_ABE_RESPONSE_ROUTING_FAILED
#: LABEL/ID_ABE_RESPONSE_ROUTING_FAILED
msgid "Your answer cannot be processed because there is an error in the flow definition, please notify to this issue to the system administrator."
msgstr "Your answer cannot be processed because there is an error in the flow definition, please notify to this issue to the system administrator."
# TRANSLATION
# LABEL/ID_ABE_RESPONSE_SENT
#: LABEL/ID_ABE_RESPONSE_SENT
@@ -4247,6 +4319,12 @@ msgstr "Close Editor"
msgid "[LABEL/ID_CODE] Code"
msgstr "Code"
# TRANSLATION
# LABEL/ID_CODE_CRYPT
#: LABEL/ID_CODE_CRYPT
msgid "Code:"
msgstr "Code:"
# TRANSLATION
# LABEL/ID_COLLAPSE_ALL
#: LABEL/ID_COLLAPSE_ALL
@@ -7475,6 +7553,12 @@ msgstr "There was a problem installing this add-on."
msgid "Error in server"
msgstr "Error in server"
# TRANSLATION
# LABEL/ID_ERROR_IN_THE_QUERY
#: LABEL/ID_ERROR_IN_THE_QUERY
msgid "Error in the query"
msgstr "Error in the query"
# TRANSLATION
# LABEL/ID_ERROR_JS_NOT_AVAILABLE
#: LABEL/ID_ERROR_JS_NOT_AVAILABLE
@@ -13625,6 +13709,12 @@ msgstr "Execute a trigger when a case is deleted"
msgid "Please press the \"Generate Link\" button."
msgstr "Please press the \"Generate Link\" button."
# TRANSLATION
# LABEL/ID_MAFE_660cfca112471f69246e9942f5e8afd1
#: LABEL/ID_MAFE_660cfca112471f69246e9942f5e8afd1
msgid "Store email body in"
msgstr "Store email body in"
# TRANSLATION
# LABEL/ID_MAFE_66285b36f894a5439af5a98e3e1a36d2
#: LABEL/ID_MAFE_66285b36f894a5439af5a98e3e1a36d2
@@ -14555,6 +14645,12 @@ msgstr "January"
msgid "[LABEL/ID_MAFE_86fd9a7abc9f357e7fa206b2d42ec5ba] Destination Path"
msgstr "Destination Path"
# TRANSLATION
# LABEL/ID_MAFE_8738321e65db027ee6476c0ab12d8cd5
#: LABEL/ID_MAFE_8738321e65db027ee6476c0ab12d8cd5
msgid "Store option in"
msgstr "Store option in"
# TRANSLATION
# LABEL/ID_MAFE_87557f11575c0ad78e4e28abedc13b6e
#: LABEL/ID_MAFE_87557f11575c0ad78e4e28abedc13b6e
@@ -15371,6 +15467,12 @@ msgstr "Properties"
msgid "[LABEL/ID_MAFE_9fced129522f128b2445a41fb0b6ef9f] checkbox"
msgstr "checkbox"
# TRANSLATION
# LABEL/ID_MAFE_a036226d97d1d0d725d494a1431f322c
#: LABEL/ID_MAFE_a036226d97d1d0d725d494a1431f322c
msgid "Receiver account"
msgstr "Receiver account"
# TRANSLATION
# LABEL/ID_MAFE_a05ac4341235111bd2cba5c3c105ba81
#: LABEL/ID_MAFE_a05ac4341235111bd2cba5c3c105ba81
@@ -17945,6 +18047,12 @@ msgstr "Users"
msgid "validate"
msgstr "validate"
# TRANSLATION
# LABEL/ID_MAFE_fa2b5b7c9bccd35e42cb74042690a091
#: LABEL/ID_MAFE_fa2b5b7c9bccd35e42cb74042690a091
msgid "Email response"
msgstr "Email response"
# TRANSLATION
# LABEL/ID_MAFE_fa3c608c8fc755543f0d37afd6a42651
#: LABEL/ID_MAFE_fa3c608c8fc755543f0d37afd6a42651
@@ -23549,6 +23657,18 @@ msgstr "Sent By"
msgid "[LABEL/ID_SERVER] Server"
msgstr "Server"
# TRANSLATION
# LABEL/ID_OUTGOING_SERVER
#: LABEL/ID_OUTGOING_SERVER
msgid "Outgoing Server"
msgstr "Outgoing Server"
# TRANSLATION
# LABEL/ID_INCOMING_SERVER
#: LABEL/ID_INCOMING_SERVER
msgid "Incoming Server"
msgstr "Incoming Server"
# TRANSLATION
# LABEL/ID_SERVER_ADDRESS
#: LABEL/ID_SERVER_ADDRESS
@@ -26033,18 +26153,6 @@ msgstr "The uploaded file exceeds the upload_max_filesize directive in php.ini"
msgid "The file has not been attached because the extension is not allowed or because the content doesn't correspond."
msgstr "The file has not been attached because the extension is not allowed or because the content doesn't correspond."
# TRANSLATION
# LABEL/ID_UPLOAD_INVALID_DOC_MAX_FILESIZE
#: LABEL/ID_UPLOAD_INVALID_DOC_MAX_FILESIZE
msgid "File size exceeds the allowable limit of {0}"
msgstr "File size exceeds the allowable limit of {0}"
# TRANSLATION
# LABEL/ID_UPLOAD_INVALID_DOC_TYPE_FILE
#: LABEL/ID_UPLOAD_INVALID_DOC_TYPE_FILE
msgid "Invalid file format, please upload a file with one of the following formats {0}"
msgstr "Invalid file format, please upload a file with one of the following formats {0}"
# TRANSLATION
# LABEL/ID_UPLOAD_ERR_NO_FILE
#: LABEL/ID_UPLOAD_ERR_NO_FILE
@@ -26093,6 +26201,18 @@ msgstr "Upload from file"
msgid "Upload image"
msgstr "Upload image"
# TRANSLATION
# LABEL/ID_UPLOAD_INVALID_DOC_MAX_FILESIZE
#: LABEL/ID_UPLOAD_INVALID_DOC_MAX_FILESIZE
msgid "File size exceeds the allowable limit of {0}"
msgstr "File size exceeds the allowable limit of {0}"
# TRANSLATION
# LABEL/ID_UPLOAD_INVALID_DOC_TYPE_FILE
#: LABEL/ID_UPLOAD_INVALID_DOC_TYPE_FILE
msgid "Invalid file format, please upload a file with one of the following formats {0}"
msgstr "Invalid file format, please upload a file with one of the following formats {0}"
# TRANSLATION
# LABEL/ID_UPLOAD_LANGUAGE
#: LABEL/ID_UPLOAD_LANGUAGE
@@ -28013,6 +28133,18 @@ msgstr "Photo gallery"
msgid "Port (default 25)"
msgstr "Port (default 25)"
# TRANSLATION
# LABEL/INCOMING_PORT_DEFAULT
#: LABEL/INCOMING_PORT_DEFAULT
msgid "Incoming Port (default 143)"
msgstr "Incoming Port (default 143)"
# TRANSLATION
# LABEL/OUTGOING_PORT_DEFAULT
#: LABEL/OUTGOING_PORT_DEFAULT
msgid "Outgoing Port (default 25)"
msgstr "Outgoing Port (default 25)"
# TRANSLATION
# LABEL/REQUIRE_AUTHENTICATION
#: LABEL/REQUIRE_AUTHENTICATION

View File

@@ -33,6 +33,7 @@ class Designer extends Controller
*/
public function index($httpData)
{
global $RBAC;
$proUid = isset($httpData->prj_uid) ? $httpData->prj_uid : '';
$appUid = isset($httpData->app_uid) ? $httpData->app_uid : '';
$proReadOnly = isset($httpData->prj_readonly) ? $httpData->prj_readonly : 'false';
@@ -44,6 +45,9 @@ class Designer extends Controller
$enterprise = 0;
$distribution = 0;
$usrUid = $RBAC->userObj->getUsrUid();
$userProperties = UsersPropertiesPeer::retrieveByPk($usrUid);
/*----------------------------------********---------------------------------*/
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
@@ -68,6 +72,7 @@ class Designer extends Controller
$this->setVar("SYS_LANG", SYS_LANG);
$this->setVar("SYS_SKIN", SYS_SKIN);
$this->setVar('HTTP_SERVER_HOSTNAME', System::getHttpServerHostnameRequestsFrontEnd());
$this->setVar('PMDYNAFORM_FIRST_TIME', $userProperties->getPmdynaformFirstTime());
$inpuDocument = new InputDocument();
$this->setVar('maxFileSizeInformation', G::json_encode($inpuDocument->getMaxFileSize()));

View File

@@ -57081,9 +57081,21 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','HTML_FILES','en','You can open only files with the .html extension','2014-01-15') ,
( 'LABEL','ID_3DAYSMINIMUM','en','3 days at least','2014-01-15') ,
( 'LABEL','ID_ABE_ANSWER_SUBMITTED','en','The answer has been submitted. Thank you.','2017-06-19') ,
( 'LABEL','ID_ABE_EMAIL_RESPONSE_BODY_NOTE','en','Please add your comments above this section. Don''t modify or delete this section.','2018-11-16') ,
( 'LABEL','ID_ABE_FORM_ALREADY_FILLED','en','The form has already been filled and sent.','2017-06-09') ,
( 'LABEL','ID_ABE_INFORMATION_SUBMITTED','en','The information was submitted. Thank you.','2017-06-19') ,
( 'LABEL','ID_ABE_RESPONSE_SENT','en','The response has already been sent.','2017-06-19') ,
( 'LABEL','ID_ABE_RESPONSE_CANNOT_BE_IDENTIFIED','en','Your answer cannot be processed, please try again and make sure to keep the subject code untouched.','2018-11-20') ,
( 'LABEL','ID_ABE_RESPONSE_ALREADY_ROUTED','en','Your answer cannot be processed because the case was already routed or is no longer assigned to you.','2018-11-20') ,
( 'LABEL','ID_ABE_RESPONSE_ROUTING_FAILED','en','Your answer cannot be processed because there is an error in the flow definition, please notify to this issue to the system administrator.','2018-11-20') ,
( 'LABEL','ID_ABE_CASE_NOTE_ANSWER','en','Answer: {optionLabel}','2018-11-20') ,
( 'LABEL','ID_ABE_CASE_NOTE_COMMENT','en','Comment: {emailBody}','2018-11-20') ,
( 'LABEL','ID_ABE_CASE_NOTE_HEADER','en','{emailAccount} has completed a task from Actions by Email.','2018-11-20') ,
( 'LABEL','ID_ABE_LOG_CANNOT_READ','en','The application cannot read the email receiver account.','2018-11-20') ,
( 'LABEL','ID_ABE_LOG_PROCESSED_OK','en','The answer was processed correctly.','2018-11-20') ,
( 'LABEL','ID_ABE_LOG_CANNOT_BE_IDENTIFIED','en','The case cannot be identified.','2018-11-20') ,
( 'LABEL','ID_ABE_LOG_ALREADY_ROUTED','en','The case was identified correctly but it was already routed.','2018-11-20') ,
( 'LABEL','ID_ABE_LOG_ROUTING_FAILED','en','The case was identified correctly but the routing process has failed.','2018-11-20') ,
( 'LABEL','ID_ACCEPT','en','Accept','2014-01-15') ,
( 'LABEL','ID_ACCESS_DENIED','en','Access Denied!','2015-12-03') ,
( 'LABEL','ID_ACCOUNT','en','Account','2014-01-15') ,
@@ -57515,6 +57527,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_CLOSE','en','Close','2014-01-15') ,
( 'LABEL','ID_CLOSE_EDITOR','en','Close Editor','2014-01-15') ,
( 'LABEL','ID_CODE','en','Code','2014-01-15') ,
( 'LABEL','ID_CODE_CRYPT','en','Code:','2018-11-16') ,
( 'LABEL','ID_COLLAPSE_ALL','en','Collapse All','2014-01-15') ,
( 'LABEL','ID_COLOSA_AND_CERTIFIED_PARTNERS','en','Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by Colosa and its Certified Partners.','2014-10-21') ,
( 'LABEL','ID_COLUMNS','en','columns','2014-01-15') ,
@@ -58067,6 +58080,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_ERROR_INSERT_LINE','en','Error trying to insert the line','2014-01-15') ,
( 'LABEL','ID_ERROR_INSTALLING_ADDON','en','There was a problem installing this add-on.','2014-10-21') ,
( 'LABEL','ID_ERROR_IN_SERVER','en','Error in server','2015-09-15') ,
( 'LABEL','ID_ERROR_IN_THE_QUERY','en','Error in the query','2019-03-12') ,
( 'LABEL','ID_ERROR_JS_NOT_AVAILABLE','en','Your browser doesn''t support JavaScript or it may be disabled. Please use a different browser or enable JavaScript. Dynaforms won''t entirely work because JavaScript is required.','2014-10-21') ,
( 'LABEL','ID_ERROR_MESSAGE','en','Error Message','2017-02-22') ,
( 'LABEL','ID_ERROR_OBJECT_NOT_EXISTS','en','Error: Object does not exist.','2014-01-15') ,
@@ -58425,6 +58439,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_INACTIVE','en','Inactive','2014-01-15') ,
( 'LABEL','ID_INBOX','en','Inbox','2014-01-15') ,
( 'LABEL','ID_INBOX_EMPTY','en','Your Inbox is empty...','2015-05-06') ,
( 'LABEL','ID_INCOMING_SERVER','en','Incoming Server','2018-11-23') ,
( 'LABEL','ID_INCORRECT_EMAIL','en','Your E-mail address is not valid.','2014-01-15') ,
( 'LABEL','ID_INCORRECT_USERNAME_PASSWORD','en','Incorrect username or password','2014-01-15') ,
( 'LABEL','ID_INCORRECT_VALUE_ACTION','en','The value for $action is incorrect.','2014-05-29') ,
@@ -60206,6 +60221,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_ORIGIN_TASK','en','Origin Task','2014-01-15') ,
( 'LABEL','ID_OTHER','en','Other','2014-01-15') ,
( 'LABEL','ID_OUTBOX','en','Outbox','2014-01-15') ,
( 'LABEL','ID_OUTGOING_SERVER','en','Outgoing Server','2018-11-23') ,
( 'LABEL','ID_OUTPUT_DB','en','Output','2014-10-08') ,
( 'LABEL','ID_OUTPUT_DOCUMENT','en','Output Document','2014-01-15') ,
( 'LABEL','ID_OUTPUT_DOCUMENTS','en','Output Documents','2014-01-15') ,
@@ -61476,6 +61492,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','IMPORT_PROCESS_DISABLE','en','Disable the current process and create a new version of the process','2014-01-15') ,
( 'LABEL','IMPORT_PROCESS_NEW','en','Create a completely new process without changing the current process','2014-01-15') ,
( 'LABEL','IMPORT_PROCESS_OVERWRITING','en','Update the current process, overwriting all tasks and steps','2014-01-15') ,
( 'LABEL','INCOMING_PORT_DEFAULT','en','Incoming Port (default 143)','2018-11-23') ,
( 'LABEL','INVALID_FILE','en','Invalid file!','2014-01-15') ,
( 'LABEL','IS_USER_NAME_DISPLAY_FORMAT','en','User Name Display Format','2014-01-15') ,
( 'LABEL','LOGIN','en','Login','2014-01-15') ,
@@ -61543,6 +61560,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','NEW_SITE_SUCCESS_CONFIRM','en','Do you want open the new site?','2014-01-15') ,
( 'LABEL','NEW_SITE_SUCCESS_CONFIRMNOTE','en','Note.- If you open the new site your current session will be closed.','2014-01-15') ,
( 'LABEL','OPEN_NEW_WS','en','Open new site','2014-01-15') ,
( 'LABEL','OUTGOING_PORT_DEFAULT','en','Outgoing Port (default 25)','2018-11-26') ,
( 'LABEL','OUTPUT_CREATE','en','Output document has been created successfully','2014-01-15') ,
( 'LABEL','PASSWORD_HISTORY','en','Password history','2014-01-15') ,
( 'LABEL','PAUSED','en','Pause','2014-01-15') ,
@@ -61616,8 +61634,7 @@ INSERT INTO CONFIGURATION (CFG_UID,OBJ_UID,CFG_VALUE,PRO_UID,USR_UID,APP_UID) VA
('MIGRATED_APP_HISTORY', 'history', 'a:1:{s:7:\"updated\";b:1;}', '', '', ''),
('MIGRATED_CONTENT','content','a:12:{i:0;s:7:"Groupwf";i:1;s:7:"Process";i:2;s:10:"Department";i:3;s:4:"Task";i:4;s:13:"InputDocument";i:5;s:11:"Application";i:6;s:11:"AppDocument";i:7;s:8:"Dynaform";i:8;s:14:"OutputDocument";i:9;s:11:"ReportTable";i:10;s:8:"Triggers";i:11;s:41:"\\ProcessMaker\\BusinessModel\\WebEntryEvent";}','','',''),
('MIGRATED_LIST','list','true','list','list','list'),
('MIGRATED_LIST_UNASSIGNED','list','true','list','list','list'),
('SKIN_CRON','','s:10:\"neoclassic\";','','','');
('MIGRATED_LIST_UNASSIGNED','list','true','list','list','list');
INSERT INTO CATALOG (CAT_UID,CAT_LABEL_ID,CAT_TYPE,CAT_FLAG,CAT_OBSERVATION,CAT_CREATE_DATE,CAT_UPDATE_DATE) VALUES
('10','ID_BARS','GRAPHIC','','','2015-03-04 00:00:00','2015-03-04 00:00:00'),

View File

@@ -1115,6 +1115,7 @@ CREATE TABLE `USERS_PROPERTIES`
`USR_LOGGED_NEXT_TIME` INTEGER default 0,
`USR_PASSWORD_HISTORY` MEDIUMTEXT,
`USR_SETTING_DESIGNER` MEDIUMTEXT,
`PMDYNAFORM_FIRST_TIME` CHAR(1) default '0',
PRIMARY KEY (`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
@@ -2744,6 +2745,8 @@ CREATE TABLE `EMAIL_SERVER`
`MESS_ENGINE` VARCHAR(256) default '' NOT NULL,
`MESS_SERVER` VARCHAR(256) default '' NOT NULL,
`MESS_PORT` INTEGER default 0 NOT NULL,
`MESS_INCOMING_SERVER` VARCHAR(256) default '' NOT NULL,
`MESS_INCOMING_PORT` INTEGER default 0 NOT NULL,
`MESS_RAUTH` INTEGER default 0 NOT NULL,
`MESS_ACCOUNT` VARCHAR(256) default '' NOT NULL,
`MESS_PASSWORD` VARCHAR(256) default '' NOT NULL,
@@ -2865,6 +2868,7 @@ CREATE TABLE `ABE_CONFIGURATION`
`DYN_UID` VARCHAR(32) default '' NOT NULL,
`ABE_EMAIL_FIELD` VARCHAR(255) default '' NOT NULL,
`ABE_ACTION_FIELD` VARCHAR(255) default '',
`ABE_ACTION_BODY_FIELD` VARCHAR(255) default '',
`ABE_CASE_NOTE_IN_RESPONSE` INTEGER default 0,
`ABE_FORCE_LOGIN` INTEGER default 0,
`ABE_CREATE_DATE` DATETIME NOT NULL,
@@ -2873,6 +2877,7 @@ CREATE TABLE `ABE_CONFIGURATION`
`ABE_MAILSERVER_OR_MAILCURRENT` INTEGER default 0,
`ABE_CUSTOM_GRID` MEDIUMTEXT,
`ABE_EMAIL_SERVER_UID` VARCHAR(32) default '',
`ABE_EMAIL_SERVER_RECEIVER_UID` VARCHAR(32) default '',
PRIMARY KEY (`ABE_UID`),
KEY `indexAbeProcess`(`PRO_UID`),
KEY `indexAbeProcessTask`(`PRO_UID`, `TAS_UID`)

View File

@@ -9,6 +9,8 @@ switch ($option) {
$server = "";
$port = "";
$incomingServer = "";
$incomingPort = "";
$reqAuthentication = 0;
$password = "";
$smtpSecure = "";
@@ -27,6 +29,14 @@ switch ($option) {
$reqAuthentication = (int)($_POST["reqAuthentication"]);
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
$smtpSecure = $_POST["smtpSecure"];
} elseif ($cboEmailEngine == "IMAP") {
$server = $_POST["server"];
$port = (int)($_POST["port"]);
$incomingServer = $_POST["incomingServer"];
$incomingPort = (int)($_POST["incomingPort"]);
$reqAuthentication = (int)($_POST["reqAuthentication"]);
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
$smtpSecure = $_POST["smtpSecure"];
}
try {
@@ -34,6 +44,8 @@ switch ($option) {
"MESS_ENGINE" => $cboEmailEngine,
"MESS_SERVER" => $server,
"MESS_PORT" => $port,
"MESS_INCOMING_SERVER" => $incomingServer,
"MESS_INCOMING_PORT" => $incomingPort,
"MESS_RAUTH" => $reqAuthentication,
"MESS_ACCOUNT" => $accountFrom,
"MESS_PASSWORD" => $password,
@@ -63,6 +75,8 @@ switch ($option) {
$server = "";
$port = "";
$incomingServer = "";
$incomingPort = "";
$reqAuthentication = 0;
$password = "";
$smtpSecure = "";
@@ -81,6 +95,14 @@ switch ($option) {
$reqAuthentication = (int)($_POST["reqAuthentication"]);
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
$smtpSecure = $_POST["smtpSecure"];
} elseif ($cboEmailEngine == "IMAP") {
$server = $_POST["server"];
$port = (int)($_POST["port"]);
$incomingServer = $_POST["incomingServer"];
$incomingPort = (int)($_POST["incomingPort"]);
$reqAuthentication = (int)($_POST["reqAuthentication"]);
$password = ($reqAuthentication == 1)? $_POST["password"] : "";
$smtpSecure = $_POST["smtpSecure"];
}
try {
@@ -88,6 +110,8 @@ switch ($option) {
"MESS_ENGINE" => $cboEmailEngine,
"MESS_SERVER" => $server,
"MESS_PORT" => $port,
"MESS_INCOMING_SERVER" => $incomingServer,
"MESS_INCOMING_PORT" => $incomingPort,
"MESS_RAUTH" => $reqAuthentication,
"MESS_ACCOUNT" => $accountFrom,
"MESS_PASSWORD" => $password,
@@ -153,6 +177,8 @@ switch ($option) {
$server = "";
$port = "";
$incomingServer = "";
$incomingPort = "";
$reqAuthentication = 0;
$password = "";
$smtpSecure = "";
@@ -165,7 +191,7 @@ switch ($option) {
$mailTo = ($sendTestMail == 1)? $_POST["mailTo"] : "";
$emailServerDefault = (int)($_POST["emailServerDefault"]);
if ($cboEmailEngine == "PHPMAILER") {
if ($cboEmailEngine == "PHPMAILER" || $cboEmailEngine == "IMAP") {
$server = $_POST["server"];
$port = (int)($_POST["port"]);
$reqAuthentication = (int)($_POST["reqAuthentication"]);

View File

@@ -0,0 +1,355 @@
<?php
namespace ProcessMaker\BusinessModel\ActionsByEmail;
use AbeConfigurationPeer;
use AbeResponses;
use ActionsByEmailCoreClass;
use AppDelegation;
use AppNotes;
use Bootstrap;
use Cases;
use Criteria;
use EmailServerPeer;
use Exception;
use G;
use Illuminate\Support\Facades\Crypt;
use PhpImap\IncomingMail;
use PhpImap\Mailbox;
use PMLicensedFeatures;
use ProcessMaker\BusinessModel\ActionsByEmail;
use ProcessMaker\BusinessModel\EmailServer;
use ProcessMaker\ChangeLog\ChangeLog;
use ResultSet;
use WsBase;
/**
* Class ResponseReader
* @package ProcessMaker\BusinessModel\ActionsByEmail
*/
class ResponseReader
{
/*----------------------------------********---------------------------------*/
private $channel = "ActionsByEmail";
private $case = [];
private $messageResponseError = null;
/**
* @return string
*/
public function getMessageResponseError()
{
return $this->messageResponseError;
}
/**
* @param string $messageResponseError
*/
public function setMessageResponseError($messageResponseError)
{
$this->messageResponseError = $messageResponseError;
}
/**
* Read the Action by Email listener inbox looking for new messages
*/
public function actionsByEmailEmailResponse()
{
try {
if (!extension_loaded('imap')) {
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", ['php_imap']) . "\n");
exit;
}
if (PMLicensedFeatures
::getSingleton()
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
$criteriaAbe = new Criteria();
$criteriaAbe->add(AbeConfigurationPeer::ABE_TYPE, "RESPONSE");
$resultAbe = AbeConfigurationPeer::doSelectRS($criteriaAbe);
$resultAbe->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($resultAbe->next()) {
$dataAbe = $resultAbe->getRow();
$this->getAllEmails($dataAbe);
}
}
} catch (Exception $e) {
Bootstrap::registerMonolog(
$this->channel,
$e->getCode() != 0 ? $e->getCode() : 300,
$e->getMessage(),
$this->case,
config("system.workspace"),
'processmaker.log'
);
}
}
/**
* Decrypt password of Email Server
* @param array $emailSetup
* @return mixed|string
*/
private function decryptPassword(array $emailSetup)
{
$pass = isset($emailSetup['MESS_PASSWORD']) ? $emailSetup['MESS_PASSWORD'] : '';
$passDec = G::decrypt($pass, 'EMAILENCRYPT');
$auxPass = explode('hash:', $passDec);
if (count($auxPass) > 1) {
if (count($auxPass) == 2) {
$pass = $auxPass[1];
} else {
array_shift($auxPass);
$pass = implode('', $auxPass);
}
}
return $pass;
}
/**
* Get all Email of server listener
* @param array $dataAbe
*/
public function getAllEmails(array $dataAbe)
{
try {
$emailServer = new EmailServer();
$emailSetup = (!is_null(EmailServerPeer::retrieveByPK($dataAbe['ABE_EMAIL_SERVER_RECEIVER_UID']))) ?
$emailServer->getEmailServer($dataAbe['ABE_EMAIL_SERVER_RECEIVER_UID'], true) :
$emailServer->getEmailServerDefault();
if (empty($emailSetup) || (empty($emailSetup['MESS_INCOMING_SERVER']) && $emailSetup['MESS_INCOMING_PORT'] == 0)) {
throw (new Exception(G::LoadTranslation('ID_ABE_LOG_CANNOT_READ'), 500));
}
$mailbox = new Mailbox(
'{'. $emailSetup['MESS_INCOMING_SERVER'] . ':' . $emailSetup['MESS_INCOMING_PORT'] . '/imap/ssl/novalidate-cert}INBOX',
$emailSetup['MESS_ACCOUNT'],
$this->decryptPassword($emailSetup)
);
// Read all messages into an array
$mailsIds = $mailbox->searchMailbox('UNSEEN');
if ($mailsIds) {
// Get the first message and save its attachment(s) to disk:
foreach ($mailsIds as $key => $mailId) {
/** @var IncomingMail $mail */
$mail = $mailbox->getMail($mailId, false);
if (!empty($mail->textPlain)) {
preg_match("/{(.*)}/", $mail->textPlain, $matches);
if ($matches) {
$dataEmail = G::json_decode(Crypt::decryptString($matches[1]), true);
$dataAbeReq = loadAbeRequest($dataEmail['ABE_REQ_UID']);
if (config("system.workspace") === $dataEmail['workspace']
&& (array_key_exists('ABE_UID', $dataAbeReq) && $dataAbeReq['ABE_UID'] == $dataAbe['ABE_UID'])) {
$this->case = $dataEmail;
try {
$appDelegate = new AppDelegation();
$alreadyRouted = $appDelegate->alreadyRouted($this->case["appUid"], $this->case["delIndex"]);
//Verify if the current case is already routed.
if ($alreadyRouted) {
$this->setMessageResponseError(G::LoadTranslation('ID_ABE_RESPONSE_ALREADY_ROUTED'));
throw (new Exception(G::LoadTranslation('ID_CASE_DELEGATION_ALREADY_CLOSED'), 400));
}
$this->processABE($this->case, $mail, $dataAbe);
$mailbox->markMailAsRead($mailId);
Bootstrap::registerMonolog(
$this->channel,
100, // DEBUG
G::LoadTranslation('ID_ABE_LOG_PROCESSED_OK'),
$this->case,
config("system.workspace"),
'processmaker.log'
);
} catch (Exception $e) {
$this->sendMessageError(
$this->getMessageResponseError() ? $this->getMessageResponseError() : $e->getMessage(),
$this->case,
$mail,
$emailSetup
);
Bootstrap::registerMonolog(
$this->channel,
$e->getCode() != 0 ? $e->getCode() : 400,
$e->getMessage(),
$this->case,
config("system.workspace"),
'processmaker.log'
);
}
}
}
}
}
}
} catch (Exception $e) {
Bootstrap::registerMonolog(
$this->channel,
$e->getCode() != 0 ? $e->getCode() : 500,
$e->getMessage(),
$this->case,
config("system.workspace"),
'processmaker.log'
);
}
}
/**
* Derivation of the case with the mail information
* @param array $caseInfo
* @param IncomingMail $mail
* @param array $dataAbe
* @throws Exception
*/
public function processABE(array $caseInfo, IncomingMail $mail, array $dataAbe = [])
{
try {
$actionsByEmail = new ActionsByEmail();
$actionsByEmail->verifyLogin($caseInfo['appUid'], $caseInfo['delIndex']);
$case = new Cases();
$caseFieldsABE = $case->loadCase($caseInfo['appUid'], $caseInfo['delIndex']);
$actionsByEmailCore = new ActionsByEmailCoreClass();
$actionField = str_replace(
$actionsByEmailCore->getPrefix(),
'',
$dataAbe['ABE_ACTION_FIELD']
);
$dataField = [];
$dataField[$actionField] = $caseInfo['fieldValue'];
$actionBodyField = str_replace(
$actionsByEmailCore->getPrefix(),
'',
$dataAbe['ABE_ACTION_BODY_FIELD']
);
$textPlain = $mail->textPlain;
$textPlain = substr($textPlain, 0, strpos($textPlain, "/="));
$dataField[$actionBodyField] = $textPlain;
$caseFieldsABE['APP_DATA'] = array_merge($caseFieldsABE['APP_DATA'], $dataField);
$dataResponses = [];
$dataResponses['ABE_REQ_UID'] = $caseInfo['ABE_REQ_UID'];
$dataResponses['ABE_RES_CLIENT_IP'] = 'localhost';
$dataResponses['ABE_RES_DATA'] = serialize($dataField);
$dataResponses['ABE_RES_STATUS'] = 'PENDING';
$dataResponses['ABE_RES_MESSAGE'] = '';
try {
$abeAbeResponsesInstance = new AbeResponses();
$dataResponses['ABE_RES_UID'] = $abeAbeResponsesInstance->createOrUpdate($dataResponses);
} catch (Exception $e) {
Bootstrap::registerMonolog(
$this->channel,
300,
$e->getMessage(),
$this->case,
config("system.workspace"),
'processmaker.log'
);
}
ChangeLog::getChangeLog()
->getUsrIdByUsrUid($caseFieldsABE['CURRENT_USER_UID'], true)
->setSourceId(ChangeLog::FromABE);
$caseFieldsABE['CURRENT_DYNAFORM'] = '';
$caseFieldsABE['USER_UID'] = $caseFieldsABE['CURRENT_USER_UID'];
$caseFieldsABE['OBJECT_TYPE'] = '';
$case->updateCase($caseInfo['appUid'], $caseFieldsABE);
try {
$ws = new WsBase();
$result = $ws->derivateCase(
$caseFieldsABE['CURRENT_USER_UID'],
$caseInfo['appUid'],
$caseInfo['delIndex'],
true
);
$code = (is_array($result)) ? $result['status_code'] : $result->status_code;
if ($code != 0) {
throw new Exception(
"An error occurred while the application was being processed\n" .
"Error code: " . $result->status_code . "\nError message: " . $result->message
);
}
} catch (Exception $e) {
$this->setMessageResponseError(G::LoadTranslation('ID_ABE_RESPONSE_ROUTING_FAILED'));
throw (new Exception(G::LoadTranslation('ID_ABE_LOG_ROUTING_FAILED'), 400));
}
//Update AbeResponses
$dataResponses['ABE_RES_STATUS'] = ($code == 0)? 'SENT' : 'ERROR';
$dataResponses['ABE_RES_MESSAGE'] = ($code == 0)? '-' : $result->message;
try {
$abeAbeResponsesInstance = new AbeResponses();
$abeAbeResponsesInstance->createOrUpdate($dataResponses);
} catch (Exception $e) {
Bootstrap::registerMonolog(
$this->channel,
300,
$e->getMessage(),
$this->case,
config("system.workspace"),
'processmaker.log'
);
}
$dataAbeRequests = loadAbeRequest($caseInfo['ABE_REQ_UID']);
//Save Cases Notes
if ($dataAbe['ABE_CASE_NOTE_IN_RESPONSE'] == 1) {
$customGrid = unserialize($dataAbe['ABE_CUSTOM_GRID']);
$fieldLabel = null;
foreach ($customGrid as $key => $value) {
if ($value['abe_custom_value'] == $caseInfo['fieldValue']) {
$fieldLabel = $value['abe_custom_label'];
break;
}
}
$appNotes = new AppNotes();
$noteText = G::LoadTranslation('ID_ABE_CASE_NOTE_HEADER', ['emailAccount' => $mail->toString]) . "\n\n";
$noteText .= G::LoadTranslation('ID_ABE_CASE_NOTE_ANSWER', ['optionLabel' => $fieldLabel ? $fieldLabel : $caseInfo['fieldValue']]) . "\n\n";
$noteText .= G::LoadTranslation('ID_ABE_CASE_NOTE_COMMENT', ['emailBody' => $textPlain]);
$noteContent = addslashes($noteText);
$appNotes->postNewNote($caseInfo['appUid'], $caseFieldsABE['APP_DATA']['USER_LOGGED'], $noteContent, false);
}
$dataAbeRequests['ABE_REQ_ANSWERED'] = 1;
$code == 0 ? uploadAbeRequest($dataAbeRequests) : '';
} catch (Exception $e) {
if ($e->getCode() == 400) {
throw (new Exception($e->getMessage(), $e->getCode()));
} else {
$this->setMessageResponseError(G::LoadTranslation('ID_ABE_RESPONSE_CANNOT_BE_IDENTIFIED'));
throw (new Exception(G::LoadTranslation('ID_ABE_LOG_CANNOT_BE_IDENTIFIED'), 300));
}
}
}
/**
* Send an error message to the sender
* @param string $msgError
* @param array $caseInf
* @param IncomingMail $mail
* @param array $emailSetup
* @return \ProcessMaker\Util\Response|string|\WsResponse
*/
public function sendMessageError($msgError, array $caseInf, IncomingMail $mail, array $emailSetup)
{
$wsBase = new WsBase();
$result = $wsBase->sendMessage(
$caseInf['appUid'],
$mail->toString,
$mail->fromAddress,
'',
'',
$mail->subject,
'actionsByEmailErrorReply.html',
['ACTIONS_BY_EMAIL_ERROR_MESSAGE' => $msgError],
null,
true,
$caseInf['delIndex'],
$emailSetup,
0
);
return $result;
}
/*----------------------------------********---------------------------------*/
}

View File

@@ -54,13 +54,71 @@ trait SuggestTrait
$where = $isWhere ? "WHERE " . $col . "='" . $dv . "'" : $where . " AND " . $col . "='" . $dv . "'";
}
}
if (isset($json->queryField) && isset($dt[0]["base_expr"])) {
$col = isset($dt[1]["base_expr"]) ? $dt[1]["base_expr"] : $dt[0]["base_expr"];
$qf = str_replace("'", "''", $json->queryFilter);
$where = $isWhere ? "WHERE " . $col . " LIKE '%" . $qf . "%'" : $where . " AND " . $col . " LIKE '%" . $qf . "%'";
if (isset($json->querySearch) && is_array($json->querySearch) && !empty($json->querySearch)) {
$dataSearch = $json->querySearch;
$sqlWildcard = "";
//We will to search term in the query
if (isset($dataSearch['term'])) {
$value = isset($dataSearch['term']['value']) ? $dataSearch['term']['value'] : '';
$label = isset($dataSearch['term']['text']) ? $dataSearch['term']['text'] : '';
$sqlWildcard = "%";
}
//The match has priority
//We will to search match in the query
if (isset($dataSearch['match'])) {
$value = isset($dataSearch['match']['value']) ? $dataSearch['match']['value'] : '';
$label = isset($dataSearch['match']['text']) ? $dataSearch['match']['text'] : '';
$sqlWildcard = "";
}
if (!empty($value) && !empty($label)){
//We need to search in the firstColumn and secondColumn
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL1 LIKE 'querySearch' OR COL2 LIKE 'querySearch'
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL1 LIKE '%querySearch%' OR COL2 LIKE '%querySearch%'
$col1 = $dt[0]["base_expr"];
$col2 = isset($dt[1]["base_expr"]) ? $dt[1]["base_expr"] : $dt[0]["base_expr"];
$qfValue = str_replace("'", "''", $value);
$qfLabel = str_replace("'", "''", $label);
$search = $col1 . " LIKE '" . $sqlWildcard . $qfValue . $sqlWildcard . "' OR " . $col2 . " LIKE '" . $sqlWildcard . $qfLabel . $sqlWildcard . "'";
$where = $isWhere ? "WHERE " . $search : $where . " AND (" . $search . ")";
} else {
$valueOrLabel = '';
$column = $dt[0]["base_expr"];
if (!empty($value)) {
//We need to search in the firstColumn
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL1 LIKE 'querySearch'
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL1 LIKE '%querySearch%'
$valueOrLabel = $value;
}
if (!empty($label)) {
//We need to search in the secondColumn
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL2 LIKE 'querySearch'
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL2 LIKE '%querySearch%'
$column = isset($dt[1]["base_expr"]) ? $dt[1]["base_expr"] : $column;
$valueOrLabel = $label;
}
$where = $this->buildWhere(
$column,
$valueOrLabel,
$sqlWildcard,
$isWhere,
$where
);
}
} else {
//If the property querySearch does not exist we need to search in the secondColumn
//Ex: SELECT COL1, COL2 FROM TABLE WHERE COL2 LIKE '%queryFilter%'
if (isset($json->queryField) && isset($dt[0]["base_expr"])) {
$where = $this->buildWhere(
isset($dt[1]["base_expr"]) ? $dt[1]["base_expr"] : $dt[0]["base_expr"],
$json->queryFilter,
"%",
$isWhere,
$where
);
}
}
if ($optionsLimit > 0) {
if ($optionsLimit >= 0) {
$this->addSuggestLimit($json, $select, $limit, $where);
} else {
$this->addSuggestWhere($json, $parsed, $select, $where, $having);
@@ -69,6 +127,26 @@ trait SuggestTrait
);
}
/**
* This function will be define the WHERE clause
*
* @param string $col, name of column
* @param string $value, value to search in the column
* @param string $sqlWildcard, if we to search term or correct match
* @param boolean $isWhere, if the we need to concat other condition
* @param string $where, initial where to add the concat
*
* @return string
*
*/
private function buildWhere($col, $value, $sqlWildcard = "", $isWhere = false, $where = "")
{
$qf = str_replace("'", "''", $value);
$searchValue = $col . " LIKE '" . $sqlWildcard . $qf . $sqlWildcard;
$where = ($isWhere) ? "WHERE " . $searchValue . "'" : $where . " AND " . $searchValue . "'";
return $where;
}
/**
* Add the limit sentence to the suggest query.
*

View File

@@ -14,9 +14,11 @@ class EmailServer
{
private $arrayFieldDefinition = array(
"MESS_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "emailServerUid"),
"MESS_ENGINE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("PHPMAILER", "MAIL"), "fieldNameAux" => "emailServerEngine"),
"MESS_ENGINE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("PHPMAILER", "MAIL", "IMAP"), "fieldNameAux" => "emailServerEngine"),
"MESS_SERVER" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerServer"),
"MESS_PORT" => array("type" => "int", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerPort"),
"MESS_INCOMING_SERVER" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerIncomingServer"),
"MESS_INCOMING_PORT" => array("type" => "int", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerIncomingPort"),
"MESS_RAUTH" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "emailServerRauth"),
"MESS_ACCOUNT" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerUserName"),
"MESS_PASSWORD" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "emailServerPassword"),
@@ -52,10 +54,10 @@ class EmailServer
throw $e;
}
}
/**
* Get the default information from the context.
*
*
* @global type $RBAC
* @return void
*/
@@ -527,6 +529,7 @@ class EmailServer
}
break;
case "PHPMAILER":
case "IMAP":
$numSteps = ($arrayData['MAIL_TO'] != '') ? count($arrayPhpMailerTestName) :
count($arrayPhpMailerTestName) - 1;
for ($step = 1; $step <= $numSteps; $step++) {
@@ -831,6 +834,8 @@ class EmailServer
'engine'=> $arrayData["MESS_ENGINE"],
'server' => $arrayData["MESS_SERVER"],
'port' => $arrayData["MESS_PORT"],
'incomingServer' => $arrayData["MESS_INCOMING_SERVER"],
'incomingPort' => $arrayData["MESS_INCOMING_PORT"],
'requireAuthentication' => $arrayData["MESS_RAUTH"],
'account' => $arrayData["MESS_ACCOUNT"],
'senderEmail' => $arrayData["MESS_FROM_MAIL"],
@@ -1002,6 +1007,8 @@ class EmailServer
'engine' => $arrayData["MESS_ENGINE"],
'server' => $arrayData["MESS_SERVER"],
'port' => $arrayData["MESS_PORT"],
'incomingServer' => $arrayData["MESS_INCOMING_SERVER"],
'incomingPort' => $arrayData["MESS_INCOMING_PORT"],
'requireAuthentication' => $arrayData["MESS_RAUTH"],
'account' => $arrayData["MESS_ACCOUNT"],
'senderEmail' => $arrayData["MESS_FROM_MAIL"],
@@ -1088,6 +1095,8 @@ class EmailServer
$criteria->addSelectColumn(\EmailServerPeer::MESS_ENGINE);
$criteria->addSelectColumn(\EmailServerPeer::MESS_SERVER);
$criteria->addSelectColumn(\EmailServerPeer::MESS_PORT);
$criteria->addSelectColumn(\EmailServerPeer::MESS_INCOMING_SERVER);
$criteria->addSelectColumn(\EmailServerPeer::MESS_INCOMING_PORT);
$criteria->addSelectColumn(\EmailServerPeer::MESS_RAUTH);
$criteria->addSelectColumn(\EmailServerPeer::MESS_ACCOUNT);
$criteria->addSelectColumn(\EmailServerPeer::MESS_PASSWORD);
@@ -1120,6 +1129,8 @@ class EmailServer
$this->getFieldNameByFormatFieldName("MESS_ENGINE") => $record["MESS_ENGINE"],
$this->getFieldNameByFormatFieldName("MESS_SERVER") => $record["MESS_SERVER"],
$this->getFieldNameByFormatFieldName("MESS_PORT") => $record["MESS_PORT"],
$this->getFieldNameByFormatFieldName("MESS_INCOMING_SERVER") => $record["MESS_INCOMING_SERVER"],
$this->getFieldNameByFormatFieldName("MESS_INCOMING_PORT") => $record["MESS_INCOMING_PORT"],
$this->getFieldNameByFormatFieldName("MESS_RAUTH") => $record["MESS_RAUTH"],
$this->getFieldNameByFormatFieldName("MESS_ACCOUNT") => $record["MESS_ACCOUNT"],
$this->getFieldNameByFormatFieldName("MESS_PASSWORD") => $record["MESS_PASSWORD"],
@@ -1165,6 +1176,8 @@ class EmailServer
$arrayData["MESS_ENGINE"] = $row["MESS_ENGINE"];
$arrayData["MESS_SERVER"] = $row["MESS_SERVER"];
$arrayData["MESS_PORT"] = (int)($row["MESS_PORT"]);
$arrayData["MESS_INCOMING_SERVER"] = $row["MESS_INCOMING_SERVER"];
$arrayData["MESS_INCOMING_PORT"] = (int)($row["MESS_INCOMING_PORT"]);
$arrayData["MESS_RAUTH"] = (int)($row["MESS_RAUTH"]);
$arrayData["MESS_ACCOUNT"] = $row["MESS_ACCOUNT"];
$arrayData["MESS_PASSWORD"] = $row["MESS_PASSWORD"];
@@ -1221,6 +1234,7 @@ class EmailServer
$criteria->add(
$criteria->getNewCriterion(\EmailServerPeer::MESS_ENGINE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE)->addOr(
$criteria->getNewCriterion(\EmailServerPeer::MESS_SERVER, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
$criteria->getNewCriterion(\EmailServerPeer::MESS_INCOMING_SERVER,"%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
$criteria->getNewCriterion(\EmailServerPeer::MESS_ACCOUNT, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
$criteria->getNewCriterion(\EmailServerPeer::MESS_FROM_NAME, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))->addOr(
$criteria->getNewCriterion(\EmailServerPeer::SMTPSECURE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE))
@@ -1245,7 +1259,7 @@ class EmailServer
if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField);
if (in_array($sortField, array("MESS_ENGINE", "MESS_SERVER", "MESS_ACCOUNT", "MESS_FROM_NAME", "SMTPSECURE"))) {
if (in_array($sortField, array("MESS_ENGINE", "MESS_SERVER", "MESS_INCOMING_SERVER", "MESS_ACCOUNT", "MESS_FROM_NAME", "SMTPSECURE"))) {
$sortField = \EmailServerPeer::TABLE_NAME . "." . $sortField;
} else {
$sortField = \EmailServerPeer::MESS_ENGINE;
@@ -1318,6 +1332,7 @@ class EmailServer
$row = $rsCriteria->getRow();
$row["MESS_PORT"] = (int)($row["MESS_PORT"]);
$row["MESS_INCOMING_PORT"] = (int)($row["MESS_INCOMING_PORT"]);
$row["MESS_RAUTH"] = (int)($row["MESS_RAUTH"]);
$row["MESS_TRY_SEND_INMEDIATLY"] = (int)($row["MESS_TRY_SEND_INMEDIATLY"]);
$row["MESS_DEFAULT"] = (int)($row["MESS_DEFAULT"]);

View File

@@ -8,6 +8,7 @@ use G;
use PMmemcached;
use ProcessPeer;
use ResultSet;
use UsersPropertiesPeer;
class Process
{
@@ -2160,4 +2161,21 @@ class Process
return $processes;
}
/**
* Set for the first time the user opened the dynaform editor.
*
* @param string $usrUid
* @param string $seen
*/
public function setIfFirstTimeConsumed($usrUid, $seen)
{
if ($seen === '1') {
$userProperties = UsersPropertiesPeer::retrieveByPk($usrUid);
if ($userProperties) {
$userProperties->setPmDynaformFirstTime('1');
$userProperties->save();
}
}
}
}

View File

@@ -749,6 +749,8 @@ class Variable
*
* @return array
* @throws Exception
* @see ProcessMaker\BusinessModel\Variable->executeSql()
* @see ProcessMaker\BusinessModel\Variable->executeSqlSuggest()
*/
public function executeSqlControl($proUid, array $params = [])
{
@@ -758,6 +760,7 @@ class Variable
$dynUid = $params["dyn_uid"];
$fieldId = $params["field_id"];
$filter = isset($params["filter"]) ? $params["filter"] : "";
$query = isset($params["query"]) ? $params["query"] : [];
$start = isset($params["start"]) ? $params["start"] : 0;
$limit = isset($params["limit"]) ? $params["limit"] : 10;
$appUid = empty($params["app_uid"]) ? null : $params["app_uid"];
@@ -767,6 +770,7 @@ class Variable
unset($params["app_uid"]);
unset($params["del_index"]);
unset($params["filter"]);
unset($params["query"]);
unset($params["start"]);
unset($params["limit"]);
@@ -797,6 +801,7 @@ class Variable
$field->queryField = true;
$field->queryInputData = $params;
$field->queryFilter = $filter;
$field->querySearch = $query;
$field->queryStart = $start;
$field->queryLimit = $limit;
//Grids only access the global variables of 'ProcessMaker', other variables are removed.
@@ -809,7 +814,12 @@ class Variable
}
//Populate control data
$pmDynaform->clearLastQueryError();
$pmDynaform->jsonr($field);
$error = $pmDynaform->getLastQueryError();
if (!empty($error) && is_object($error)) {
throw new Exception(G::LoadTranslation("ID_ERROR_IN_THE_QUERY"));
}
$result = [];
if (isset($field->queryOutputData) && is_array($field->queryOutputData)) {
foreach ($field->queryOutputData as $item) {

View File

@@ -0,0 +1,98 @@
<?php
namespace ProcessMaker\Core;
/**
* Class to manage the processes that runs in the shell
*/
class ProcessesManager
{
// Class properties
private $processes;
private $sleepTime = 1;
private $terminated = [];
private $errors = [];
/**
* Class constructor
*
* @param array $processes
*/
public function __construct(array $processes)
{
$this->processes = $processes;
}
/**
* Get the list of terminated processes
*
* @return array
*/
public function getTerminated()
{
return $this->terminated;
}
/**
* Get the list of processes with errors
*
* @return array
*/
public function getErrors()
{
return $this->errors;
}
/**
* Set the sleep time after each statuses revision
*
* @param int $sleepTime
*/
public function setSleepTime($sleepTime)
{
$this->sleepTime = $sleepTime;
}
/**
* Run the processes
*/
public function run()
{
// Start all processes
foreach ($this->processes as $process) {
$process->run();
}
// Manage the processes
$this->manage();
}
/**
* Manage all started processes
*/
private function manage()
{
do {
// Check all remaining processes
foreach ($this->processes as $index => $process) {
// If the process has finished, save the info and destroy it
if ($process->getStatus() === RunProcess::TERMINATED || $process->getStatus() === RunProcess::ERROR) {
$processInfo = ['command' => $process->getCommand(), 'rawAnswer' => $process->getRawAnswer()];
if ($process->getStatus() === RunProcess::TERMINATED) {
// Processes completed successfully
$this->terminated[] = $processInfo;
} else {
// Processes completed with errors
$this->errors[] = $processInfo;
}
// Destroy the process
unset($this->processes[$index]);
}
}
// Waiting...
sleep($this->sleepTime);
} while (!empty($this->processes));
}
}

View File

@@ -0,0 +1,146 @@
<?php
namespace ProcessMaker\Core;
/**
* This class run a command in shell and stores the pointer to him
*/
class RunProcess
{
// Class constants
const TERMINATED = 'terminated';
const RUNNING = 'running';
const NOT_RUNNING = 'not_running';
const ERROR = 'error';
// This constant can be overrides in the child class according to the command response, always should be have a value
const EXPECTED_ANSWER = '1';
// Class properties
private $resource;
private $command;
private $rawAnswer;
private $status;
private $exitCode;
private $pipes;
private $descriptors = [
['pipe', 'r'],
['pipe', 'w'],
['pipe', 'w']
];
/**
* Class constructor
*
* @param string $command
*/
public function __construct($command)
{
$this->command = $command;
}
/**
* Class destructor, the resource created should be closed
*/
public function __destruct()
{
if (is_resource($this->resource)) {
proc_close($this->resource);
}
}
/**
* Get the command
*
* @return string
*/
public function getCommand()
{
return $this->command;
}
/**
* Get the raw response
*
* @return string|null
*/
public function getRawAnswer()
{
return $this->rawAnswer;
}
/**
* Get the status
*
* @return string
*/
public function getStatus()
{
// If already exist a status return this value
if ($this->status !== null) {
return $this->status;
}
// If doesn't exists a resource the process is not running
if (!is_resource($this->resource)) {
return self::NOT_RUNNING;
}
// If the process is running return this value
if ($this->isRunning()) {
return self::RUNNING;
}
// If the process is not running, parse the response to determine the status
$this->rawAnswer = stream_get_contents($this->pipes[1]);
$this->status = $this->parseAnswer();
return $this->status;
}
/**
* Get the exit code
*
* @return string|null
*/
public function getExitCode()
{
return $this->exitCode;
}
/**
* Run the command
*/
public function run()
{
$this->resource = proc_open($this->command, $this->descriptors, $this->pipes);
}
/**
* Process is running?
*
* @return bool
*/
public function isRunning()
{
// Get the process status
$status = proc_get_status($this->resource);
// If process is not running get the exit code
if ($status['running'] === false) {
$this->exitCode = $status['exitcode'];
}
return $status['running'];
}
/**
* Process the raw response and compare with the expected answer in order to determine the status
*
* @return string
*/
public function parseAnswer()
{
return $this->rawAnswer === self::EXPECTED_ANSWER ? self::TERMINATED : self::ERROR;
}
}

View File

@@ -9,6 +9,7 @@ use Faker;
use G;
use GzipFile;
use Illuminate\Database\QueryException;
use Illuminate\Foundation\Http\Kernel;
use Illuminate\Support\Facades\DB;
use InputFilter;
use InstallerModule;
@@ -242,39 +243,6 @@ class System
return $items;
}
/**
* Review the checksum.txt
*
* @return array $result
*/
public static function verifyChecksum()
{
if (!file_exists(PATH_TRUNK . "checksum.txt")) {
return false;
}
$lines = explode("\n", file_get_contents(PATH_TRUNK . "checksum.txt"));
$result = array("diff" => array(), "missing" => array()
);
foreach ($lines as $line) {
if (empty($line)) {
continue;
}
list ($checksum, $empty, $filename) = explode(" ", $line);
//Skip xmlform because these files always change.
if (strpos($filename, "/xmlform/") !== false) {
continue;
}
if (file_exists(realpath($filename))) {
if (strcmp($checksum, G::encryptFileOld(realpath($filename))) != 0) {
$result['diff'][] = $filename;
}
} else {
$result['missing'][] = $filename;
}
}
return $result;
}
/**
* This function checks files to do updated to pm
*
@@ -1629,5 +1597,21 @@ class System
{
return !empty(self::getServerHostname()) ? self::getServerHostname() : 'processmaker.com';
}
/**
* Initialize laravel database configuration
* @see workflow/engine/bin/tasks/cliWorkspaces.php->check_queries_incompatibilities()
*/
public static function initLaravel()
{
config(['database.connections.workflow.host' => DB_HOST]);
config(['database.connections.workflow.database' => DB_NAME]);
config(['database.connections.workflow.username' => DB_USER]);
config(['database.connections.workflow.password' => DB_PASS]);
app()->useStoragePath(realpath(PATH_DATA));
app()->make(Kernel::class)->bootstrap();
restore_error_handler();
}
}
// end System class

View File

@@ -66,4 +66,16 @@ class Dynaform extends Model
->where('DYNAFORM.DYN_UID', '!=', $dynUid)
->get();
}
/**
* Scope a query to filter an specific process
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $columns
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeProcess($query, string $proUID)
{
return $query->where('PRO_UID', $proUID);
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace ProcessMaker\Model;
use Illuminate\Database\Eloquent\Model;
class ProcessVariables extends Model
{
// Set our table name
protected $table = 'PROCESS_VARIABLES';
// No timestamps
public $timestamps = false;
//primary key
protected $primaryKey = 'VAR_UID';
/**
* Scope a query to filter an specific process
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $columns
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeProcess($query, string $proUID)
{
return $query->where('PRJ_UID', $proUID);
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace ProcessMaker\Model;
use Illuminate\Database\Eloquent\Model;
class Triggers extends Model
{
// Set our table name
protected $table = 'TRIGGERS';
// No timestamps
public $timestamps = false;
//primary key
protected $primaryKey = 'TRI_UID';
/**
* Scope a query to filter an specific process
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $columns
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeProcess($query, string $proUID)
{
return $query->where('PRO_UID', $proUID);
}
}

View File

@@ -154,6 +154,13 @@ class ActionsByEmail extends Api
$arrayData = $filesManager->addProcessFilesManager($proId, $userUid, $data);
@copy(PATH_TPL . 'actionsByEmail' . PATH_SEP . 'actionsByEmail.html', $path . 'actionsByEmail.html');
}
/*----------------------------------********---------------------------------*/
if (!file_exists($path . 'actionsByEmailErrorReply.html')) {
$data = array('prf_content' => '', 'prf_filename' => 'actionsByEmailErrorReply.html', 'prf_path' => 'templates');
$arrayData = $filesManager->addProcessFilesManager($proId, $userUid, $data);
@copy(PATH_TPL . 'actionsByEmail' . PATH_SEP . 'actionsByEmailErrorReply.html', $path . 'actionsByEmailErrorReply.html');
}
/*----------------------------------********---------------------------------*/
}
$directory = dir($path);

View File

@@ -366,8 +366,9 @@ class Project extends Api
*
* @url GET /:prj_uid/dynaforms
* @param string $prj_uid {@min 32}{@max 32}
* @param string $seen
*/
public function doGetDynaForms($prj_uid)
public function doGetDynaForms($prj_uid, $seen = '0')
{
try {
$process = new \ProcessMaker\BusinessModel\Process();
@@ -375,7 +376,7 @@ class Project extends Api
$process->setArrayFieldNameForException(array("processUid" => "prj_uid"));
$response = $process->getDynaForms($prj_uid);
$process->setIfFirstTimeConsumed($this->getUserId(), $seen);
return DateTime::convertUtcToIso8601($response, $this->arrayFieldIso8601);
} catch (Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -0,0 +1,61 @@
<?php
namespace ProcessMaker\Upgrade;
use ProcessMaker\Core\RunProcess;
/**
* Extended class to manage the processes that executes a queries in the upgrade process
*/
class RunProcessUpgradeQuery extends RunProcess
{
// Class constants
const SUCCESS = 'success';
const CMD = PHP_BINARY . ' processmaker upgrade-query %s %s %s';
const RBAC = '1';
const NO_RBAC = '0';
// Class properties
private $workspace;
private $sql;
private $isRbac;
/**
* Class constructor
*
* @param string $workspace
* @param string $sql
* @param bool $isRbac
*/
public function __construct($workspace, $sql, $isRbac = false)
{
// Set properties values
$this->workspace = $workspace;
$this->sql = $sql;
$this->isRbac = $isRbac;
// Build the command and send to the parent class
parent::__construct($this->buildCommand());
}
/**
* Override the parent method in order to compare the raw response with the SUCCESS value
*
* @return string
*/
public function parseAnswer()
{
return $this->getRawAnswer() === self::SUCCESS ? parent::TERMINATED : parent::ERROR;
}
/**
* Build the command to execute a query for the upgrade process
*
* @return string
*/
private function buildCommand()
{
return sprintf(self::CMD, $this->workspace, base64_encode($this->sql),
($this->isRbac ? self::RBAC : self::NO_RBAC));
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace ProcessMaker\Util;
use WsResponse;
class WsMessageResponse extends WsResponse
{
private $appMessUid = null;
/**
* Get the appMessUid
*
* @return array
*/
public function getAppMessUid()
{
return $this->appMessUid;
}
/**
* Set the appMessUid
*
* @param string $v
* @return void
*/
public function setAppMessUid($v)
{
$this->appMessUid = $v;
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace ProcessMaker\Validation;
use ProcessMaker\Model\Dynaform;
use ProcessMaker\Model\Process;
use ProcessMaker\Model\ProcessVariables;
use ProcessMaker\Model\Triggers;
class MySQL57
{
const REGEX = '/(?i)(select|\$).*?UNION.*?(select|\$).*?/ms';
/**
* Checks the queries inside triggers that could have possible incompatibilities with MySQL 5.7
*
* @see workflow/engine/bin/tasks/cliWorkspaces.php->check_queries_incompatibilities()
* @param array $processes
* @return array
*/
public function checkIncompatibilityTriggers($processes)
{
$result = [];
foreach ($processes as $process) {
$triggerQuery = Triggers::query()->select();
//Call the scope method to filter by process
$triggerQuery->process($process['PRO_UID']);
$triggers = $triggerQuery->get()->values()->toArray();
foreach ($triggers as $trigger) {
$resultIncompatibility = $this->analyzeQuery($trigger['TRI_WEBBOT']);
if ($resultIncompatibility) {
$aux = array_merge($process, $trigger);
array_push($result, $aux);
}
}
}
return $result;
}
/**
* Checks the queries inside dynaforms that could have possible incompatibilities with MySQL 5.7
*
* @see workflow/engine/bin/tasks/cliWorkspaces.php->check_queries_incompatibilities()
* @param array $processes
* @return array
*/
public function checkIncompatibilityDynaforms($processes)
{
$result = [];
foreach ($processes as $process) {
$dynaformQuery = Dynaform::query()->select();
//Call the scope method to filter by process
$dynaformQuery->process($process['PRO_UID']);
$dynaforms = $dynaformQuery->get()->values()->toArray();
foreach ($dynaforms as $dynaform) {
$resultIncompatibility = $this->analyzeQuery($dynaform['DYN_CONTENT']);
if ($resultIncompatibility) {
$aux = array_merge($process, $dynaform);
array_push($result, $aux);
}
}
}
return $result;
}
/**
* Checks the queries inside variables that could have possible incompatibilities with MySQL 5.7
*
* @see workflow/engine/bin/tasks/cliWorkspaces.php->check_queries_incompatibilities()
* @param array $processes
* @return array
*/
public function checkIncompatibilityVariables($processes)
{
$result = [];
foreach ($processes as $process) {
$variablesQuery = ProcessVariables::query()->select();
//Call the scope method to filter by process
$variablesQuery->process($process['PRO_UID']);
$variables = $variablesQuery->get()->values()->toArray();
foreach ($variables as $variable) {
$resultIncompatibility = $this->analyzeQuery($variable['VAR_SQL']);
if ($resultIncompatibility) {
$aux = array_merge($process, $variable);
array_push($result, $aux);
}
}
}
return $result;
}
/**
* Analyze the query using the regular expression
*
* @param string $query
* @return bool
*/
public function analyzeQuery($query)
{
preg_match_all($this::REGEX, $query, $matches, PREG_SET_ORDER, 0);
return !empty($matches);
}
}

View File

@@ -0,0 +1,20 @@
<table style="background-color: white; font-family: Arial,Helvetica,sans-serif; color: black; font-size: 11px; text-align: left;"
cellpadding="10" cellspacing="0" width="100%">
<tr>
<td style="font-size: 14px;"><strong>ACTIONS BY EMAIL</strong></td>
</tr>
<tr>
<td style="vertical-align:middle;">
<hr>
<br/>
@#ACTIONS_BY_EMAIL_ERROR_MESSAGE
<br/>
<br/>
<hr>
<strong>This is an automated email, please do not replay to it.</strong>
<br/>
<a href="http://www.processmaker.com" style="color:#c40000;">www.processmaker.com</a>
<br/>
</td>
</tr>
</table>

View File

@@ -11,16 +11,21 @@
<link rel="stylesheet" href="/lib/pmdynaform/build/css/PMDynaform.css">
<link rel="stylesheet" href="/css/{sys_skin}-pm3.css">
<link rel="stylesheet" href="/lib/pmdynaform/libs/font-awesome-4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="/lib/pmdynaform/libs/select2/select2.min.css">
<link rel="stylesheet" href="/lib/pmdynaform/libs/select2/select2-bootstrap.min.css">
<link rel="stylesheet" href="/lib/pmdynaform/libs/animate-css/animate.css">
<script type="text/javascript" src="/translations/translationsMafe.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/moment/moment.min.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery-1.11.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/select2/select2.min.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/datepicker/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/underscore/underscore-1.8.3.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/backbone/backbone-min.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/html5/html5.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/respondjs/respond.min.js"></script>
<script type="text/javascript" src="/lib/pmdynaform/libs/bootstrap-notify-3.1.3/bootstrap-notify.min.js"></script>
</head>
<body style="height:100%">
<div id="container" style="height:100%;display:none;"></div>

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="/lib/pmdynaform/libs/font-awesome-4.6.3/css/font-awesome.min.css">
<!-- translations -->
<script type="text/javascript" src="{$translationMafe}"></script>
@@ -29,6 +30,7 @@
var SYS_LANG = "{$SYS_LANG}";
var SYS_SKIN = "{$SYS_SKIN}";
var HTTP_SERVER_HOSTNAME = "{$HTTP_SERVER_HOSTNAME}";
var PMDYNAFORM_FIRST_TIME = "{$PMDYNAFORM_FIRST_TIME}" === "1";
var maxFileSizeInformation = {$maxFileSizeInformation};
</script>
<script type="text/javascript" src="/lib-dev/js/wz_jsgraphics.js"></script>
@@ -87,6 +89,7 @@
var SYS_LANG = "{$SYS_LANG}";
var SYS_SKIN = "{$SYS_SKIN}";
var HTTP_SERVER_HOSTNAME = "{$HTTP_SERVER_HOSTNAME}";
var PMDYNAFORM_FIRST_TIME = "{$PMDYNAFORM_FIRST_TIME}" === "1";
var maxFileSizeInformation = {$maxFileSizeInformation};
</script>
<script type="text/javascript" src="/lib/js/mafe-{$buildhash}.js"></script>
@@ -96,7 +99,6 @@
{/if}
</head>
<body onresize="resizingFrame();">
<!--<div class="ui-layout-north">-->

View File

@@ -48,83 +48,69 @@ emailServer.application = {
}
/*----------------------------------********---------------------------------*/
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
if (typeEmailEngine === "PHPMAILER") {
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
var smtpSecure = rdoGrpOption.getGroupValue();
p = {
option: option,
cboEmailEngine: typeEmailEngine,
server: Ext.getCmp("txtServer").getValue(),
port: Ext.getCmp("txtPort").getValue(),
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked) ? 1 : 0,
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
password: Ext.getCmp("txtPassword").getValue(),
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
smtpSecure: smtpSecure,
sendTestMail: (Ext.getCmp("chkSendTestMail").checked) ? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
} else if (typeEmailEngine === "IMAP") {
/*----------------------------------********---------------------------------*/
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
var smtpSecure = rdoGrpOption.getGroupValue();
p = {
option: option,
cboEmailEngine: typeEmailEngine,
server: Ext.getCmp("txtServer").getValue(),
port: Ext.getCmp("txtPort").getValue(),
incomingServer: Ext.getCmp("txtIncomingServer").getValue(),
incomingPort: Ext.getCmp("txtIncomingPort").getValue(),
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked) ? 1 : 0,
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
password: Ext.getCmp("txtPassword").getValue(),
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
smtpSecure: smtpSecure,
sendTestMail: (Ext.getCmp("chkSendTestMail").checked) ? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
/*----------------------------------********---------------------------------*/
} else {
//MAIL
p = {
option: option,
cboEmailEngine: typeEmailEngine,
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
}
switch (option) {
case "INS":
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
if (typeEmailEngine == "PHPMAILER") {
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
var smtpSecure = rdoGrpOption.getGroupValue();
p = {
option: option,
cboEmailEngine: typeEmailEngine,
server: Ext.getCmp("txtServer").getValue(),
port: Ext.getCmp("txtPort").getValue(),
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0,
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
password: Ext.getCmp("txtPassword").getValue(),
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
smtpSecure: smtpSecure,
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
} else {
//MAIL
p = {
option: option,
cboEmailEngine: typeEmailEngine,
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
}
break;
case "UPD":
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
if (typeEmailEngine == "PHPMAILER") {
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
var smtpSecure = rdoGrpOption.getGroupValue();
p = {
option: option,
emailServerUid: emailServerUid,
cboEmailEngine: typeEmailEngine,
server: Ext.getCmp("txtServer").getValue(),
port: Ext.getCmp("txtPort").getValue(),
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0,
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
password: Ext.getCmp("txtPassword").getValue(),
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
smtpSecure: smtpSecure,
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
} else {
//MAIL
p = {
option: option,
emailServerUid: emailServerUid,
cboEmailEngine: typeEmailEngine,
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
}
p.emailServerUid = emailServerUid;
break;
case "DEL":
p = {
@@ -132,45 +118,6 @@ emailServer.application = {
emailServerUid: emailServerUid
};
break;
//case "LST":
// break;
case "TEST":
var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue();
if (typeEmailEngine == "PHPMAILER") {
var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue();
var smtpSecure = rdoGrpOption.getGroupValue();
p = {
option: option,
cboEmailEngine: typeEmailEngine,
server: Ext.getCmp("txtServer").getValue(),
port: Ext.getCmp("txtPort").getValue(),
reqAuthentication: (Ext.getCmp("chkReqAuthentication").checked)? 1 : 0,
accountFrom: Ext.getCmp("txtAccountFrom").getValue(),
password: Ext.getCmp("txtPassword").getValue(),
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
smtpSecure: smtpSecure,
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
} else {
//MAIL
p = {
option: option,
cboEmailEngine: typeEmailEngine,
fromMail: Ext.getCmp("txtFromMail").getValue(),
fromName: Ext.getCmp("txtFromName").getValue(),
sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0,
mailTo: Ext.getCmp("txtMailTo").getValue(),
emailServerDefault: emailDefault
};
}
break;
}
Ext.Ajax.request({
@@ -240,11 +187,16 @@ emailServer.application = {
Ext.getCmp("txtServer").allowBlank = true;
Ext.getCmp("txtPort").allowBlank = true;
Ext.getCmp("txtIncomingServer").allowBlank = true;
Ext.getCmp("txtIncomingPort").allowBlank = true;
Ext.getCmp("txtAccountFrom").allowBlank = true;
Ext.getCmp("txtServer").setValue("");
Ext.getCmp("txtPort").setValue("");
Ext.getCmp("txtIncomingServer").setValue("");
Ext.getCmp("txtIncomingPort").setValue("");
Ext.getCmp("chkReqAuthentication").setValue(false);
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
@@ -286,6 +238,9 @@ emailServer.application = {
Ext.getCmp("txtServer").setValue(record.get("MESS_SERVER"));
Ext.getCmp("txtPort").setValue((record.get("MESS_PORT") != 0)? record.get("MESS_PORT") : "");
Ext.getCmp("txtIncomingServer").setValue(record.get("MESS_INCOMING_SERVER"));
Ext.getCmp("txtIncomingPort").setValue((record.get("MESS_INCOMING_PORT") !== 0)? record.get("MESS_INCOMING_PORT") : "");
Ext.getCmp("chkReqAuthentication").setValue((parseInt(record.get("MESS_RAUTH")) == 1)? true : false);
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
@@ -323,10 +278,21 @@ emailServer.application = {
{
Ext.getCmp("frmEmailServer").getForm().clearInvalid();
if (cboEmailEngine == "PHPMAILER") {
if (cboEmailEngine === "PHPMAILER") {
Ext.getCmp("txtServer").setVisible(true);
Ext.getCmp("txtPort").setVisible(true);
try {
Ext.getCmp("txtServer").label.update(_("ID_SERVER"));
Ext.getCmp("txtPort").label.update(_("PORT_DEFAULT"));
} catch (err) {
Ext.getCmp("txtServer").fieldLabel = _("ID_SERVER");
Ext.getCmp("txtPort").fieldLabel = _("PORT_DEFAULT");
}
Ext.getCmp("txtIncomingServer").setVisible(false);
Ext.getCmp("txtIncomingPort").setVisible(false);
Ext.getCmp("chkReqAuthentication").setVisible(true);
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
@@ -336,12 +302,46 @@ emailServer.application = {
Ext.getCmp("txtServer").allowBlank = false;
Ext.getCmp("txtPort").allowBlank = false;
Ext.getCmp("txtIncomingServer").allowBlank = true;
Ext.getCmp("txtIncomingPort").allowBlank = true;
Ext.getCmp("txtAccountFrom").allowBlank = false;
} else if (cboEmailEngine === "IMAP") {
/*----------------------------------********---------------------------------*/
Ext.getCmp("txtServer").setVisible(true);
Ext.getCmp("txtPort").setVisible(true);
try {
Ext.getCmp("txtServer").label.update(_("ID_OUTGOING_SERVER"));
Ext.getCmp("txtPort").label.update(_("OUTGOING_PORT_DEFAULT"));
} catch (err) {
Ext.getCmp("txtServer").fieldLabel = _("ID_OUTGOING_SERVER");
Ext.getCmp("txtPort").fieldLabel = _("OUTGOING_PORT_DEFAULT");
}
Ext.getCmp("txtIncomingServer").setVisible(true);
Ext.getCmp("txtIncomingPort").setVisible(true);
Ext.getCmp("chkReqAuthentication").setVisible(true);
emailServerSetPassword(Ext.getCmp("chkReqAuthentication").checked);
Ext.getCmp("txtAccountFrom").setVisible(true);
Ext.getCmp("rdoGrpSmtpSecure").setVisible(true);
Ext.getCmp("txtServer").allowBlank = false;
Ext.getCmp("txtPort").allowBlank = false;
Ext.getCmp("txtIncomingServer").allowBlank = false;
Ext.getCmp("txtIncomingPort").allowBlank = false;
Ext.getCmp("txtAccountFrom").allowBlank = false;
/*----------------------------------********---------------------------------*/
} else {
//MAIL
Ext.getCmp("txtServer").setVisible(false);
Ext.getCmp("txtPort").setVisible(false);
Ext.getCmp("txtIncomingServer").setVisible(false);
Ext.getCmp("txtIncomingPort").setVisible(false);
Ext.getCmp("chkReqAuthentication").setVisible(false);
emailServerSetPassword(false);
@@ -351,6 +351,8 @@ emailServer.application = {
Ext.getCmp("txtServer").allowBlank = true;
Ext.getCmp("txtPort").allowBlank = true;
Ext.getCmp("txtIncomingServer").allowBlank = true;
Ext.getCmp("txtIncomingPort").allowBlank = true;
Ext.getCmp("txtAccountFrom").allowBlank = true;
Ext.getCmp("txtPassword").allowBlank = true;
}
@@ -384,7 +386,7 @@ emailServer.application = {
FLAGTEST = 1;
if (option == "PHPMAILER") {
if (option === "PHPMAILER" || option === "IMAP") {
if (typeof(testData.resolving_name) != "undefined") {
if (testData.resolving_name.result) {
msg = msg + "<img src = \"/images/select-icon.png\" width=\"17\" height=\"17\" style=\"margin-right: 0.9em; color: #0000FF;\" />" + testData.resolving_name.title + "<br />";
@@ -492,6 +494,8 @@ emailServer.application = {
{name: "MESS_ENGINE", type: "string"},
{name: "MESS_SERVER", type: "string"},
{name: "MESS_PORT", type: "int"},
{name: "MESS_INCOMING_SERVER", type: "string"},
{name: "MESS_INCOMING_PORT", type: "int"},
{name: "MESS_RAUTH", type: "int"},
{name: "MESS_ACCOUNT", type: "string"},
{name: "MESS_PASSWORD", type: "string"},
@@ -548,6 +552,9 @@ emailServer.application = {
data: [
["PHPMAILER", "SMTP (PHPMailer)"],
/*----------------------------------********---------------------------------*/
["IMAP", "SMTP - IMAP (PHPMailer)"],
/*----------------------------------********---------------------------------*/
["MAIL", "Mail (PHP)"]
]
});
@@ -597,6 +604,24 @@ emailServer.application = {
emptyText: null
});
var txtIncomingServer = new Ext.form.TextField({
id: "txtIncomingServer",
name: "txtIncomingServer",
fieldLabel: _("ID_INCOMING_SERVER") //Server
});
var txtIncomingPort = new Ext.form.NumberField({
id: "txtIncomingPort",
name: "txtIncomingPort",
fieldLabel: _("INCOMING_PORT_DEFAULT"), //Port (default 993)
anchor: "36%",
maxLength: 3,
emptyText: null
});
var chkReqAuthentication = new Ext.form.Checkbox({
id: "chkReqAuthentication",
name: "chkReqAuthentication",
@@ -745,7 +770,7 @@ emailServer.application = {
var winData = new Ext.Window({
layout: "fit",
width: 550,
height: 388,
height: 450,
//title: "",
modal: true,
resizable: false,
@@ -772,6 +797,8 @@ emailServer.application = {
cboEmailEngine,
txtServer,
txtPort,
txtIncomingServer,
txtIncomingPort,
chkReqAuthentication,
txtAccountFrom,
txtPassword,
@@ -997,6 +1024,16 @@ emailServer.application = {
return (value != 0)? value : "-";
};
var rendererMessIncomingServer = function (value)
{
return (value !== "")? value : "-";
};
var rendererMessIncomingPort = function (value)
{
return (value !== 0)? value : "-";
};
var rendererMessSmtpSecure = function (value)
{
return (value != "")? value : "-";
@@ -1017,6 +1054,8 @@ emailServer.application = {
{id: "MESS_ENGINE", dataIndex: "MESS_ENGINE", hidden: false, header: _("EMAIL_ENGINE"), width: 80, hideable: true, align: "left"},
{id: "MESS_SERVER", dataIndex: "MESS_SERVER", hidden: false, header: _("ID_SERVER"), width: 150, hideable: true, align: "center", renderer: rendererMessServer},
{id: "MESS_PORT", dataIndex: "MESS_PORT", hidden: false, header: _("ID_EMAIL_SERVER_PORT"), width: 50, hideable: true, align: "center", renderer: rendererMessPort},
{id: "MESS_INCOMING_SERVER", dataIndex: "MESS_INCOMING_SERVER", hidden: true, header: _("ID_INCOMING_SERVER"), width: 150, hideable: true, align: "center", renderer: rendererMessIncomingServer},
{id: "MESS_INCOMING_PORT", dataIndex: "MESS_INCOMING_PORT", hidden: true, header: _("ID_EMAIL_SERVER_PORT"), width: 50, hideable: true, align: "center", renderer: rendererMessIncomingPort},
{id: "MESS_RAUTH", dataIndex: "MESS_RAUTH", hidden: true, header: _("REQUIRE_AUTHENTICATION"), width: 50, hideable: false, align: "left"},
{id: "MESS_ACCOUNT", dataIndex: "MESS_ACCOUNT", hidden: false, header: _("ID_EMAIL_SERVER_ACCOUNT_FROM"), width: 130, hideable: true, align: "left"},
{id: "MESS_PASSWORD", dataIndex: "MESS_PASSWORD", hidden: true, header: _("ID_PASSWORD"), width: 130, hideable: false, align: "left"},