Merge remote branch 'upstream/master'
This commit is contained in:
@@ -2094,3 +2094,4 @@ function PMFGetCaseNotes ($applicationID, $type='array', $userUid='')
|
|||||||
$response = Cases::getCaseNotes($applicationID, $type, $userUid);
|
$response = Cases::getCaseNotes($applicationID, $type, $userUid);
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DbSource.php
|
* DbSource.php
|
||||||
* @package workflow.engine.classes.model
|
* @package workflow.engine.classes.model
|
||||||
@@ -23,11 +24,9 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'classes/model/Content.php';
|
require_once 'classes/model/Content.php';
|
||||||
require_once 'classes/model/om/BaseDbSource.php';
|
require_once 'classes/model/om/BaseDbSource.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'DB_SOURCE' table.
|
* Skeleton subclass for representing a row from the 'DB_SOURCE' table.
|
||||||
*
|
*
|
||||||
@@ -52,16 +51,17 @@ class DbSource extends BaseDbSource
|
|||||||
* Get the rep_tab_title column value.
|
* Get the rep_tab_title column value.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getDBSourceDescription() {
|
public function getDBSourceDescription()
|
||||||
if ( $this->getDbsUid() == "" ) {
|
{
|
||||||
throw ( new Exception( "Error in getDBSourceDescription, the getDbsUid() can't be blank") );
|
if ($this->getDbsUid() == "") {
|
||||||
}
|
throw ( new Exception("Error in getDBSourceDescription, the getDbsUid() can't be blank") );
|
||||||
$lang = defined ( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
}
|
||||||
$this->db_source_description = Content::load ( 'DBS_DESCRIPTION', '', $this->getDbsUid(), $lang );
|
$lang = defined('SYS_LANG') ? SYS_LANG : 'en';
|
||||||
return $this->db_source_description;
|
$this->db_source_description = Content::load('DBS_DESCRIPTION', '', $this->getDbsUid(), $lang);
|
||||||
|
return $this->db_source_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCriteriaDBSList($sProcessUID)
|
public function getCriteriaDBSList($sProcessUID)
|
||||||
{
|
{
|
||||||
$sDelimiter = DBAdapter::getStringDelimiter();
|
$sDelimiter = DBAdapter::getStringDelimiter();
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
@@ -95,46 +95,44 @@ class DbSource extends BaseDbSource
|
|||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
return $aFields;
|
return $aFields;
|
||||||
} else {
|
} else {
|
||||||
throw(new Exception( "The row '$Uid'/'$ProUID' in table DbSource doesn't exist!" ));
|
throw(new Exception("The row '$Uid'/'$ProUID' in table DbSource doesn't exist!"));
|
||||||
}
|
}
|
||||||
}
|
} catch (exception $oError) {
|
||||||
catch (exception $oError) {
|
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getValProUid($Uid)
|
public function getValProUid($Uid)
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->clearSelectColumns();
|
$oCriteria->clearSelectColumns();
|
||||||
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
|
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
|
||||||
$oCriteria->add(DbSourcePeer::DBS_UID, $Uid);
|
$oCriteria->add(DbSourcePeer::DBS_UID, $Uid);
|
||||||
$result = DbSourcePeer::doSelectRS($oCriteria);
|
$result = DbSourcePeer::doSelectRS($oCriteria);
|
||||||
$result->next();
|
$result->next();
|
||||||
$aRow = $result->getRow();
|
$aRow = $result->getRow();
|
||||||
return $aRow[0];
|
return $aRow[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function Exists ( $Uid, $ProUID ) {
|
public function Exists($Uid, $ProUID)
|
||||||
try {
|
{
|
||||||
$oPro = DbSourcePeer::retrieveByPk( $Uid, $ProUID );
|
try {
|
||||||
if (is_object($oPro) && get_class ($oPro) == 'DbSource' ) {
|
$oPro = DbSourcePeer::retrieveByPk($Uid, $ProUID);
|
||||||
return true;
|
if (is_object($oPro) && get_class($oPro) == 'DbSource') {
|
||||||
}
|
return true;
|
||||||
else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} catch (Exception $oError) {
|
||||||
|
throw($oError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $oError) {
|
|
||||||
throw($oError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function update($fields)
|
public function update($fields)
|
||||||
{
|
{
|
||||||
if( $fields['DBS_ENCODE'] == '0'){
|
if ($fields['DBS_ENCODE'] == '0') {
|
||||||
unset($fields['DBS_ENCODE']);
|
unset($fields['DBS_ENCODE']);
|
||||||
}
|
}
|
||||||
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
@@ -148,14 +146,13 @@ class DbSource extends BaseDbSource
|
|||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw (new Exception("Failed Validation in class " . get_class($this) . "."));
|
throw (new Exception("Failed Validation in class " . get_class($this) . "."));
|
||||||
}
|
}
|
||||||
}
|
} catch (exception $e) {
|
||||||
catch (exception $e) {
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove($DbsUid, $ProUID )
|
public function remove($DbsUid, $ProUID)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
@@ -165,30 +162,31 @@ class DbSource extends BaseDbSource
|
|||||||
// note added by gustavo cruz gustavo-at-colosa-dot-com
|
// note added by gustavo cruz gustavo-at-colosa-dot-com
|
||||||
// we assure that the _delete attribute must be set to false
|
// we assure that the _delete attribute must be set to false
|
||||||
// if a record exists in the database with that uid.
|
// if a record exists in the database with that uid.
|
||||||
if ($this->Exists($DbsUid, $ProUID)){
|
if ($this->Exists($DbsUid, $ProUID)) {
|
||||||
$this->setDeleted(false);
|
$this->setDeleted(false);
|
||||||
}
|
}
|
||||||
$result = $this->delete();
|
$result = $this->delete();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
} catch (exception $e) {
|
||||||
catch (exception $e) {
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function create($aData)
|
public function create($aData)
|
||||||
{
|
{
|
||||||
if( $aData['DBS_ENCODE'] == '0'){
|
if ($aData['DBS_ENCODE'] == '0') {
|
||||||
unset($aData['DBS_ENCODE']);
|
unset($aData['DBS_ENCODE']);
|
||||||
}
|
}
|
||||||
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
if ( isset ( $aData['DBS_UID'] ) && $aData['DBS_UID']== '' )
|
if (isset($aData['DBS_UID']) && $aData['DBS_UID'] == '') {
|
||||||
unset ( $aData['DBS_UID'] );
|
unset($aData['DBS_UID']);
|
||||||
if ( !isset ( $aData['DBS_UID'] ) )
|
}
|
||||||
$aData['DBS_UID'] = G::generateUniqueID();
|
if (!isset($aData['DBS_UID'])) {
|
||||||
|
$aData['DBS_UID'] = G::generateUniqueID();
|
||||||
|
}
|
||||||
$this->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
$this->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
@@ -199,11 +197,11 @@ class DbSource extends BaseDbSource
|
|||||||
}
|
}
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $this->getDbsUid();
|
return $this->getDbsUid();
|
||||||
}
|
} catch (exception $e) {
|
||||||
catch (exception $e) {
|
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // DbSource
|
// DbSource
|
||||||
|
|
||||||
@@ -53,8 +53,12 @@ try {
|
|||||||
|
|
||||||
$bReturnValue = true;
|
$bReturnValue = true;
|
||||||
$displayMode = 'display:block';
|
$displayMode = 'display:block';
|
||||||
$methodreturnDescription = (trim(strtoupper($methodreturnA [3])) == strtoupper(G::LoadTranslation ( 'ID_NONE')) )
|
$methodreturnDescription = "";
|
||||||
? G::LoadTranslation ( 'ID_NOT_REQUIRED') : $methodreturnA [3];
|
if (isset($methodreturnA[3])) {
|
||||||
|
$methodreturnDescription = (trim(strtoupper($methodreturnA [3])) == strtoupper(G::LoadTranslation ('ID_NONE')))
|
||||||
|
? G::LoadTranslation ( 'ID_NOT_REQUIRED')
|
||||||
|
: $methodreturnA [3];
|
||||||
|
}
|
||||||
$methodReturnLabel = isset ( $methodreturnA [3] ) ? $methodreturnDescription : $methodReturn;
|
$methodReturnLabel = isset ( $methodreturnA [3] ) ? $methodreturnDescription : $methodReturn;
|
||||||
if ( (isset($methodreturnA[0]) && isset($methodreturnA[1]))
|
if ( (isset($methodreturnA[0]) && isset($methodreturnA[1]))
|
||||||
&& (trim(strtoupper($methodreturnA[0]) ) != strtoupper(G::LoadTranslation ( 'ID_NONE')) ) ) {
|
&& (trim(strtoupper($methodreturnA[0]) ) != strtoupper(G::LoadTranslation ( 'ID_NONE')) ) ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user