diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php b/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php index fc7205805..01df38d5a 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/FilesManager.php @@ -62,7 +62,7 @@ class FilesManager $sDirectory = PATH_DATA_PUBLIC . $sProcessUID . PATH_SEP . $sSubDirectory; break; default: - throw (new \Exception( 'Invalid value specified for `path`. Expecting `templates` or `public`')); + throw (new \Exception( 'Invalid value specified for path. Expecting templates or public')); break; } \G::verifyPath($sDirectory, true); @@ -147,7 +147,7 @@ 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.')); } $extention = strstr($aData['prf_filename'], '.'); if (!$extention) { @@ -162,7 +162,7 @@ class FilesManager } $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) ; @@ -329,7 +329,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); @@ -398,7 +398,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); @@ -440,7 +440,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); @@ -456,7 +456,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; @@ -492,7 +492,7 @@ class FilesManager if (file_exists($sDirectory.$sDirToDelete)) { \G::rm_dir($sDirectory.$sDirToDelete); } else { - throw (new \Exception( 'Invalid value specified for `path`.')); + throw (new \Exception( 'Invalid value specified for path.')); } $criteria = new \Criteria("workflow"); $criteria->addSelectColumn(\ProcessFilesPeer::PRF_PATH); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/OutputDocument.php b/workflow/engine/src/ProcessMaker/BusinessModel/OutputDocument.php index 5c08340a9..4a8981856 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/OutputDocument.php +++ b/workflow/engine/src/ProcessMaker/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 not be null')); } if (isset($aData["OUT_DOC_TITLE"]) && $this->existsTitle($sProcessUID, $aData["OUT_DOC_TITLE"])) { throw (new \Exception(\G::LoadTranslation("ID_OUTPUT_NOT_SAVE"))); @@ -296,7 +296,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 { diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php index a7d0bd9ed..518a848c6 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php +++ b/workflow/engine/src/ProcessMaker/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 .' does 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'); @@ -631,7 +631,7 @@ class ProcessSupervisor { $oTypeDynaform = \DynaformPeer::retrieveByPK($sDynUID); if (is_null( $oTypeDynaform )) { - throw (new \Exception( 'This id for `dyn_uid`: '. $sDynUID .' does 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(); @@ -717,7 +717,7 @@ class ProcessSupervisor { $oTypeInputDocument= \InputDocumentPeer::retrieveByPK($sInputDocumentUID); if (is_null( $oTypeInputDocument )) { - throw (new \Exception( 'This id for `inp_doc_uid`: '. $sInputDocumentUID .' does 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(); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ProjectUser.php b/workflow/engine/src/ProcessMaker/BusinessModel/ProjectUser.php index 0c1880ca0..db858723b 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/ProjectUser.php +++ b/workflow/engine/src/ProcessMaker/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 .' does 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 .' does 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 .' does 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 .' does 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 .' does not have 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) { @@ -214,7 +214,7 @@ class ProjectUser try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does not correspond to a registered process')); + throw (new \Exception( 'This id for prj_uid: '. $sProcessUID .' does not correspond to a registered process')); } /** * process_webEntryValidate @@ -292,9 +292,9 @@ class ProjectUser $userIsAssigned = \GroupUserPeer::doCount( $oCriteria ); if (! ($userIsAssigned >= 1)) { if ($sTASKS) { - throw (new \Exception( "The `usr_uid` `" . $sWS_USER . "` doesn't have the activity `act_uid` `" . $sTASKS . "` assigned")); + throw (new \Exception( "The usr_uid: " . $sWS_USER . " doesn't have the activity act_uid: " . $sTASKS . " assigned")); } else { - throw (new \Exception( "The `usr_uid` `" . $sWS_USER . "` doesn't have an activity assigned")); + throw (new \Exception( "The usr_uid: " . $sWS_USER . " doesn't have an activity assigned")); } } } diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php index bab162bd8..2cf999702 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php @@ -732,11 +732,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 .' does 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 .' does 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(); @@ -849,14 +849,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(); @@ -894,11 +894,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 .' does 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 .' does 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(); @@ -1004,14 +1004,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(); @@ -1043,11 +1043,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does 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(); @@ -1179,11 +1179,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does 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 = ''; @@ -1251,11 +1251,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does 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 = ''; @@ -1303,11 +1303,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 .' does 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 .' does 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(); @@ -1420,14 +1420,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(); @@ -1466,11 +1466,11 @@ class Task $aUsers = array(); $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does not correspond to a registered activity')); + throw (new \Exception( 'This id for act_uid: '. $sTaskUID .' does not correspond to a registered activity')); } $iType = 2; @@ -1576,14 +1576,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(); @@ -1617,11 +1617,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does 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(); @@ -1753,11 +1753,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does 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 = ''; @@ -1825,11 +1825,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does 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 = ''; @@ -1952,11 +1952,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does not correspond to a registered activity')); + throw (new \Exception( 'This id for act_uid: '. $sTaskUID .' does not correspond to a registered activity')); } $aUsers = array(); $oTasks = new \Tasks(); @@ -2035,14 +2035,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(); @@ -2077,11 +2077,11 @@ class Task try { $oProcess = \ProcessPeer::retrieveByPK( $sProcessUID ); if (is_null($oProcess)) { - throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' does 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 .' does not correspond to a registered activity')); + throw (new \Exception( 'This id for act_uid: '. $sTaskUID .' does not correspond to a registered activity')); } $aUsers = array(); $oTasks = new \Tasks(); @@ -2160,14 +2160,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(); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/User.php b/workflow/engine/src/ProcessMaker/BusinessModel/User.php index 266fde82d..9eabe5763 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/User.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/User.php @@ -213,31 +213,31 @@ class User if ($form['USR_REPLACED_BY'] != '') { $oReplacedBy = \UsersPeer::retrieveByPK($form['USR_REPLACED_BY']); if (is_null($oReplacedBy)) { - throw new \Exception('`usr_replaced_by`:'.$form['USR_REPLACED_BY'].' '.\G::LoadTranslation('ID_AUTHENTICATION_SOURCE_INVALID')); + throw new \Exception('usr_replaced_by:'.$form['USR_REPLACED_BY'].' '.\G::LoadTranslation('ID_AUTHENTICATION_SOURCE_INVALID')); } } 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'])) { @@ -247,10 +247,10 @@ class User } $sConfirm = $this->testPassword($form['USR_NEW_PASS']); if ($sConfirm['STATUS'] != 1) { - throw new \Exception('`usr_new_pass`. '.$sConfirm['DESCRIPTION']); + throw new \Exception('usr_new_pass. '.$sConfirm['DESCRIPTION']); } if ($form['USR_NEW_PASS'] != $form['USR_CNF_PASS']) { - throw new \Exception('`usr_new_pass or usr_cnf_pass`. '.\G::LoadTranslation('ID_NEW_PASS_SAME_OLD_PASS')); + throw new \Exception('usr_new_pass or usr_cnf_pass. '.\G::LoadTranslation('ID_NEW_PASS_SAME_OLD_PASS')); } $form['USR_PASSWORD'] = md5($form['USR_NEW_PASS']); if (!isset($form['USR_CITY'])) { @@ -266,45 +266,45 @@ class User $criteria->addSelectColumn(\UsersPeer::USR_USERNAME); $criteria->add(\UsersPeer::USR_USERNAME, utf8_encode($arrayData['USR_USERNAME'])); if (\UsersPeer::doCount($criteria) > 0) { - throw new \Exception('`usr_username`. '.\G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', array('USER_ID' => $arrayData['USR_USERNAME']))); + throw new \Exception('usr_username. '.\G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', array('USER_ID' => $arrayData['USR_USERNAME']))); } if ($form['USR_USERNAME'] == '') { - throw new \Exception('`usr_name`. '.\G::LoadTranslation('ID_MSG_ERROR_USR_USERNAME')); + throw new \Exception('usr_name. '.\G::LoadTranslation('ID_MSG_ERROR_USR_USERNAME')); } else { $aData['USR_USERNAME'] = $form['USR_USERNAME']; } $aData['USR_PASSWORD'] = $form['USR_PASSWORD']; if ($form['USR_FIRSTNAME'] == '') { - throw new \Exception('`usr_firstname`. '.\G::LoadTranslation('ID_MSG_ERROR_USR_FIRSTNAME')); + throw new \Exception('usr_firstname. '.\G::LoadTranslation('ID_MSG_ERROR_USR_FIRSTNAME')); } else { $aData['USR_FIRSTNAME'] = $form['USR_FIRSTNAME']; } if ($form['USR_LASTNAME'] == '') { - throw new \Exception('`usr_lastname`. '.\G::LoadTranslation('ID_MSG_ERROR_USR_LASTNAME')); + throw new \Exception('usr_lastname. '.\G::LoadTranslation('ID_MSG_ERROR_USR_LASTNAME')); } else { $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 not be null.'); } else { if (!filter_var($form['USR_EMAIL'], FILTER_VALIDATE_EMAIL)) { - throw new \Exception('`usr_email`. '.\G::LoadTranslation('ID_INCORRECT_EMAIL')); + throw new \Exception('usr_email. '.\G::LoadTranslation('ID_INCORRECT_EMAIL')); } else { $aData['USR_EMAIL'] = $form['USR_EMAIL']; } } if ($form['USR_DUE_DATE'] == '') { - throw new \Exception('`usr_due_date`. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); + throw new \Exception('usr_due_date. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); } else { $dueDate = explode("-", $form['USR_DUE_DATE']); if (ctype_digit($dueDate[0])) { if (checkdate($dueDate[1], $dueDate[2], $dueDate[0]) == false) { - throw new \Exception('`usr_due_date`. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); + throw new \Exception('usr_due_date. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); } else { $aData['USR_DUE_DATE'] = $form['USR_DUE_DATE']; } } else { - throw new \Exception('`usr_due_date`. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); + throw new \Exception('usr_due_date. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); } } $aData['USR_CREATE_DATE'] = date('Y-m-d H:i:s'); @@ -313,16 +313,16 @@ 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 not be null'); } else { if ($form['USR_STATUS'] == 'ACTIVE' || $form['USR_STATUS'] == 'INACTIVE' || $form['USR_STATUS'] == 'VACATION') { $aData['USR_STATUS'] = $form['USR_STATUS']; } else { - throw new \Exception('`usr_status`. Invalid value for status field.'); + throw new \Exception('usr_status. Invalid value for status field.'); } } 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 not be null'); } else { require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "Roles.php"); $oCriteria = new \Criteria('rbac'); @@ -333,7 +333,7 @@ class User if ($oDataset->getRow()) { $aData['USR_ROLE'] = $form['USR_ROLE']; } else { - throw new \Exception('`usr_role`. Invalid value for role field.'); + throw new \Exception('usr_role. Invalid value for role field.'); } } try { @@ -398,13 +398,13 @@ class User } } if ($countPermission != 1) { - throw new \Exception('This user: '.$usrLoggedUid. ', can`t update the data.'); + throw new \Exception('This user: '.$usrLoggedUid. ', can not update the data.'); } $criteria = new \Criteria(); $criteria->addSelectColumn(\UsersPeer::USR_USERNAME); $criteria->add(\UsersPeer::USR_USERNAME, utf8_encode($arrayData['USR_USERNAME'])); if (\UsersPeer::doCount($criteria) > 0) { - throw new \Exception('`usr_username`. '.\G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', array('USER_ID' => $arrayData['USR_USERNAME']))); + throw new \Exception('usr_username. '.\G::LoadTranslation('ID_USERNAME_ALREADY_EXISTS', array('USER_ID' => $arrayData['USR_USERNAME']))); } if (isset($usrUid)) { $form['USR_UID'] = $usrUid; @@ -427,7 +427,7 @@ class User if (isset($form['USR_PASSWORD'])) { if ($form['USR_PASSWORD'] != '') { if ($form['USR_NEW_PASS'] != $form['USR_CNF_PASS']) { - throw new \Exception('`usr_new_pass or usr_cnf_pass`. '.\G::LoadTranslation('ID_NEW_PASS_SAME_OLD_PASS')); + throw new \Exception('usr_new_pass or usr_cnf_pass. '.\G::LoadTranslation('ID_NEW_PASS_SAME_OLD_PASS')); } $aData['USR_PASSWORD'] = $form['USR_PASSWORD']; require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "UsersProperties.php"); @@ -464,7 +464,7 @@ class User } } $sDescription .= '' . \G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY'); - throw new \Exception('`usr_new_pass or usr_cnf_pass`. '.$sDescription); + throw new \Exception('usr_new_pass or usr_cnf_pass. '.$sDescription); } $aHistory = unserialize($aUserProperty['USR_PASSWORD_HISTORY']); if (!is_array($aHistory)) { @@ -487,7 +487,7 @@ class User $sDescription = \G::LoadTranslation('ID_POLICY_ALERT') . ':

'; $sDescription .= ' - ' . \G::LoadTranslation('PASSWORD_HISTORY') . ': ' . PPP_PASSWORD_HISTORY . '
'; $sDescription .= '
' . \G::LoadTranslation('ID_PLEASE_CHANGE_PASSWORD_POLICY') . ''; - throw new \Exception('`usr_new_pass or usr_cnf_pass`. '.$sDescription); + throw new \Exception('usr_new_pass or usr_cnf_pass. '.$sDescription); } if (count($aHistory) >= PPP_PASSWORD_HISTORY) { $sLastPassw = array_shift($aHistory); @@ -508,7 +508,7 @@ class User } if ($form['USR_EMAIL'] != '') { if (!filter_var($form['USR_EMAIL'], FILTER_VALIDATE_EMAIL)) { - throw new \Exception('`usr_email`. '.\G::LoadTranslation('ID_INCORRECT_EMAIL')); + throw new \Exception('usr_email. '.\G::LoadTranslation('ID_INCORRECT_EMAIL')); } else { $aData['USR_EMAIL'] = $form['USR_EMAIL']; } @@ -517,12 +517,12 @@ class User $dueDate = explode("-", $form['USR_DUE_DATE']); if (ctype_digit($dueDate[0])) { if (checkdate($dueDate[1], $dueDate[2], $dueDate[0]) == false) { - throw new \Exception('`usr_due_date`. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); + throw new \Exception('usr_due_date. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); } else { $aData['USR_DUE_DATE'] = $form['USR_DUE_DATE']; } } else { - throw new \Exception('`usr_due_date`. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); + throw new \Exception('usr_due_date. '.\G::LoadTranslation('ID_MSG_ERROR_DUE_DATE')); } } $aData['USR_UPDATE_DATE'] = date('Y-m-d H:i:s'); @@ -539,7 +539,7 @@ class User if ($oDataset->getRow()) { $aData['USR_ROLE'] = $form['USR_ROLE']; } else { - throw new \Exception('`usr_role`. Invalid value for field.'); + throw new \Exception('usr_role. Invalid value for field.'); } $this->updateUser($aData, $form['USR_ROLE']); } else { @@ -548,7 +548,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'] = ''; @@ -558,7 +558,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']; } @@ -566,7 +566,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']; } @@ -581,7 +581,7 @@ class User if ($form['USR_REPLACED_BY'] != '') { $oReplacedBy = \UsersPeer::retrieveByPK($form['USR_REPLACED_BY']); if (is_null($oReplacedBy)) { - throw new \Exception('`usr_replaced_by`:'.$form['USR_REPLACED_BY'].' '.\G::LoadTranslation('ID_AUTHENTICATION_SOURCE_INVALID')); + throw new \Exception('usr_replaced_by:'.$form['USR_REPLACED_BY'].' '.\G::LoadTranslation('ID_AUTHENTICATION_SOURCE_INVALID')); } else { $aData['USR_REPLACED_BY'] = $form['USR_REPLACED_BY']; } @@ -689,14 +689,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; @@ -734,7 +734,7 @@ class User $aUserInfo = array(); $oUser = \UsersPeer::retrieveByPK($userUid); if (is_null($oUser)) { - throw (new \Exception( 'This id for `usr_uid`: '. $userUid .' does 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();