Merged in cochalo/processmaker (pull request #200)
Correcion de variable en REPORT TABLE
This commit is contained in:
@@ -109,6 +109,19 @@ class DataBaseConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($dataDBConnection['DBS_SERVER']) && $dataDBConnection['DBS_SERVER'] == '') {
|
||||||
|
throw (new \Exception("This 'dbs_server' is invalid"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($dataDBConnection['DBS_DATABASE_NAME']) && $dataDBConnection['DBS_DATABASE_NAME'] == '') {
|
||||||
|
throw (new \Exception("This 'dbs_database_name' is invalid"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($dataDBConnection['DBS_PORT']) &&
|
||||||
|
($dataDBConnection['DBS_PORT'] == ''|| $dataDBConnection['DBS_PORT'] == 0)) {
|
||||||
|
throw (new \Exception("This 'dbs_port' is invalid"));
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($dataDBConnection['DBS_ENCODE'])) {
|
if (isset($dataDBConnection['DBS_ENCODE'])) {
|
||||||
$encodesExists = array();
|
$encodesExists = array();
|
||||||
$dbs = new dbConnections();
|
$dbs = new dbConnections();
|
||||||
@@ -306,7 +319,8 @@ class DataBaseConnection
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getDbEngines () {
|
public function getDbEngines ()
|
||||||
|
{
|
||||||
if (!class_exists('dbConnections')) {
|
if (!class_exists('dbConnections')) {
|
||||||
G::LoadClass('dbConnections');
|
G::LoadClass('dbConnections');
|
||||||
}
|
}
|
||||||
@@ -324,7 +338,8 @@ class DataBaseConnection
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateProUid ($pro_uid) {
|
public function validateProUid ($pro_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -346,7 +361,8 @@ class DataBaseConnection
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateDbsUid ($dbs_uid, $pro_uid) {
|
public function validateDbsUid ($dbs_uid, $pro_uid)
|
||||||
|
{
|
||||||
$dbs_uid = trim($dbs_uid);
|
$dbs_uid = trim($dbs_uid);
|
||||||
if ($dbs_uid == '') {
|
if ($dbs_uid == '') {
|
||||||
throw (new \Exception("The database connection with dbs_uid: '', does not exist."));
|
throw (new \Exception("The database connection with dbs_uid: '', does not exist."));
|
||||||
|
|||||||
@@ -174,7 +174,8 @@ class Event
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateProUid ($pro_uid) {
|
public function validateProUid ($pro_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -195,7 +196,8 @@ class Event
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateEvnUid ($evn_uid) {
|
public function validateEvnUid ($evn_uid)
|
||||||
|
{
|
||||||
$evn_uid = trim($evn_uid);
|
$evn_uid = trim($evn_uid);
|
||||||
if ($evn_uid == '') {
|
if ($evn_uid == '') {
|
||||||
throw (new \Exception("The event with evn_uid: '', does not exist."));
|
throw (new \Exception("The event with evn_uid: '', does not exist."));
|
||||||
@@ -216,7 +218,8 @@ class Event
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateTasUid($tas_uid) {
|
public function validateTasUid($tas_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -237,7 +240,8 @@ class Event
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateTriUid($tri_uid) {
|
public function validateTriUid($tri_uid)
|
||||||
|
{
|
||||||
$tri_uid = trim($tri_uid);
|
$tri_uid = trim($tri_uid);
|
||||||
if ($tri_uid == '') {
|
if ($tri_uid == '') {
|
||||||
throw (new \Exception("The trigger with tri_uid: '', does not exist."));
|
throw (new \Exception("The trigger with tri_uid: '', does not exist."));
|
||||||
|
|||||||
@@ -304,7 +304,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateProUid ($pro_uid) {
|
public function validateProUid ($pro_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -325,7 +326,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateOpUid ($op_uid) {
|
public function validateOpUid ($op_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -346,7 +348,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateUsrUid($usr_uid) {
|
public function validateUsrUid($usr_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -367,7 +370,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateGrpUid($grp_uid) {
|
public function validateGrpUid($grp_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -388,7 +392,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateTasUid($tas_uid) {
|
public function validateTasUid($tas_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -409,7 +414,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateDynUid($dyn_uid) {
|
public function validateDynUid($dyn_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -430,7 +436,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateInpUid($inp_uid) {
|
public function validateInpUid($inp_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
@@ -451,7 +458,8 @@ class ProcessPermissions
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function validateOutUid($out_uid) {
|
public function validateOutUid($out_uid)
|
||||||
|
{
|
||||||
$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."));
|
||||||
|
|||||||
@@ -574,7 +574,7 @@ class Table
|
|||||||
$classPeerName = $className . 'Peer';
|
$classPeerName = $className . 'Peer';
|
||||||
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
||||||
if (! file_exists( $sPath . $className . '.php' )) {
|
if (! file_exists( $sPath . $className . '.php' )) {
|
||||||
throw new \Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $this->className ) );
|
throw new \Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $className ) );
|
||||||
}
|
}
|
||||||
require_once $sPath . $className . '.php';
|
require_once $sPath . $className . '.php';
|
||||||
|
|
||||||
@@ -666,7 +666,7 @@ class Table
|
|||||||
$classPeerName = $className . 'Peer';
|
$classPeerName = $className . 'Peer';
|
||||||
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
|
||||||
if (! file_exists( $sPath . $className . '.php' )) {
|
if (! file_exists( $sPath . $className . '.php' )) {
|
||||||
throw new \Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $this->className ) );
|
throw new \Exception( 'Update:: ' . G::loadTranslation( 'ID_PMTABLE_CLASS_DOESNT_EXIST', $className ) );
|
||||||
}
|
}
|
||||||
require_once $sPath . $className . '.php';
|
require_once $sPath . $className . '.php';
|
||||||
|
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ class DataBaseConnection extends Api
|
|||||||
* @param string $prj_uid {@min 1} {@max 32}
|
* @param string $prj_uid {@min 1} {@max 32}
|
||||||
* @param array $request_data
|
* @param array $request_data
|
||||||
*
|
*
|
||||||
* @param string $dbs_type {@from body} {@min 1}
|
* @param string $dbs_type {@from body} {@required true}
|
||||||
* @param string $dbs_server {@from body} {@min 1}
|
* @param string $dbs_server {@from body} {@required true}
|
||||||
* @param string $dbs_database_name {@from body} {@min 1}
|
* @param string $dbs_database_name {@from body} {@required true}
|
||||||
* @param string $dbs_username {@from body}
|
* @param string $dbs_username {@from body}
|
||||||
* @param string $dbs_port {@from body} {@type float}
|
* @param string $dbs_port {@from body} {@type float}
|
||||||
* @param string $dbs_encode {@from body} {@min 1}
|
* @param string $dbs_encode {@from body} {@required true}
|
||||||
* @param string $dbs_password {@from body}
|
* @param string $dbs_password {@from body}
|
||||||
* @param string $dbs_description {@from body}
|
* @param string $dbs_description {@from body}
|
||||||
* @return array
|
* @return array
|
||||||
@@ -99,12 +99,12 @@ class DataBaseConnection extends Api
|
|||||||
* @param string $prj_uid {@min 1} {@max 32}
|
* @param string $prj_uid {@min 1} {@max 32}
|
||||||
* @param array $request_data
|
* @param array $request_data
|
||||||
*
|
*
|
||||||
* @param string $dbs_type {@from body} {@min 1}
|
* @param string $dbs_type {@from body} {@required true}
|
||||||
* @param string $dbs_server {@from body} {@min 1}
|
* @param string $dbs_server {@from body} {@required true}
|
||||||
* @param string $dbs_database_name {@from body} {@min 1}
|
* @param string $dbs_database_name {@from body} {@required true}
|
||||||
* @param string $dbs_username {@from body}
|
* @param string $dbs_username {@from body}
|
||||||
* @param string $dbs_port {@from body} {@type float}
|
* @param string $dbs_port {@from body} {@type float}
|
||||||
* @param string $dbs_encode {@from body} {@min 1}
|
* @param string $dbs_encode {@from body} {@required true}
|
||||||
* @param string $dbs_password {@from body}
|
* @param string $dbs_password {@from body}
|
||||||
* @param string $dbs_description {@from body}
|
* @param string $dbs_description {@from body}
|
||||||
* @return array
|
* @return array
|
||||||
@@ -141,12 +141,12 @@ class DataBaseConnection extends Api
|
|||||||
* @param string $dbs_uid {@min 1} {@max 32}
|
* @param string $dbs_uid {@min 1} {@max 32}
|
||||||
* @param array $request_data
|
* @param array $request_data
|
||||||
*
|
*
|
||||||
* @param string $dbs_type {@from body}
|
* @param string $dbs_type {@from body} {@required true}
|
||||||
* @param string $dbs_server {@from body}
|
* @param string $dbs_server {@from body} {@required true}
|
||||||
* @param string $dbs_database_name {@from body}
|
* @param string $dbs_database_name {@from body} {@required true}
|
||||||
* @param string $dbs_username {@from body}
|
* @param string $dbs_username {@from body}
|
||||||
* @param string $dbs_port {@from body}
|
* @param string $dbs_port {@from body} {@type float}
|
||||||
* @param string $dbs_encode {@from body}
|
* @param string $dbs_encode {@from body} {@required true}
|
||||||
* @param string $dbs_password {@from body}
|
* @param string $dbs_password {@from body}
|
||||||
* @param string $dbs_description {@from body}
|
* @param string $dbs_description {@from body}
|
||||||
* @return void
|
* @return void
|
||||||
|
|||||||
Reference in New Issue
Block a user