Merged in cochalo/processmaker (pull request #271)

Correcion de labels 404
This commit is contained in:
erik ao
2014-03-05 12:10:08 -04:00
6 changed files with 58 additions and 58 deletions

View File

@@ -224,9 +224,9 @@ class DataBaseConnection
$respTest['0']['test'] = 'Resolving Host Name ' . $dataCon['DBS_SERVER']; $respTest['0']['test'] = 'Resolving Host Name ' . $dataCon['DBS_SERVER'];
if ($Server->getErrno() != 0) { if ($Server->getErrno() != 0) {
if ($returnArray) { if ($returnArray) {
$respTest['0']['error'] = "Error Testting Connection: Resolving Host Name FAILED : " . $Server->error; $respTest['0']['error'] = "Error Testing Connection: Resolving Host Name FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Resolving Host Name FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Resolving Host Name FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }
@@ -237,9 +237,9 @@ class DataBaseConnection
$Server->scannPort($dataCon['DBS_PORT']); $Server->scannPort($dataCon['DBS_PORT']);
if ($Server->getErrno() != 0) { if ($Server->getErrno() != 0) {
if ($returnArray) { if ($returnArray) {
$respTest['1']['error'] = "Error Testting Connection: Checking port FAILED : " . $Server->error; $respTest['1']['error'] = "Error Testing Connection: Checking port FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Checking port FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Checking port FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }
@@ -253,17 +253,17 @@ class DataBaseConnection
$response = $Server->tryConnectServer($dataCon['DBS_TYPE']); $response = $Server->tryConnectServer($dataCon['DBS_TYPE']);
if ($response->status != 'SUCCESS') { if ($response->status != 'SUCCESS') {
if ($returnArray) { if ($returnArray) {
$respTest['2']['error'] = "Error Testting Connection: Trying to connect to host FAILED : " . $Server->error; $respTest['2']['error'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Trying to connect to host FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }
} else { } else {
if ($returnArray) { if ($returnArray) {
$respTest['2']['error'] = "Error Testting Connection: Trying to connect to host FAILED : " . $Server->error; $respTest['2']['error'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Trying to connect to host FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Trying to connect to host FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }
@@ -279,25 +279,25 @@ class DataBaseConnection
$response = $Server->tryOpenDataBase($dataCon['DBS_TYPE']); $response = $Server->tryOpenDataBase($dataCon['DBS_TYPE']);
if ($response->status != 'SUCCESS') { if ($response->status != 'SUCCESS') {
if ($returnArray) { if ($returnArray) {
$respTest['3']['error'] = "Error Testting Connection: Trying to open database FAILED : " . $Server->error; $respTest['3']['error'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Trying to open database FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }
} else { } else {
if ($returnArray) { if ($returnArray) {
$respTest['3']['error'] = "Error Testting Connection: Trying to open database FAILED : " . $Server->error; $respTest['3']['error'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Trying to open database FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }
} else { } else {
if ($returnArray) { if ($returnArray) {
$respTest['3']['error'] = "Error Testting Connection: Trying to open database FAILED : " . $Server->error; $respTest['3']['error'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
} else { } else {
$resp['message'] = "Error Testting Connection: Trying to open database FAILED : " . $Server->error; $resp['message'] = "Error Testing Connection: Trying to open database FAILED : " . $Server->error;
return $resp; return $resp;
} }
} }

View File

@@ -28,7 +28,7 @@ class Event
$oProcess = new \Process(); $oProcess = new \Process();
if (!($oProcess->processExists($pro_uid))) { if (!($oProcess->processExists($pro_uid))) {
throw (new \Exception( 'This process doesn\'t exist!' )); throw (new \Exception( 'This process does not exist!' ));
} }
$sDelimiter = \DBAdapter::getStringDelimiter(); $sDelimiter = \DBAdapter::getStringDelimiter();
@@ -75,7 +75,7 @@ class Event
} }
if ($evn_uid != '' && empty($eventsArray)) { if ($evn_uid != '' && empty($eventsArray)) {
throw (new \Exception( 'This row doesn\'t exist!' )); throw (new \Exception( 'This row does not exist!' ));
} elseif ($evn_uid != '' && !empty($eventsArray)) { } elseif ($evn_uid != '' && !empty($eventsArray)) {
return current($eventsArray); return current($eventsArray);
} }

View File

@@ -176,7 +176,7 @@ class ProcessPermissions
} }
if ($op_uid != '' && empty($aObjectsPermissions)) { if ($op_uid != '' && empty($aObjectsPermissions)) {
throw (new \Exception( 'This row doesn\'t exist!' )); throw (new \Exception( 'This row does not exist!!' ));
} elseif ($op_uid != '' && !empty($aObjectsPermissions)) { } elseif ($op_uid != '' && !empty($aObjectsPermissions)) {
$aObjectsPermissions = array_change_key_case($aObjectsPermissions, CASE_LOWER); $aObjectsPermissions = array_change_key_case($aObjectsPermissions, CASE_LOWER);
return current($aObjectsPermissions); return current($aObjectsPermissions);
@@ -308,11 +308,11 @@ class ProcessPermissions
{ {
$pro_uid = trim($pro_uid); $pro_uid = trim($pro_uid);
if ($pro_uid == '') { if ($pro_uid == '') {
throw (new \Exception("The project with prj_uid: '', does not exist.")); throw (new \Exception("The project with prj_uid: '' does not exist."));
} }
$oProcess = new \Process(); $oProcess = new \Process();
if (!($oProcess->processExists($pro_uid))) { if (!($oProcess->processExists($pro_uid))) {
throw (new \Exception("The project with prj_uid: '$pro_uid', does not exist.")); throw (new \Exception("The project with prj_uid: '$pro_uid' does not exist."));
} }
return $pro_uid; return $pro_uid;
} }
@@ -330,11 +330,11 @@ class ProcessPermissions
{ {
$op_uid = trim($op_uid); $op_uid = trim($op_uid);
if ($op_uid == '') { if ($op_uid == '') {
throw (new \Exception("The process permission with op_uid: '', does not exist.")); throw (new \Exception("The process permission with op_uid: '' does not exist."));
} }
$oObjectPermission = new \ObjectPermission(); $oObjectPermission = new \ObjectPermission();
if (!($oObjectPermission->Exists($op_uid))) { if (!($oObjectPermission->Exists($op_uid))) {
throw (new \Exception("The process permission with op_uid: '$op_uid', does not exist.")); throw (new \Exception("The process permission with op_uid: '$op_uid' does not exist."));
} }
return $op_uid; return $op_uid;
} }
@@ -352,11 +352,11 @@ class ProcessPermissions
{ {
$usr_uid = trim($usr_uid); $usr_uid = trim($usr_uid);
if ($usr_uid == '') { if ($usr_uid == '') {
throw (new \Exception("The user with usr_uid: '', does not exist.")); throw (new \Exception("The user with usr_uid: '' does not exist."));
} }
$oUsers = new \Users(); $oUsers = new \Users();
if (!($oUsers->userExists($usr_uid))) { if (!($oUsers->userExists($usr_uid))) {
throw (new \Exception("The user with usr_uid: '$usr_uid', does not exist.")); throw (new \Exception("The user with usr_uid: '$usr_uid' does not exist."));
} }
return $usr_uid; return $usr_uid;
} }
@@ -374,11 +374,11 @@ class ProcessPermissions
{ {
$grp_uid = trim($grp_uid); $grp_uid = trim($grp_uid);
if ($grp_uid == '') { if ($grp_uid == '') {
throw (new \Exception("The group with usr_uid: '', does not exist.")); throw (new \Exception("The group with usr_uid: '' does not exist."));
} }
$oGroup = new \Groupwf(); $oGroup = new \Groupwf();
if (!($oGroup->GroupwfExists($grp_uid))) { if (!($oGroup->GroupwfExists($grp_uid))) {
throw (new \Exception("The group with usr_uid: '$grp_uid', does not exist.")); throw (new \Exception("The group with usr_uid: '$grp_uid' does not exist."));
} }
return $grp_uid; return $grp_uid;
} }
@@ -396,11 +396,11 @@ class ProcessPermissions
{ {
$tas_uid = trim($tas_uid); $tas_uid = trim($tas_uid);
if ($tas_uid == '') { if ($tas_uid == '') {
throw (new \Exception("The task with tas_uid: '', does not exist.")); throw (new \Exception("The task with tas_uid: '' does not exist."));
} }
$oTask = new \Task(); $oTask = new \Task();
if (!($oTask->taskExists($tas_uid))) { if (!($oTask->taskExists($tas_uid))) {
throw (new \Exception("The task with tas_uid: '$tas_uid', does not exist.")); throw (new \Exception("The task with tas_uid: '$tas_uid' does not exist."));
} }
return $tas_uid; return $tas_uid;
} }
@@ -418,11 +418,11 @@ class ProcessPermissions
{ {
$dyn_uid = trim($dyn_uid); $dyn_uid = trim($dyn_uid);
if ($dyn_uid == '') { if ($dyn_uid == '') {
throw (new \Exception("The dynaform with dynaforms: '', does not exist.")); throw (new \Exception("The dynaform with dynaforms: '' does not exist."));
} }
$oDynaform = new \Dynaform(); $oDynaform = new \Dynaform();
if (!($oDynaform->dynaformExists($dyn_uid))) { if (!($oDynaform->dynaformExists($dyn_uid))) {
throw (new \Exception("The dynaform with dynaforms: '$dyn_uid', does not exist.")); throw (new \Exception("The dynaform with dynaforms: '$dyn_uid' does not exist."));
} }
return $dyn_uid; return $dyn_uid;
} }
@@ -440,11 +440,11 @@ class ProcessPermissions
{ {
$inp_uid = trim($inp_uid); $inp_uid = trim($inp_uid);
if ($inp_uid == '') { if ($inp_uid == '') {
throw (new \Exception("The input with inputs: '', does not exist.")); throw (new \Exception("The input with inputs: '' does not exist."));
} }
$oInputDocument = new \InputDocument(); $oInputDocument = new \InputDocument();
if (!($oInputDocument->InputExists($inp_uid))) { if (!($oInputDocument->InputExists($inp_uid))) {
throw (new \Exception("The input with inputs: '$inp_uid', does not exist.")); throw (new \Exception("The input with inputs: '$inp_uid' does not exist."));
} }
return $inp_uid; return $inp_uid;
} }
@@ -462,11 +462,11 @@ class ProcessPermissions
{ {
$out_uid = trim($out_uid); $out_uid = trim($out_uid);
if ($out_uid == '') { if ($out_uid == '') {
throw (new \Exception("The output with outputs: '', does not exist.")); throw (new \Exception("The output with outputs: '' does not exist."));
} }
$oOutputDocument = new \OutputDocument(); $oOutputDocument = new \OutputDocument();
if (!($oOutputDocument->OutputExists($out_uid))) { if (!($oOutputDocument->OutputExists($out_uid))) {
throw (new \Exception("The output with outputs: '$out_uid', does not exist.")); throw (new \Exception("The output with outputs: '$out_uid' does not exist."));
} }
return $out_uid; return $out_uid;
} }

View File

@@ -133,21 +133,21 @@ class Step
$dynaform = new \Dynaform(); $dynaform = new \Dynaform();
if (!$dynaform->dynaformExists($objectUid)) { if (!$dynaform->dynaformExists($objectUid)) {
$msg = str_replace(array("{0}", "{1}"), array($objectUid, "DYNAFORM"), "The UID \"{0}\" doesn't exist in table {1}"); $msg = str_replace(array("{0}", "{1}"), array($objectUid, "DYNAFORM"), "The UID \"{0}\" does not exist in table {1}");
} }
break; break;
case "INPUT_DOCUMENT": case "INPUT_DOCUMENT":
$inputdoc = new \InputDocument(); $inputdoc = new \InputDocument();
if (!$inputdoc->InputExists($objectUid)) { if (!$inputdoc->InputExists($objectUid)) {
$msg = str_replace(array("{0}", "{1}"), array($objectUid, "INPUT_DOCUMENT"), "The UID \"{0}\" doesn't exist in table {1}"); $msg = str_replace(array("{0}", "{1}"), array($objectUid, "INPUT_DOCUMENT"), "The UID \"{0}\" does not exist in table {1}");
} }
break; break;
case "OUTPUT_DOCUMENT": case "OUTPUT_DOCUMENT":
$outputdoc = new \OutputDocument(); $outputdoc = new \OutputDocument();
if (!$outputdoc->OutputExists($objectUid)) { if (!$outputdoc->OutputExists($objectUid)) {
$msg = str_replace(array("{0}", "{1}"), array($objectUid, "OUTPUT_DOCUMENT"), "The UID \"{0}\" doesn't exist in table {1}"); $msg = str_replace(array("{0}", "{1}"), array($objectUid, "OUTPUT_DOCUMENT"), "The UID \"{0}\" does not exist in table {1}");
} }
break; break;
} }
@@ -204,7 +204,7 @@ class Step
$field = $this->arrayParamException["stepUid"]; $field = $this->arrayParamException["stepUid"];
$msg = str_replace(array("{0}"), array($field), "Invalid value specified for \"{0}\"") . " / "; $msg = str_replace(array("{0}"), array($field), "Invalid value specified for \"{0}\"") . " / ";
$msg = $msg . str_replace(array("{0}", "{1}"), array($stepUid, "STEP"), "The UID \"{0}\" doesn't exist in table {1}"); $msg = $msg . str_replace(array("{0}", "{1}"), array($stepUid, "STEP"), "The UID \"{0}\" does not exist in table {1}");
throw (new \Exception($msg)); throw (new \Exception($msg));
} }
@@ -225,7 +225,7 @@ class Step
$field = $this->arrayParamException["taskUid"]; $field = $this->arrayParamException["taskUid"];
$msg = str_replace(array("{0}"), array($field), "Invalid value specified for \"{0}\"") . " / "; $msg = str_replace(array("{0}"), array($field), "Invalid value specified for \"{0}\"") . " / ";
$msg = $msg . str_replace(array("{0}", "{1}"), array($taskUid, "TASK"), "The UID \"{0}\" doesn't exist in table {1}"); $msg = $msg . str_replace(array("{0}", "{1}"), array($taskUid, "TASK"), "The UID \"{0}\" does not exist in table {1}");
throw (new \Exception($msg)); throw (new \Exception($msg));
} }
@@ -246,7 +246,7 @@ class Step
$field = $this->arrayParamException["processUid"]; $field = $this->arrayParamException["processUid"];
$msg = str_replace(array("{0}"), array($field), "Invalid value specified for \"{0}\"") . " / "; $msg = str_replace(array("{0}"), array($field), "Invalid value specified for \"{0}\"") . " / ";
$msg = $msg . str_replace(array("{0}", "{1}"), array($processUid, "PROCESS"), "The UID \"{0}\" doesn't exist in table {1}"); $msg = $msg . str_replace(array("{0}", "{1}"), array($processUid, "PROCESS"), "The UID \"{0}\" does not exist in table {1}");
throw (new \Exception($msg)); throw (new \Exception($msg));
} }

View File

@@ -285,7 +285,7 @@ class Table
if (isset($columns[$i]['fld_size'])) { if (isset($columns[$i]['fld_size'])) {
$columns[$i]['field_size'] = $columns[$i]['fld_size']; $columns[$i]['field_size'] = $columns[$i]['fld_size'];
if (!is_int($columns[$i]['field_size'])) { if (!is_int($columns[$i]['field_size'])) {
throw (new \Exception("The property fld_size: '". $columns[$i]['field_size'] . "', is incorrect numeric value.")); throw (new \Exception("The property fld_size: '". $columns[$i]['field_size'] . "' is incorrect numeric value."));
} else { } else {
$columns[$i]['field_size'] = (int)$columns[$i]['field_size']; $columns[$i]['field_size'] = (int)$columns[$i]['field_size'];
} }
@@ -308,10 +308,10 @@ class Table
if (in_array(strtoupper($columns[$i]['field_name']), $reservedWordsSql) || if (in_array(strtoupper($columns[$i]['field_name']), $reservedWordsSql) ||
in_array( strtolower( $columns[$i]['field_name']), $reservedWordsPhp ) || in_array( strtolower( $columns[$i]['field_name']), $reservedWordsPhp ) ||
$columns[$i]['field_name'] == '') { $columns[$i]['field_name'] == '') {
throw (new \Exception("The property fld_name: '". $columns[$i]['field_name'] . "', is incorrect value.")); throw (new \Exception("The property fld_name: '". $columns[$i]['field_name'] . "' is incorrect value."));
} }
if ($columns[$i]['field_label'] == '') { if ($columns[$i]['field_label'] == '') {
throw (new \Exception("The property fld_label: '". $columns[$i]['field_label'] . "', is incorrect value.")); throw (new \Exception("The property fld_label: '". $columns[$i]['field_label'] . "' is incorrect value."));
} }
$columns[$i]['field_type'] = $this->validateFldType($columns[$i]['field_type']); $columns[$i]['field_type'] = $this->validateFldType($columns[$i]['field_type']);
if (isset($columns[$i]['field_autoincrement']) && $columns[$i]['field_autoincrement']) { if (isset($columns[$i]['field_autoincrement']) && $columns[$i]['field_autoincrement']) {
@@ -323,7 +323,7 @@ class Table
if (isset($columns[$i]['field_dyn']) && $columns[$i]['field_dyn'] != '') { if (isset($columns[$i]['field_dyn']) && $columns[$i]['field_dyn'] != '') {
$res = array_search($columns[$i]['field_dyn'], $fieldsValidate['NAMES']); $res = array_search($columns[$i]['field_dyn'], $fieldsValidate['NAMES']);
if ($res === false) { if ($res === false) {
throw (new \Exception("The property fld_dyn: '".$columns[$i]['field_dyn']."', is incorrect.")); throw (new \Exception("The property fld_dyn: '".$columns[$i]['field_dyn']."' is incorrect."));
} else { } else {
$columns[$i]['_index'] = $fieldsValidate['INDEXS'][$res]; $columns[$i]['_index'] = $fieldsValidate['INDEXS'][$res];
$columns[$i]['field_uid'] = $fieldsValidate['UIDS'][$res]; $columns[$i]['field_uid'] = $fieldsValidate['UIDS'][$res];
@@ -549,9 +549,9 @@ class Table
$dataValidate['fields'] = $tab_data['fields']; $dataValidate['fields'] = $tab_data['fields'];
} else { } else {
if ($reportFlag) { if ($reportFlag) {
throw (new \Exception("The property rep_uid: '$tab_uid', is incorrect.")); throw (new \Exception("The property rep_uid: '$tab_uid' is incorrect."));
} else { } else {
throw (new \Exception("The property pmt_uid: '$tab_uid', is incorrect.")); throw (new \Exception("The property pmt_uid: '$tab_uid' is incorrect."));
} }
} }
$this->saveTable($dataValidate, $pro_uid, $reportFlag, false); $this->saveTable($dataValidate, $pro_uid, $reportFlag, false);
@@ -924,11 +924,11 @@ class Table
{ {
$pro_uid = trim($pro_uid); $pro_uid = trim($pro_uid);
if ($pro_uid == '') { if ($pro_uid == '') {
throw (new \Exception("The project with prj_uid: '', does not exist.")); throw (new \Exception("The project with prj_uid: '' does not exist."));
} }
$oProcess = new \Process(); $oProcess = new \Process();
if (!($oProcess->processExists($pro_uid))) { if (!($oProcess->processExists($pro_uid))) {
throw (new \Exception("The project with prj_uid: '$pro_uid', does not exist.")); throw (new \Exception("The project with prj_uid: '$pro_uid' does not exist."));
} }
return $pro_uid; return $pro_uid;
} }
@@ -951,11 +951,11 @@ class Table
} }
$tab_uid = trim($tab_uid); $tab_uid = trim($tab_uid);
if ($tab_uid == '') { if ($tab_uid == '') {
throw (new \Exception($label . "'', does not exist.")); throw (new \Exception($label . "'' does not exist."));
} }
$oAdditionalTables = new \AdditionalTables(); $oAdditionalTables = new \AdditionalTables();
if (!($oAdditionalTables->exists($tab_uid))) { if (!($oAdditionalTables->exists($tab_uid))) {
throw (new \Exception($label . "'$tab_uid', does not exist.")); throw (new \Exception($label . "'$tab_uid' does not exist."));
} }
return $tab_uid; return $tab_uid;
} }
@@ -973,7 +973,7 @@ class Table
{ {
$rep_tab_name = trim($rep_tab_name); $rep_tab_name = trim($rep_tab_name);
if ((strpos($rep_tab_name, ' ')) || (strlen($rep_tab_name) < 4)) { if ((strpos($rep_tab_name, ' ')) || (strlen($rep_tab_name) < 4)) {
throw (new \Exception("The property rep_tab_name: '$rep_tab_name', is incorrect.")); throw (new \Exception("The property rep_tab_name: '$rep_tab_name' is incorrect."));
} }
$rep_tab_name = G::toUpper($rep_tab_name); $rep_tab_name = G::toUpper($rep_tab_name);
if (substr($rep_tab_name, 0, 4) != 'PMT_') { if (substr($rep_tab_name, 0, 4) != 'PMT_') {
@@ -996,7 +996,7 @@ class Table
{ {
$rep_tab_connection = trim($rep_tab_connection); $rep_tab_connection = trim($rep_tab_connection);
if ($rep_tab_connection == '') { if ($rep_tab_connection == '') {
throw (new \Exception("The property rep_tab_connection: '$rep_tab_connection', is incorrect.")); throw (new \Exception("The property rep_tab_connection: '$rep_tab_connection' is incorrect."));
} }
$connections = array('workflow', 'rp'); $connections = array('workflow', 'rp');
@@ -1011,7 +1011,7 @@ class Table
} }
if (!in_array($rep_tab_connection, $connections)) { if (!in_array($rep_tab_connection, $connections)) {
throw (new \Exception("The property rep_tab_connection: '$rep_tab_connection', is incorrect.")); throw (new \Exception("The property rep_tab_connection: '$rep_tab_connection' is incorrect."));
} }
return $rep_tab_connection; return $rep_tab_connection;
} }
@@ -1030,7 +1030,7 @@ class Table
{ {
$rep_tab_grid = trim($rep_tab_grid); $rep_tab_grid = trim($rep_tab_grid);
if ($rep_tab_grid == '') { if ($rep_tab_grid == '') {
throw (new \Exception("The property rep_tab_grid: '$rep_tab_grid', is incorrect.")); throw (new \Exception("The property rep_tab_grid: '$rep_tab_grid' is incorrect."));
} }
G::loadSystem('dynaformhandler'); G::loadSystem('dynaformhandler');
@@ -1064,7 +1064,7 @@ class Table
$find = array_search($rep_tab_grid, $grids); $find = array_search($rep_tab_grid, $grids);
if ($find === false) { if ($find === false) {
throw (new \Exception("The property rep_tab_grid: '$rep_tab_grid', is incorrect.")); throw (new \Exception("The property rep_tab_grid: '$rep_tab_grid' is incorrect."));
} else { } else {
$rep_tab_grid = $namesGrid[$find] . '-' . $rep_tab_grid; $rep_tab_grid = $namesGrid[$find] . '-' . $rep_tab_grid;
} }
@@ -1084,7 +1084,7 @@ class Table
{ {
$fld_type = trim($fld_type); $fld_type = trim($fld_type);
if ($fld_type == '') { if ($fld_type == '') {
throw (new \Exception("The property fld_type: '$fld_type', is incorrect.")); throw (new \Exception("The property fld_type: '$fld_type' is incorrect."));
} }
switch ($fld_type) { switch ($fld_type) {
@@ -1104,7 +1104,7 @@ class Table
$columnsTypes = \PmTable::getPropelSupportedColumnTypes(); $columnsTypes = \PmTable::getPropelSupportedColumnTypes();
$res = array_search($fld_type, $columnsTypes); $res = array_search($fld_type, $columnsTypes);
if ($res === false) { if ($res === false) {
throw (new \Exception("The property fld_type: '$fld_type', is incorrect.")); throw (new \Exception("The property fld_type: '$fld_type' is incorrect."));
} }
return $fld_type; return $fld_type;
} }

View File

@@ -155,7 +155,7 @@ class Trigger
if (isset($dataTrigger['TRI_TITLE'])) { if (isset($dataTrigger['TRI_TITLE'])) {
if (!$this->verifyNameTrigger($sProcessUID, $dataTrigger['TRI_TITLE'], $sTriggerUid)) { if (!$this->verifyNameTrigger($sProcessUID, $dataTrigger['TRI_TITLE'], $sTriggerUid)) {
throw new \Exception('There is a triggers with the same name in this process'); throw new \Exception('A trigger with the same name already exists in this process');
} }
} }
@@ -268,7 +268,7 @@ class Trigger
{ {
try { try {
if (!$this->verifyNameTrigger($processUid, $triggerTitle, $triggerUidExclude)) { if (!$this->verifyNameTrigger($processUid, $triggerTitle, $triggerUidExclude)) {
$msg = str_replace(array("{0}", "{1}"), array($fieldNameForException, $triggerTitle), "The trigger title with {0}: \"{1}\", already exists"); $msg = str_replace(array("{0}", "{1}"), array($fieldNameForException, $triggerTitle), "The trigger title with {0}: \"{1}\" already exists");
throw (new \Exception($msg)); throw (new \Exception($msg));
} }