diff --git a/workflow/engine/src/BusinessModel/CaseScheduler.php b/workflow/engine/src/BusinessModel/CaseScheduler.php index 895e40f70..90d99e737 100644 --- a/workflow/engine/src/BusinessModel/CaseScheduler.php +++ b/workflow/engine/src/BusinessModel/CaseScheduler.php @@ -71,7 +71,7 @@ class CaseScheduler try { $oCaseSchedulerTest = \CaseSchedulerPeer::retrieveByPK( $sCaseSchedulerUID ); if (is_null($oCaseSchedulerTest)) { - throw (new \Exception( 'This id: '. $sCaseSchedulerUID .' do not correspond to a registered case scheduler')); + throw (new \Exception( 'This id: '. $sCaseSchedulerUID .' does not correspond to a registered case scheduler')); } $oCriteria = new \Criteria( 'workflow' ); $oCriteria->clearSelectColumns(); @@ -287,13 +287,13 @@ class CaseScheduler } $arrayTaskUid = $this->getTaskUid($aData['TAS_UID']); if (empty($arrayTaskUid)) { - throw (new \Exception( 'task not found for id: '. $aData['TAS_UID'])); + throw (new \Exception( 'Task not found for id: '. $aData['TAS_UID'])); } if ($aData['SCH_NAME']=='') { throw (new \Exception( '`sch_name` can`t be empty')); } if ($this->existsName($sProcessUID, $aData['SCH_NAME'])) { - throw (new \Exception( 'duplicate Case Scheduler name')); + throw (new \Exception( 'Duplicate Case Scheduler name')); } $mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['SCH_DEL_USER_PASS'], $sProcessUID, $aData['TAS_UID']); $oUser = \UsersPeer::retrieveByPK( $mUser ); @@ -304,18 +304,18 @@ class CaseScheduler if ($sOption != '5') { $pattern="/^([0-1][0-9]|[2][0-3])[\:]([0-5][0-9])$/"; if (!preg_match($pattern, $aData['SCH_START_TIME'])) { - throw (new \Exception( 'invalid value specified for `sch_start_time`. Expecting time in HH:MM format (The time can not be increased to 23:59)')); + throw (new \Exception( 'Invalid value specified for `sch_start_time`. Expecting time in HH:MM format (The time can not be increased to 23:59)')); } } $patternDate="/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/"; if ($sOption == '1' || $sOption == '2' || $sOption == '3') { if (!preg_match($patternDate, $aData['SCH_START_DATE'])) { - throw (new \Exception( 'invalid value specified for `sch_start_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); + throw (new \Exception( 'Invalid value specified for `sch_start_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); } } if ($sOption == '1' || $sOption == '2' || $sOption == '3') { if (!preg_match($patternDate, $aData['SCH_END_DATE'])) { - throw (new \Exception( 'invalid value specified for `sch_end_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); + throw (new \Exception( 'Invalid value specified for `sch_end_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); } } if ($sOption == '1' || $sOption == '2' || $sOption == '3') { @@ -376,7 +376,7 @@ class CaseScheduler if ($row == "1" || $row == "2" || $row == "3" || $row == "4" || $row == "5"|| $row == "6" || $row == "7") { $aData['SCH_WEEK_DAYS'] = $aData['SCH_WEEK_DAYS']; } else { - throw (new \Exception( 'invalid value specified for `sch_week_days`')); + throw (new \Exception( 'Invalid value specified for `sch_week_days`')); } } } @@ -408,7 +408,7 @@ class CaseScheduler if ($temp >= 1 && $temp <= 31) { $aData['SCH_START_DAY_OPT_1'] = $aData['SCH_START_DAY_OPT_1']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_1`. Must be between 1 and 31')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_1`. Must be between 1 and 31')); } $aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_1']; } else { @@ -420,19 +420,19 @@ class CaseScheduler if ($optionTwo == "1" || $optionTwo == "2" || $optionTwo == "3" || $optionTwo == "4" || $optionTwo == "5") { $aData['SCH_START_DAY_OPT_2'] = $aData['SCH_START_DAY_OPT_2']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_2`')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_2`')); } $pipelineTwo = $aData['SCH_START_DAY_OPT_2']{1}; if ($pipelineTwo == "|") { $aData['SCH_START_DAY_OPT_2'] = $aData['SCH_START_DAY_OPT_2']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_2`')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_2`')); } $dayTwo = $aData['SCH_START_DAY_OPT_2']{2}; if ($dayTwo == "1" || $dayTwo == "2" || $dayTwo == "3" || $dayTwo == "4" || $dayTwo == "5" || $dayTwo == "6" || $dayTwo == "7") { $aData['SCH_START_DAY_OPT_2'] = $aData['SCH_START_DAY_OPT_2']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_2`')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_2`')); } } if ($nStartDay == "") { @@ -449,7 +449,7 @@ class CaseScheduler if ($row == "1" || $row == "2" || $row == "3" || $row == "4" || $row == "5"|| $row == "6" || $row == "7"|| $row == "8" || $row == "9" || $row == "10"|| $row == "11" || $row == "12") { $aData['SCH_MONTHS'] = $aData['SCH_MONTHS']; } else { - throw (new \Exception( 'invalid value specified for `sch_months`')); + throw (new \Exception( 'Invalid value specified for `sch_months`')); } } } @@ -512,7 +512,7 @@ class CaseScheduler } $patternHour="/^([0-1][0-9]|[2][0-3])[\.]([0-5][0-9])$/"; if (!preg_match($patternHour, $aData['SCH_REPEAT_EVERY'])) { - throw (new \Exception( 'invalid value specified for `sch_repeat_every`. Expecting time in HH.MM format (The time can not be increased to 23.59)')); + throw (new \Exception( 'Invalid value specified for `sch_repeat_every`. Expecting time in HH.MM format')); } $nextRun = $aData['SCH_REPEAT_EVERY'] * 60 * 60; $aData['SCH_REPEAT_EVERY'] = $aData['SCH_REPEAT_EVERY']; @@ -578,13 +578,13 @@ class CaseScheduler } $arrayTaskUid = $this->getTaskUid($aData['TAS_UID']); if (empty($arrayTaskUid)) { - throw (new \Exception( 'task not found for id: '. $aData['TAS_UID'])); + throw (new \Exception( 'Task not found for id: '. $aData['TAS_UID'])); } if ($aData['SCH_NAME']=='') { throw (new \Exception( '`sch_name` can`t be empty')); } if ($this->existsNameUpdate($sSchUID, $aData['SCH_NAME'])) { - throw (new \Exception( 'duplicate Case Scheduler name')); + throw (new \Exception( 'Duplicate Case Scheduler name')); } $mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['SCH_DEL_USER_PASS'], $sProcessUID, $aData['TAS_UID']); $oUser = \UsersPeer::retrieveByPK( $mUser ); @@ -595,18 +595,18 @@ class CaseScheduler if ($sOption != '5') { $pattern="/^([0-1][0-9]|[2][0-3])[\:]([0-5][0-9])$/"; if (!preg_match($pattern, $aData['SCH_START_TIME'])) { - throw (new \Exception( 'invalid value specified for `sch_start_time`. Expecting time in HH:MM format (The time can not be increased to 23:59)')); + throw (new \Exception( 'Invalid value specified for `sch_start_time`. Expecting time in HH:MM format (The time can not be increased to 23:59)')); } } $patternDate="/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/"; if ($sOption == '1' || $sOption == '2' || $sOption == '3') { if (!preg_match($patternDate, $aData['SCH_START_DATE'])) { - throw (new \Exception( 'invalid value specified for `sch_start_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); + throw (new \Exception( 'Invalid value specified for `sch_start_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); } } if ($sOption == '1' || $sOption == '2' || $sOption == '3') { if (!preg_match($patternDate, $aData['SCH_END_DATE'])) { - throw (new \Exception( 'invalid value specified for `sch_end_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); + throw (new \Exception( 'Invalid value specified for `sch_end_date`. Expecting date in `YYYY-MM-DD` format, such as `2014-01-01`')); } } if ($sOption == '1' || $sOption == '2' || $sOption == '3') { @@ -667,7 +667,7 @@ class CaseScheduler if ($row == "1" || $row == "2" || $row == "3" || $row == "4" || $row == "5"|| $row == "6" || $row == "7") { $aData['SCH_WEEK_DAYS'] = $aData['SCH_WEEK_DAYS']; } else { - throw (new \Exception( 'invalid value specified for `sch_week_days`')); + throw (new \Exception( 'Invalid value specified for `sch_week_days`')); } } } @@ -699,7 +699,7 @@ class CaseScheduler if ($temp >= 1 && $temp <= 31) { $aData['SCH_START_DAY_OPT_1'] = $aData['SCH_START_DAY_OPT_1']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_1`. Must be between 1 and 31')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_1`. Must be between 1 and 31')); } $aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_1']; } else { @@ -711,19 +711,19 @@ class CaseScheduler if ($optionTwo == "1" || $optionTwo == "2" || $optionTwo == "3" || $optionTwo == "4" || $optionTwo == "5") { $aData['SCH_START_DAY_OPT_2'] = $aData['SCH_START_DAY_OPT_2']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_2`')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_2`')); } $pipelineTwo = $aData['SCH_START_DAY_OPT_2']{1}; if ($pipelineTwo == "|") { $aData['SCH_START_DAY_OPT_2'] = $aData['SCH_START_DAY_OPT_2']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_2`')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_2`')); } $dayTwo = $aData['SCH_START_DAY_OPT_2']{2}; if ($dayTwo == "1" || $dayTwo == "2" || $dayTwo == "3" || $dayTwo == "4" || $dayTwo == "5" || $dayTwo == "6" || $dayTwo == "7") { $aData['SCH_START_DAY_OPT_2'] = $aData['SCH_START_DAY_OPT_2']; } else { - throw (new \Exception( 'invalid value specified for `sch_start_day_opt_2`')); + throw (new \Exception( 'Invalid value specified for `sch_start_day_opt_2`')); } } if ($nStartDay == "") { @@ -740,7 +740,7 @@ class CaseScheduler if ($row == "1" || $row == "2" || $row == "3" || $row == "4" || $row == "5"|| $row == "6" || $row == "7"|| $row == "8" || $row == "9" || $row == "10"|| $row == "11" || $row == "12") { $aData['SCH_MONTHS'] = $aData['SCH_MONTHS']; } else { - throw (new \Exception( 'invalid value specified for `sch_months`')); + throw (new \Exception( 'Invalid value specified for `sch_months`')); } } } @@ -803,7 +803,7 @@ class CaseScheduler } $patternHour="/^([0-1][0-9]|[2][0-3])[\.]([0-5][0-9])$/"; if (!preg_match($patternHour, $aData['SCH_REPEAT_EVERY'])) { - throw (new \Exception( 'invalid value specified for `sch_repeat_every`. Expecting time in HH.MM format (The time can not be increased to 23.59)')); + throw (new \Exception( 'Invalid value specified for `sch_repeat_every`. Expecting time in HH.MM format')); } $nextRun = $aData['SCH_REPEAT_EVERY'] * 60 * 60; $aData['SCH_REPEAT_EVERY'] = $aData['SCH_REPEAT_EVERY']; diff --git a/workflow/engine/src/BusinessModel/FilesManager.php b/workflow/engine/src/BusinessModel/FilesManager.php index 78ba0e29b..ef9510189 100644 --- a/workflow/engine/src/BusinessModel/FilesManager.php +++ b/workflow/engine/src/BusinessModel/FilesManager.php @@ -148,11 +148,11 @@ class FilesManager try { $aData['prf_path'] = rtrim($aData['prf_path'], '/') . '/'; if (!$aData['prf_filename']) { - throw (new \Exception( 'invalid value specified for `prf_filename`.')); + throw (new \Exception( 'Invalid value specified for `prf_filename`.')); } $sMainDirectory = current(explode("/", $aData['prf_path'])); if ($sMainDirectory != 'public' && $sMainDirectory != 'templates') { - throw (new \Exception( 'invalid value specified for `prf_path`. Expecting `templates/` or `public/`')); + throw (new \Exception( 'Invalid value specified for `prf_path`. Expecting `templates/` or `public/`')); } if (strstr($aData['prf_path'],'/')) { $sSubDirectory = substr($aData['prf_path'], strpos($aData['prf_path'], "/")+1) ; @@ -310,7 +310,7 @@ class FilesManager $rsCriteria->next(); } if ($path == '') { - throw new \Exception('invalid value specified for `prf_uid`.'); + throw new \Exception('Invalid value specified for `prf_uid`.'); } $sFile = end(explode("/",$path)); $sPath = str_replace($sFile,'',$path); @@ -329,7 +329,7 @@ class FilesManager $sEditable = false; } if ($sEditable == false) { - throw (new \Exception( 'Can`t edit. Make sure your file has an editable extension.')); + throw (new \Exception( 'Unable to edit. Make sure your file has an editable extension.')); } $oProcessFiles = \ProcessFilesPeer::retrieveByPK($prfUid); $sDate = date('Y-m-d H:i:s'); @@ -379,7 +379,7 @@ class FilesManager $rsCriteria->next(); } if ($path == '') { - throw new \Exception('invalid value specified for `prf_uid`.'); + throw new \Exception('Invalid value specified for `prf_uid`.'); } $sFile = end(explode("/",$path)); $sPath = str_replace($sFile,'',$path); @@ -423,7 +423,7 @@ class FilesManager $rsCriteria->next(); } if ($path == '') { - throw new \Exception('invalid value specified for `prf_uid`.'); + throw new \Exception('Invalid value specified for `prf_uid`.'); } $sFile = end(explode("/",$path)); $sPath = str_replace($sFile,'',$path); @@ -439,7 +439,7 @@ class FilesManager $oProcessMap->downloadFile($sProcessUID,$sMainDirectory,$sSubDirectory,$sFile); die(); } else { - throw (new \Exception( 'invalid value specified for `path`.')); + throw (new \Exception( 'Invalid value specified for `path`.')); } } catch (Exception $e) { throw $e; diff --git a/workflow/engine/src/BusinessModel/OutputDocument.php b/workflow/engine/src/BusinessModel/OutputDocument.php index d0ea67cec..438c445d4 100644 --- a/workflow/engine/src/BusinessModel/OutputDocument.php +++ b/workflow/engine/src/BusinessModel/OutputDocument.php @@ -235,7 +235,7 @@ class OutputDocument if ($row == "print" || $row == "modify" || $row == "copy" || $row == "forms" || $row == "") { $aData['out_doc_pdf_security_permissions'] = $aData['out_doc_pdf_security_permissions']; } else { - throw (new \Exception( 'invalid value specified for `out_doc_pdf_security_permissions`')); + throw (new \Exception( 'Invalid value specified for `out_doc_pdf_security_permissions`')); } } try { @@ -248,7 +248,7 @@ class OutputDocument throw (new \Exception(str_replace(array("{0}", "{1}"), array($sProcessUID, "PROCESS"), "The UID \"{0}\" doesn't exist in table {1}"))); } if ($aData["OUT_DOC_TITLE"]=="") { - throw (new \Exception( 'invalid value specified for `out_doc_title`, can`t be null')); + throw (new \Exception( 'Invalid value specified for `out_doc_title`, can`t be null')); } if (isset($aData["OUT_DOC_TITLE"]) && $this->existsTitle($sProcessUID, $aData["OUT_DOC_TITLE"])) { throw (new \Exception(\G::LoadTranslation("ID_OUTPUT_NOT_SAVE"))); @@ -295,7 +295,7 @@ class OutputDocument if ($row == "print" || $row == "modify" || $row == "copy" || $row == "forms" || $row == "") { $aData['out_doc_pdf_security_permissions'] = $aData['out_doc_pdf_security_permissions']; } else { - throw (new \Exception( 'invalid value specified for `out_doc_pdf_security_permissions`')); + throw (new \Exception( 'Invalid value specified for `out_doc_pdf_security_permissions`')); } } try { @@ -328,7 +328,7 @@ class OutputDocument throw (new \Exception('The registry cannot be updated!' . $sMessage)); } } else { - throw (new \Exception('This row doesn\'t exist!')); + throw (new \Exception('This row does not exist!')); } } catch (\Exception $e) { throw $e; diff --git a/workflow/engine/src/BusinessModel/ProcessSupervisor.php b/workflow/engine/src/BusinessModel/ProcessSupervisor.php index e233fd6a9..571d4a9e4 100644 --- a/workflow/engine/src/BusinessModel/ProcessSupervisor.php +++ b/workflow/engine/src/BusinessModel/ProcessSupervisor.php @@ -89,7 +89,7 @@ class ProcessSupervisor $aResp = array(); $oProcess = \ProcessUserPeer::retrieveByPK( $sPuUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `pu_uid`: '. $sPuUID .' do not correspond to a valid relation')); + throw (new \Exception( 'This id for `pu_uid`: '. $sPuUID .' does not correspond to a valid relation')); } // Groups $oCriteria = new \Criteria('workflow'); @@ -304,7 +304,7 @@ class ProcessSupervisor $aResp = array(); $oDynaformSupervisor = \StepSupervisorPeer::retrieveByPK( $sPudUID ); if (is_null( $oDynaformSupervisor ) ) { - throw (new \Exception( 'This id: '. $sPudUID .' do not correspond to a registered process supervisor ')); + throw (new \Exception( 'This id: '. $sPudUID .' does not correspond to a registered process supervisor ')); } $sDelimiter = \DBAdapter::getStringDelimiter(); $oCriteria = new \Criteria('workflow'); @@ -456,7 +456,7 @@ class ProcessSupervisor $aResp = array(); $oInputDocumentSupervisor = \StepSupervisorPeer::retrieveByPK( $sPuiUID ); if (is_null( $oInputDocumentSupervisor ) ) { - throw (new \Exception( 'This id: '. $sPuiUID .' do not correspond to a registered process supervisor ')); + throw (new \Exception( 'This id: '. $sPuiUID .' does not correspond to a registered process supervisor ')); } $sDelimiter = \DBAdapter::getStringDelimiter(); $oCriteria = new \Criteria('workflow'); @@ -558,16 +558,16 @@ class ProcessSupervisor $oTypeAssigneeG = \GroupwfPeer::retrieveByPK( $sUsrUID ); $oTypeAssigneeU = \UsersPeer::retrieveByPK( $sUsrUID ); if (is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) { - throw (new \Exception( 'This id: '. $sUsrUID .' do not correspond to a registered ' .$sTypeUID )); + throw (new \Exception( 'This id: '. $sUsrUID .' does not correspond to a registered ' .$sTypeUID )); } if (is_null( $oTypeAssigneeG ) && ! is_null( $oTypeAssigneeU) ) { if ( "SUPERVISOR"!= $sTypeUID ) { - throw (new \Exception( 'This id: '. $sUsrUID .' do not correspond to a registered ' .$sTypeUID )); + throw (new \Exception( 'This id: '. $sUsrUID .' does not correspond to a registered ' .$sTypeUID )); } } if (! is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) { if ( "GROUP_SUPERVISOR" != $sTypeUID ) { - throw (new \Exception( 'This id: '. $sUsrUID .' do not correspond to a registered ' .$sTypeUID )); + throw (new \Exception( 'This id: '. $sUsrUID .' does not correspond to a registered ' .$sTypeUID )); } } // validate Groups @@ -630,7 +630,7 @@ class ProcessSupervisor { $oTypeDynaform = \DynaformPeer::retrieveByPK($sDynUID); if (is_null( $oTypeDynaform )) { - throw (new \Exception( 'This id for `dyn_uid`: '. $sDynUID .' do not correspond to a registered Dynaform')); + throw (new \Exception( 'This id for `dyn_uid`: '. $sDynUID .' does not correspond to a registered Dynaform')); } $aResp = array(); $sPuUIDT = array(); @@ -713,7 +713,7 @@ class ProcessSupervisor { $oTypeInputDocument= \InputDocumentPeer::retrieveByPK($sInputDocumentUID); if (is_null( $oTypeInputDocument )) { - throw (new \Exception( 'This id for `inp_doc_uid`: '. $sInputDocumentUID .' do not correspond to a registered InputDocument')); + throw (new \Exception( 'This id for `inp_doc_uid`: '. $sInputDocumentUID .' does not correspond to a registered InputDocument')); } $aResp = array(); $sPuUIDT = array(); @@ -804,7 +804,7 @@ class ProcessSupervisor $oConnection->commit(); return $iResult; } else { - throw (new \Exception('This row doesn\'t exist!')); + throw (new \Exception('This row does not exist!')); } } catch (\Exception $e) { $oConnection->rollback(); @@ -830,7 +830,7 @@ class ProcessSupervisor $oConnection->commit(); return $iResult; } else { - throw (new \Exception('This row doesn\'t exist!')); + throw (new \Exception('This row does not exist!')); } } catch (Exception $oError) { $oConnection->rollback(); @@ -856,7 +856,7 @@ class ProcessSupervisor $oConnection->commit(); return $iResult; } else { - throw (new \Exception('This row doesn\'t exist!')); + throw (new \Exception('This row does not exist!')); } } catch (Exception $oError) { $oConnection->rollback(); diff --git a/workflow/engine/src/BusinessModel/ProjectUser.php b/workflow/engine/src/BusinessModel/ProjectUser.php index c063ea632..711259f72 100644 --- a/workflow/engine/src/BusinessModel/ProjectUser.php +++ b/workflow/engine/src/BusinessModel/ProjectUser.php @@ -19,7 +19,7 @@ class ProjectUser try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $aUsers = array(); $sDelimiter = \DBAdapter::getStringDelimiter(); @@ -105,7 +105,7 @@ class ProjectUser try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $aUsers = array(); $sDelimiter = \DBAdapter::getStringDelimiter(); @@ -168,11 +168,11 @@ class ProjectUser try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oUser = \UsersPeer::retrieveByPK($sUserUID); if (is_null($oUser)) { - throw (new \Exception( 'This id for `usr_uid`: '. $sUserUID .' do not correspond to a registered user')); + throw (new \Exception( 'This id for `usr_uid`: '. $sUserUID .' does not correspond to a registered user')); } $aUsers = array(); \G::LoadClass( 'case' ); @@ -190,7 +190,7 @@ class ProjectUser } } if (sizeof($aUsers) < 1) { - throw (new \Exception( 'This user `usr_uid`: '. $sUserUID .' has no initial activities assigned in this project.')); + throw (new \Exception( 'This user `usr_uid`: '. $sUserUID .' does not have initial activities assigned in this project.')); } return $aUsers; } catch (Exception $e) { @@ -213,7 +213,7 @@ class ProjectUser try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } /** * process_webEntryValidate diff --git a/workflow/engine/src/BusinessModel/Task.php b/workflow/engine/src/BusinessModel/Task.php index 5eaebecba..500bba6b6 100644 --- a/workflow/engine/src/BusinessModel/Task.php +++ b/workflow/engine/src/BusinessModel/Task.php @@ -763,11 +763,11 @@ class Task require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "GroupUser.php"); $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $aUsers = array(); $sDelimiter = \DBAdapter::getStringDelimiter(); @@ -880,14 +880,14 @@ class Task } if ($start) { if ($start < 0) { - throw (new \Exception( 'invalid value specified for `start`.')); + throw (new \Exception( 'Invalid value specified for `start`.')); } } else { $start = 0; } if (isset($limit)) { if ($limit < 0) { - throw (new \Exception( 'invalid value specified for `limit`.')); + throw (new \Exception( 'Invalid value specified for `limit`.')); } else { if ($limit == 0) { return array(); @@ -925,11 +925,11 @@ class Task require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "GroupUser.php"); $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 1; $aUsers = array(); @@ -1035,14 +1035,14 @@ class Task } if ($start) { if ($start < 0) { - throw (new \Exception( 'invalid value specified for `start`.')); + throw (new \Exception( 'Invalid value specified for `start`.')); } } else { $start = 0; } if (isset($limit)) { if ($limit < 0) { - throw (new \Exception( 'invalid value specified for `limit`.')); + throw (new \Exception( 'Invalid value specified for `limit`.')); } else { if ($limit == 0) { return array(); @@ -1074,11 +1074,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 1; $aUsers = array(); @@ -1210,11 +1210,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 1; $iRelation = ''; @@ -1236,18 +1236,18 @@ class Task $oTypeAssigneeG = \GroupwfPeer::retrieveByPK( $sAssigneeUID ); $oTypeAssigneeU = \UsersPeer::retrieveByPK( $sAssigneeUID ); if (is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) { - throw (new \Exception( 'This id: '. $sAssigneeUID .' do not correspond to a registered ' .$assType )); + throw (new \Exception( 'This id: '. $sAssigneeUID .' does not correspond to a registered ' .$assType )); } if (is_null( $oTypeAssigneeG ) && ! is_null( $oTypeAssigneeU) ) { $type = "user"; if ( $type != $assType ) { - throw (new \Exception( 'This id: '. $sAssigneeUID .' do not correspond to a registered ' .$assType )); + throw (new \Exception( 'This id: '. $sAssigneeUID .' does not correspond to a registered ' .$assType )); } } if (! is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) { $type = "group"; if ( $type != $assType ) { - throw (new \Exception( 'This id: '. $sAssigneeUID .' do not correspond to a registered ' .$assType )); + throw (new \Exception( 'This id: '. $sAssigneeUID .' does not correspond to a registered ' .$assType )); } } $oTaskUser = new \TaskUser(); @@ -1282,11 +1282,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 1; $iRelation = ''; @@ -1334,11 +1334,11 @@ class Task require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "GroupUser.php"); $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $aUsers = array(); $sDelimiter = \DBAdapter::getStringDelimiter(); @@ -1451,14 +1451,14 @@ class Task } if ($start) { if ($start < 0) { - throw (new \Exception( 'invalid value specified for `start`.')); + throw (new \Exception( 'Invalid value specified for `start`.')); } } else { $start = 0; } if (isset($limit)) { if ($limit < 0) { - throw (new \Exception( 'invalid value specified for `limit`.')); + throw (new \Exception( 'Invalid value specified for `limit`.')); } else { if ($limit == 0) { return array(); @@ -1497,11 +1497,11 @@ class Task $aUsers = array(); $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 2; @@ -1607,14 +1607,14 @@ class Task } if ($start) { if ($start < 0) { - throw (new \Exception( 'invalid value specified for `start`.')); + throw (new \Exception( 'Invalid value specified for `start`.')); } } else { $start = 0; } if (isset($limit)) { if ($limit < 0) { - throw (new \Exception( 'invalid value specified for `limit`.')); + throw (new \Exception( 'Invalid value specified for `limit`.')); } else { if ($limit == 0) { return array(); @@ -1648,11 +1648,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 2; $aUsers = array(); @@ -1784,11 +1784,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 2; $iRelation = ''; @@ -1810,18 +1810,18 @@ class Task $oTypeAssigneeG = \GroupwfPeer::retrieveByPK( $sAssigneeUID ); $oTypeAssigneeU = \UsersPeer::retrieveByPK( $sAssigneeUID ); if (is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) { - throw (new \Exception( 'This id: '. $sAssigneeUID .' do not correspond to a registered ' .$assType )); + throw (new \Exception( 'This id: '. $sAssigneeUID .' does not correspond to a registered ' .$assType )); } if (is_null( $oTypeAssigneeG ) && ! is_null( $oTypeAssigneeU) ) { $type = "user"; if ( $type != $assType ) { - throw (new \Exception( 'This id: '. $sAssigneeUID .' do not correspond to a registered ' .$assType )); + throw (new \Exception( 'This id: '. $sAssigneeUID .' does not correspond to a registered ' .$assType )); } } if (! is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) { $type = "group"; if ( $type != $assType ) { - throw (new \Exception( 'This id: '. $sAssigneeUID .' do not correspond to a registered ' .$assType )); + throw (new \Exception( 'This id: '. $sAssigneeUID .' does not correspond to a registered ' .$assType )); } } $oTaskUser = new \TaskUser(); @@ -1856,11 +1856,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process')); + throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); } $oActivity = \TaskPeer::retrieveByPK( $sTaskUID ); if (is_null($oActivity)) { - throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity')); + throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 2; $iRelation = ''; diff --git a/workflow/engine/src/BusinessModel/User.php b/workflow/engine/src/BusinessModel/User.php index 5d1a011ef..baf8282b3 100644 --- a/workflow/engine/src/BusinessModel/User.php +++ b/workflow/engine/src/BusinessModel/User.php @@ -220,25 +220,25 @@ class User if ($form['USR_COUNTRY'] != '') { $oCountry = \IsoCountryPeer::retrieveByPK($form['USR_COUNTRY']); if (is_null($oCountry)) { - throw new \Exception('invalid value for `usr_country`: '.$form['USR_COUNTRY']); + throw new \Exception('Invalid value for `usr_country`: '.$form['USR_COUNTRY']); } } if ($form['USR_CITY'] != '') { $oCity = \IsoSubdivisionPeer::retrieveByPK($form['USR_COUNTRY'], $form['USR_CITY']); if (is_null($oCity)) { - throw new \Exception('invalid value for `usr_city`: '.$form['USR_CITY']); + throw new \Exception('Invalid value for `usr_city`: '.$form['USR_CITY']); } } if ($form['USR_LOCATION'] != '') { $oLocation = \IsoLocationPeer::retrieveByPK($form['USR_COUNTRY'], $form['USR_LOCATION']); if (is_null($oLocation)) { - throw new \Exception('invalid value for `usr_location`: '.$form['USR_LOCATION']); + throw new \Exception('Invalid value for `usr_location`: '.$form['USR_LOCATION']); } } if ($form['USR_COUNTRY'] != '') { $oReplacedBy = \IsoCountryPeer::retrieveByPK($form['USR_COUNTRY']); if (is_null($oReplacedBy)) { - throw new \Exception('invalid value for `usr_country`: '.$form['USR_COUNTRY']); + throw new \Exception('Invalid value for `usr_country`: '.$form['USR_COUNTRY']); } } if (isset($arrayData['USR_UID'])) { @@ -286,7 +286,7 @@ class User $aData['USR_LASTNAME'] = $form['USR_LASTNAME']; } if ($form['USR_EMAIL'] == '') { - throw new \Exception('invalid value specified for `usr_email`, can`t be null.'); + throw new \Exception('Invalid value specified for `usr_email`, can`t be null.'); } else { if (!filter_var($form['USR_EMAIL'], FILTER_VALIDATE_EMAIL)) { throw new \Exception('`usr_email`. '.\G::LoadTranslation('ID_INCORRECT_EMAIL')); @@ -314,7 +314,7 @@ class User $aData['USR_AUTH_USER_DN'] = $form['USR_AUTH_USER_DN']; $statusWF = $form['USR_STATUS']; if ($form['USR_STATUS'] == '') { - throw new \Exception('invalid value specified for `usr_status`, can`t be null'); + throw new \Exception('Invalid value specified for `usr_status`, can`t be null'); } else { if ($form['USR_STATUS'] == 'ACTIVE' || $form['USR_STATUS'] == 'INACTIVE' || $form['USR_STATUS'] == 'VACATION') { $aData['USR_STATUS'] = $form['USR_STATUS']; @@ -323,7 +323,7 @@ class User } } if ($form['USR_ROLE'] == '') { - throw new \Exception('invalid value specified for `usr_role`, can`t be null'); + throw new \Exception('Invalid value specified for `usr_role`, can`t be null'); } else { $oCriteria = new \Criteria('rbac'); $oCriteria->add(\RolesPeer::ROL_CODE, $form['USR_ROLE']); @@ -549,7 +549,7 @@ class User if ($form['USR_COUNTRY'] != '') { $oReplacedBy = \IsoCountryPeer::retrieveByPK($form['USR_COUNTRY']); if (is_null($oReplacedBy)) { - throw new \Exception('invalid value for `usr_country`: '.$form['USR_COUNTRY']); + throw new \Exception('Invalid value for `usr_country`: '.$form['USR_COUNTRY']); } else { $aData['USR_COUNTRY'] = $form['USR_COUNTRY']; $aData['USR_CITY'] = ''; @@ -559,7 +559,7 @@ class User if ($form['USR_CITY'] != '') { $oCity = \IsoSubdivisionPeer::retrieveByPK($form['USR_COUNTRY'], $form['USR_CITY']); if (is_null($oCity)) { - throw new \Exception('invalid value for `usr_city`: '.$form['USR_CITY']); + throw new \Exception('Invalid value for `usr_city`: '.$form['USR_CITY']); } else { $aData['USR_CITY'] = $form['USR_CITY']; } @@ -567,7 +567,7 @@ class User if ($form['USR_LOCATION'] != '') { $oLocation = \IsoLocationPeer::retrieveByPK($form['USR_COUNTRY'], $form['USR_LOCATION']); if (is_null($oLocation)) { - throw new \Exception('invalid value for `usr_location`: '.$form['USR_LOCATION']); + throw new \Exception('Invalid value for `usr_location`: '.$form['USR_LOCATION']); } else { $aData['USR_LOCATION'] = $form['USR_LOCATION']; } @@ -640,7 +640,7 @@ class User $c = $oProcessMap->getCriteriaUsersCases('CANCELLED', $USR_UID); $history += \ApplicationPeer::doCount($c); if ($total > 0) { - throw (new \Exception( 'The user with usr_uid: '. $USR_UID .', cannot be deleted while has assigned cases.')); + throw (new \Exception( 'The user with usr_uid: '. $USR_UID .', cannot be deleted while it has cases assigned.')); } else { $UID = $usrUid; \G::LoadClass('tasks'); @@ -690,14 +690,14 @@ class User } if ($start) { if ($start < 0) { - throw (new \Exception( 'invalid value specified for `start`.')); + throw (new \Exception( 'Invalid value specified for `start`.')); } else { $oCriteria->setOffset($start); } } if ($limit != '') { if ($limit < 0) { - throw (new \Exception( 'invalid value specified for `limit`.')); + throw (new \Exception( 'Invalid value specified for `limit`.')); } else { if ($limit == 0) { return $aUserInfo; @@ -735,7 +735,7 @@ class User $aUserInfo = array(); $oUser = \UsersPeer::retrieveByPK($userUid); if (is_null($oUser)) { - throw (new \Exception( 'This id for `usr_uid`: '. $userUid .' do not correspond to a registered user')); + throw (new \Exception( 'This id for `usr_uid`: '. $userUid .' does not correspond to a registered user')); } require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "Users.php"); $oCriteria = new \Criteria();