diff --git a/workflow/engine/classes/class.processMap.php b/workflow/engine/classes/class.processMap.php
index 6b269e0b4..25876588a 100755
--- a/workflow/engine/classes/class.processMap.php
+++ b/workflow/engine/classes/class.processMap.php
@@ -967,13 +967,7 @@ class processMap
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID' );
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter );
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(InputDocumentPeer::INP_DOC_UID, $sUIDs, Criteria::NOT_IN);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
@@ -983,7 +977,9 @@ class processMap
if (($aRow['INP_DOC_TITLE'] == null) || ($aRow['INP_DOC_TITLE'] == "")) {
// There is no transaltion for this Document name, try to get/regenerate the label
- $aRow['INP_DOC_TITLE'] = Content::Load("INP_DOC_TITLE", "", $aRow['INP_DOC_UID'], SYS_LANG);
+ $oInputDocument = new InputDocument;
+ $row = $oInputDocument->load($aRow['INP_DOC_UID']);
+ $aRow['INP_DOC_TITLE'] = $row['INP_DOC_TITLE'];
}
$aBB[] = array('STEP_UID' => $aRow['INP_DOC_UID'], 'STEP_TITLE' => $aRow['INP_DOC_TITLE'], 'STEP_TYPE_OBJ' => 'INPUT_DOCUMENT', 'STEP_MODE' => '' );
$oDataset->next();
@@ -2149,24 +2145,11 @@ class processMap
public function getInputDocumentsCriteria($sProcessUID = '')
{
- $sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_DESCRIPTION);
$oCriteria->addSelectColumn(InputDocumentPeer::PRO_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C1.CON_VALUE');
- $oCriteria->addAsColumn('INP_DOC_DESCRIPTION', 'C2.CON_VALUE');
- $oCriteria->addAlias('C1', 'CONTENT');
- $oCriteria->addAlias('C2', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C1.CON_ID' );
- $aConditions[] = array('C1.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter );
- $aConditions[] = array('C1.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C2.CON_ID' );
- $aConditions[] = array('C2.CON_CATEGORY', $sDelimiter . 'INP_DOC_DESCRIPTION' . $sDelimiter );
- $aConditions[] = array('C2.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
@@ -3198,17 +3181,11 @@ class processMap
$oCriteria->addSelectColumn(StepSupervisorPeer::STEP_TYPE_OBJ);
$oCriteria->addSelectColumn(StepSupervisorPeer::STEP_UID_OBJ);
$oCriteria->addSelectColumn(StepSupervisorPeer::STEP_POSITION);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(StepSupervisorPeer::STEP_UID_OBJ, InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
$oCriteria->addAscendingOrderByColumn(StepSupervisorPeer::STEP_POSITION);
@@ -3304,17 +3281,10 @@ class processMap
$aUIDS[] = $aRow['STEP_UID_OBJ'];
$oDataset->next();
}
- $sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->addSelectColumn(InputDocumentPeer::PRO_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(InputDocumentPeer::INP_DOC_UID, $aUIDS, Criteria::NOT_IN);
return $oCriteria;
@@ -4314,13 +4284,7 @@ class processMap
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(InputDocumentPeer::INP_DOC_UID, $aInputsUIDS, Criteria::NOT_IN);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria);
@@ -5470,13 +5434,7 @@ class processMap
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(InputDocumentPeer::INP_DOC_UID, $sUIDs, Criteria::NOT_IN);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria);
@@ -5956,26 +5914,13 @@ class processMap
public function getExtInputDocumentsCriteria($start, $limit, $sProcessUID = '')
{
$aTasks = $this->getAllInputDocsByTask($sProcessUID);
- $sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_DESCRIPTION);
$oCriteria->addSelectColumn(InputDocumentPeer::PRO_UID);
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_VERSIONING);
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_DESTINATION_PATH);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C1.CON_VALUE');
- $oCriteria->addAsColumn('INP_DOC_DESCRIPTION', 'C2.CON_VALUE');
- $oCriteria->addAlias('C1', 'CONTENT');
- $oCriteria->addAlias('C2', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C1.CON_ID');
- $aConditions[] = array('C1.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C1.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C2.CON_ID');
- $aConditions[] = array('C2.CON_CATEGORY', $sDelimiter . 'INP_DOC_DESCRIPTION' . $sDelimiter);
- $aConditions[] = array('C2.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$this->tmpCriteria = clone $oCriteria;
@@ -6454,17 +6399,11 @@ class processMap
$oCriteria->addSelectColumn(StepSupervisorPeer::STEP_UID_OBJ);
$oCriteria->addSelectColumn(StepSupervisorPeer::STEP_POSITION);
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(StepSupervisorPeer::STEP_UID_OBJ, InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
$oCriteria->addAscendingOrderByColumn(StepSupervisorPeer::STEP_POSITION);
@@ -6508,16 +6447,7 @@ class processMap
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
$oCriteria->addSelectColumn(InputDocumentPeer::PRO_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID'
- );
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter
- );
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter
- );
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(InputDocumentPeer::INP_DOC_UID, $aUIDS, Criteria::NOT_IN);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria);
@@ -6865,13 +6795,7 @@ class processMap
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
- $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(InputDocumentPeer::INP_DOC_UID, $aInputsUIDS, Criteria::NOT_IN);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria);
diff --git a/workflow/engine/classes/class.processes.php b/workflow/engine/classes/class.processes.php
index d4b06eefe..c7af1178d 100755
--- a/workflow/engine/classes/class.processes.php
+++ b/workflow/engine/classes/class.processes.php
@@ -1935,7 +1935,7 @@ class Processes
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oInput = new InputDocument();
- $aInput[] = $oInput->Load($aRow['INP_DOC_UID']);
+ $aInput[] = $oInput->load($aRow['INP_DOC_UID']);
$oDataset->next();
}
return $aInput;
diff --git a/workflow/engine/classes/model/InputDocument.php b/workflow/engine/classes/model/InputDocument.php
index d6004dd16..a998a8902 100755
--- a/workflow/engine/classes/model/InputDocument.php
+++ b/workflow/engine/classes/model/InputDocument.php
@@ -47,14 +47,14 @@ class InputDocument extends BaseInputDocument
*
* @var string
*/
- protected $inp_doc_title = '';
+ protected $inp_doc_title_content = '';
/**
* This value goes in the content table
*
* @var string
*/
- protected $inp_doc_description = '';
+ protected $inp_doc_description_content = '';
/*
* Load the application document registry
@@ -67,8 +67,6 @@ class InputDocument extends BaseInputDocument
$oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );
if (! is_null( $oInputDocument )) {
$aFields = $oInputDocument->toArray( BasePeer::TYPE_FIELDNAME );
- $aFields['INP_DOC_TITLE'] = $oInputDocument->getInpDocTitle();
- $aFields['INP_DOC_DESCRIPTION'] = $oInputDocument->getInpDocDescription();
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
return $aFields;
} else {
@@ -88,8 +86,6 @@ class InputDocument extends BaseInputDocument
}
$aFields = $oInputDocument->toArray( BasePeer::TYPE_FIELDNAME );
- $aFields['INP_DOC_TITLE'] = $oInputDocument->getInpDocTitle();
- $aFields['INP_DOC_DESCRIPTION'] = $oInputDocument->getInpDocDescription();
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
return $aFields;
} catch (Exception $oError) {
@@ -119,10 +115,10 @@ class InputDocument extends BaseInputDocument
if ($oInputDocument->validate()) {
$oConnection->begin();
if (isset( $aData['INP_DOC_TITLE'] )) {
- $oInputDocument->setInpDocTitle( $aData['INP_DOC_TITLE'] );
+ $oInputDocument->setInpDocTitleContent( $aData['INP_DOC_TITLE'] );
}
if (isset( $aData['INP_DOC_DESCRIPTION'] )) {
- $oInputDocument->setInpDocDescription( $aData['INP_DOC_DESCRIPTION'] );
+ $oInputDocument->setInpDocDescriptionContent( $aData['INP_DOC_DESCRIPTION'] );
}
$iResult = $oInputDocument->save();
$oConnection->commit();
@@ -193,10 +189,10 @@ class InputDocument extends BaseInputDocument
if ($oInputDocument->validate()) {
$oConnection->begin();
if (isset( $aData['INP_DOC_TITLE'] )) {
- $oInputDocument->setInpDocTitle( $aData['INP_DOC_TITLE'] );
+ $oInputDocument->setInpDocTitleContent( $aData['INP_DOC_TITLE'] );
}
if (isset( $aData['INP_DOC_DESCRIPTION'] )) {
- $oInputDocument->setInpDocDescription( $aData['INP_DOC_DESCRIPTION'] );
+ $oInputDocument->setInpDocDescriptionContent( $aData['INP_DOC_DESCRIPTION'] );
}
$iResult = $oInputDocument->save();
$oConnection->commit();
@@ -266,16 +262,14 @@ class InputDocument extends BaseInputDocument
try {
$oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );
if (! is_null( $oInputDocument )) {
- $nameInput = $this->getInpDocTitle();
- $descInput = $this->getInpDocDescription();
+ $nameInput = $oInputDocument->getInpDocTitle();
+ $descInput = $oInputDocument->getInpDocDescription();
$oConnection->begin();
Content::removeContent( 'INP_DOC_TITLE', '', $oInputDocument->getInpDocUid() );
Content::removeContent( 'INP_DOC_DESCRIPTION', '', $oInputDocument->getInpDocUid() );
$iResult = $oInputDocument->delete();
$oConnection->commit();
//Add Audit Log
- $nameInput = $this->getInpDocTitle();
- $descInput = $this->getInpDocDescription();
G::auditLog("DeleteInputDocument", "Input Document Name: ".$nameInput.", Input Document Uid: ".$sInpDocUid.", Description: ".$descInput);
return $iResult;
@@ -289,40 +283,40 @@ class InputDocument extends BaseInputDocument
}
/**
- * Get the [inp_doc_title] column value.
+ * Get the [inp_doc_title_content] column value.
*
* @return string
*/
- public function getInpDocTitle ()
+ public function getInpDocTitleContent ()
{
- if ($this->inp_doc_title == '') {
+ if ($this->inp_doc_title_content == '') {
try {
- $this->inp_doc_title = Content::load( 'INP_DOC_TITLE', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en') );
+ $this->inp_doc_title_content = Content::load( 'INP_DOC_TITLE', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en') );
} catch (Exception $oError) {
throw ($oError);
}
}
- return $this->inp_doc_title;
+ return $this->inp_doc_title_content;
}
/**
- * Set the [inp_doc_title] column value.
+ * Set the [inp_doc_title_content] column value.
*
* @param string $sValue new value
* @return void
*/
- public function setInpDocTitle ($sValue)
+ public function setInpDocTitleContent ($sValue)
{
if ($sValue !== null && ! is_string( $sValue )) {
$sValue = (string) $sValue;
}
- if ($this->inp_doc_title !== $sValue || $sValue === '') {
+ if ($this->inp_doc_title_content !== $sValue || $sValue === '') {
try {
- $this->inp_doc_title = $sValue;
+ $this->inp_doc_title_content = $sValue;
- $iResult = Content::addContent( 'INP_DOC_TITLE', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en'), $this->inp_doc_title );
+ $iResult = Content::addContent( 'INP_DOC_TITLE', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en'), $this->inp_doc_title_content );
} catch (Exception $oError) {
- $this->inp_doc_title = '';
+ $this->inp_doc_title_content = '';
throw ($oError);
}
}
@@ -333,16 +327,16 @@ class InputDocument extends BaseInputDocument
*
* @return string
*/
- public function getInpDocDescription ()
+ public function getInpDocDescriptionContent ()
{
- if ($this->inp_doc_description == '') {
+ if ($this->inp_doc_description_content == '') {
try {
- $this->inp_doc_description = Content::load( 'INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en') );
+ $this->inp_doc_description_content = Content::load( 'INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en') );
} catch (Exception $oError) {
throw ($oError);
}
}
- return $this->inp_doc_description;
+ return $this->inp_doc_description_content;
}
/**
@@ -351,18 +345,18 @@ class InputDocument extends BaseInputDocument
* @param string $sValue new value
* @return void
*/
- public function setInpDocDescription ($sValue)
+ public function setInpDocDescriptionContent ($sValue)
{
if ($sValue !== null && ! is_string( $sValue )) {
$sValue = (string) $sValue;
}
- if ($this->inp_doc_description !== $sValue || $sValue === '') {
+ if ($this->inp_doc_description_content !== $sValue || $sValue === '') {
try {
- $this->inp_doc_description = $sValue;
+ $this->inp_doc_description_content = $sValue;
- $iResult = Content::addContent( 'INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en'), $this->inp_doc_description );
+ $iResult = Content::addContent( 'INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), (defined( 'SYS_LANG' ) ? SYS_LANG : 'en'), $this->inp_doc_description_content );
} catch (Exception $oError) {
- $this->inp_doc_description = '';
+ $this->inp_doc_description_content = '';
throw ($oError);
}
}
diff --git a/workflow/engine/classes/model/map/InputDocumentMapBuilder.php b/workflow/engine/classes/model/map/InputDocumentMapBuilder.php
index a1c7f24d0..ea06c2f99 100755
--- a/workflow/engine/classes/model/map/InputDocumentMapBuilder.php
+++ b/workflow/engine/classes/model/map/InputDocumentMapBuilder.php
@@ -69,6 +69,10 @@ class InputDocumentMapBuilder
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
+ $tMap->addColumn('INP_DOC_TITLE', 'InpDocTitle', 'string', CreoleTypes::LONGVARCHAR, true, null);
+
+ $tMap->addColumn('INP_DOC_DESCRIPTION', 'InpDocDescription', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
$tMap->addColumn('INP_DOC_FORM_NEEDED', 'InpDocFormNeeded', 'string', CreoleTypes::VARCHAR, true, 20);
$tMap->addColumn('INP_DOC_ORIGINAL', 'InpDocOriginal', 'string', CreoleTypes::VARCHAR, true, 20);
diff --git a/workflow/engine/classes/model/om/BaseInputDocument.php b/workflow/engine/classes/model/om/BaseInputDocument.php
index eeb198bd5..cca5213c6 100755
--- a/workflow/engine/classes/model/om/BaseInputDocument.php
+++ b/workflow/engine/classes/model/om/BaseInputDocument.php
@@ -39,6 +39,18 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
*/
protected $pro_uid = '0';
+ /**
+ * The value for the inp_doc_title field.
+ * @var string
+ */
+ protected $inp_doc_title;
+
+ /**
+ * The value for the inp_doc_description field.
+ * @var string
+ */
+ protected $inp_doc_description;
+
/**
* The value for the inp_doc_form_needed field.
* @var string
@@ -129,6 +141,28 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
return $this->pro_uid;
}
+ /**
+ * Get the [inp_doc_title] column value.
+ *
+ * @return string
+ */
+ public function getInpDocTitle()
+ {
+
+ return $this->inp_doc_title;
+ }
+
+ /**
+ * Get the [inp_doc_description] column value.
+ *
+ * @return string
+ */
+ public function getInpDocDescription()
+ {
+
+ return $this->inp_doc_description;
+ }
+
/**
* Get the [inp_doc_form_needed] column value.
*
@@ -272,6 +306,50 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
} // setProUid()
+ /**
+ * Set the value of [inp_doc_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setInpDocTitle($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->inp_doc_title !== $v) {
+ $this->inp_doc_title = $v;
+ $this->modifiedColumns[] = InputDocumentPeer::INP_DOC_TITLE;
+ }
+
+ } // setInpDocTitle()
+
+ /**
+ * Set the value of [inp_doc_description] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setInpDocDescription($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->inp_doc_description !== $v) {
+ $this->inp_doc_description = $v;
+ $this->modifiedColumns[] = InputDocumentPeer::INP_DOC_DESCRIPTION;
+ }
+
+ } // setInpDocDescription()
+
/**
* Set the value of [inp_doc_form_needed] column.
*
@@ -491,30 +569,34 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
$this->pro_uid = $rs->getString($startcol + 1);
- $this->inp_doc_form_needed = $rs->getString($startcol + 2);
+ $this->inp_doc_title = $rs->getString($startcol + 2);
- $this->inp_doc_original = $rs->getString($startcol + 3);
+ $this->inp_doc_description = $rs->getString($startcol + 3);
- $this->inp_doc_published = $rs->getString($startcol + 4);
+ $this->inp_doc_form_needed = $rs->getString($startcol + 4);
- $this->inp_doc_versioning = $rs->getInt($startcol + 5);
+ $this->inp_doc_original = $rs->getString($startcol + 5);
- $this->inp_doc_destination_path = $rs->getString($startcol + 6);
+ $this->inp_doc_published = $rs->getString($startcol + 6);
- $this->inp_doc_tags = $rs->getString($startcol + 7);
+ $this->inp_doc_versioning = $rs->getInt($startcol + 7);
- $this->inp_doc_type_file = $rs->getString($startcol + 8);
+ $this->inp_doc_destination_path = $rs->getString($startcol + 8);
- $this->inp_doc_max_filesize = $rs->getInt($startcol + 9);
+ $this->inp_doc_tags = $rs->getString($startcol + 9);
- $this->inp_doc_max_filesize_unit = $rs->getString($startcol + 10);
+ $this->inp_doc_type_file = $rs->getString($startcol + 10);
+
+ $this->inp_doc_max_filesize = $rs->getInt($startcol + 11);
+
+ $this->inp_doc_max_filesize_unit = $rs->getString($startcol + 12);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
- return $startcol + 11; // 11 = InputDocumentPeer::NUM_COLUMNS - InputDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 13; // 13 = InputDocumentPeer::NUM_COLUMNS - InputDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating InputDocument object", $e);
@@ -725,30 +807,36 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
return $this->getProUid();
break;
case 2:
- return $this->getInpDocFormNeeded();
+ return $this->getInpDocTitle();
break;
case 3:
- return $this->getInpDocOriginal();
+ return $this->getInpDocDescription();
break;
case 4:
- return $this->getInpDocPublished();
+ return $this->getInpDocFormNeeded();
break;
case 5:
- return $this->getInpDocVersioning();
+ return $this->getInpDocOriginal();
break;
case 6:
- return $this->getInpDocDestinationPath();
+ return $this->getInpDocPublished();
break;
case 7:
- return $this->getInpDocTags();
+ return $this->getInpDocVersioning();
break;
case 8:
- return $this->getInpDocTypeFile();
+ return $this->getInpDocDestinationPath();
break;
case 9:
- return $this->getInpDocMaxFilesize();
+ return $this->getInpDocTags();
break;
case 10:
+ return $this->getInpDocTypeFile();
+ break;
+ case 11:
+ return $this->getInpDocMaxFilesize();
+ break;
+ case 12:
return $this->getInpDocMaxFilesizeUnit();
break;
default:
@@ -773,15 +861,17 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
$result = array(
$keys[0] => $this->getInpDocUid(),
$keys[1] => $this->getProUid(),
- $keys[2] => $this->getInpDocFormNeeded(),
- $keys[3] => $this->getInpDocOriginal(),
- $keys[4] => $this->getInpDocPublished(),
- $keys[5] => $this->getInpDocVersioning(),
- $keys[6] => $this->getInpDocDestinationPath(),
- $keys[7] => $this->getInpDocTags(),
- $keys[8] => $this->getInpDocTypeFile(),
- $keys[9] => $this->getInpDocMaxFilesize(),
- $keys[10] => $this->getInpDocMaxFilesizeUnit(),
+ $keys[2] => $this->getInpDocTitle(),
+ $keys[3] => $this->getInpDocDescription(),
+ $keys[4] => $this->getInpDocFormNeeded(),
+ $keys[5] => $this->getInpDocOriginal(),
+ $keys[6] => $this->getInpDocPublished(),
+ $keys[7] => $this->getInpDocVersioning(),
+ $keys[8] => $this->getInpDocDestinationPath(),
+ $keys[9] => $this->getInpDocTags(),
+ $keys[10] => $this->getInpDocTypeFile(),
+ $keys[11] => $this->getInpDocMaxFilesize(),
+ $keys[12] => $this->getInpDocMaxFilesizeUnit(),
);
return $result;
}
@@ -820,30 +910,36 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
$this->setProUid($value);
break;
case 2:
- $this->setInpDocFormNeeded($value);
+ $this->setInpDocTitle($value);
break;
case 3:
- $this->setInpDocOriginal($value);
+ $this->setInpDocDescription($value);
break;
case 4:
- $this->setInpDocPublished($value);
+ $this->setInpDocFormNeeded($value);
break;
case 5:
- $this->setInpDocVersioning($value);
+ $this->setInpDocOriginal($value);
break;
case 6:
- $this->setInpDocDestinationPath($value);
+ $this->setInpDocPublished($value);
break;
case 7:
- $this->setInpDocTags($value);
+ $this->setInpDocVersioning($value);
break;
case 8:
- $this->setInpDocTypeFile($value);
+ $this->setInpDocDestinationPath($value);
break;
case 9:
- $this->setInpDocMaxFilesize($value);
+ $this->setInpDocTags($value);
break;
case 10:
+ $this->setInpDocTypeFile($value);
+ break;
+ case 11:
+ $this->setInpDocMaxFilesize($value);
+ break;
+ case 12:
$this->setInpDocMaxFilesizeUnit($value);
break;
} // switch()
@@ -878,39 +974,47 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
}
if (array_key_exists($keys[2], $arr)) {
- $this->setInpDocFormNeeded($arr[$keys[2]]);
+ $this->setInpDocTitle($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
- $this->setInpDocOriginal($arr[$keys[3]]);
+ $this->setInpDocDescription($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
- $this->setInpDocPublished($arr[$keys[4]]);
+ $this->setInpDocFormNeeded($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
- $this->setInpDocVersioning($arr[$keys[5]]);
+ $this->setInpDocOriginal($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
- $this->setInpDocDestinationPath($arr[$keys[6]]);
+ $this->setInpDocPublished($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
- $this->setInpDocTags($arr[$keys[7]]);
+ $this->setInpDocVersioning($arr[$keys[7]]);
}
if (array_key_exists($keys[8], $arr)) {
- $this->setInpDocTypeFile($arr[$keys[8]]);
+ $this->setInpDocDestinationPath($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
- $this->setInpDocMaxFilesize($arr[$keys[9]]);
+ $this->setInpDocTags($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
- $this->setInpDocMaxFilesizeUnit($arr[$keys[10]]);
+ $this->setInpDocTypeFile($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setInpDocMaxFilesize($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setInpDocMaxFilesizeUnit($arr[$keys[12]]);
}
}
@@ -932,6 +1036,14 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
$criteria->add(InputDocumentPeer::PRO_UID, $this->pro_uid);
}
+ if ($this->isColumnModified(InputDocumentPeer::INP_DOC_TITLE)) {
+ $criteria->add(InputDocumentPeer::INP_DOC_TITLE, $this->inp_doc_title);
+ }
+
+ if ($this->isColumnModified(InputDocumentPeer::INP_DOC_DESCRIPTION)) {
+ $criteria->add(InputDocumentPeer::INP_DOC_DESCRIPTION, $this->inp_doc_description);
+ }
+
if ($this->isColumnModified(InputDocumentPeer::INP_DOC_FORM_NEEDED)) {
$criteria->add(InputDocumentPeer::INP_DOC_FORM_NEEDED, $this->inp_doc_form_needed);
}
@@ -1024,6 +1136,10 @@ abstract class BaseInputDocument extends BaseObject implements Persistent
$copyObj->setProUid($this->pro_uid);
+ $copyObj->setInpDocTitle($this->inp_doc_title);
+
+ $copyObj->setInpDocDescription($this->inp_doc_description);
+
$copyObj->setInpDocFormNeeded($this->inp_doc_form_needed);
$copyObj->setInpDocOriginal($this->inp_doc_original);
diff --git a/workflow/engine/classes/model/om/BaseInputDocumentPeer.php b/workflow/engine/classes/model/om/BaseInputDocumentPeer.php
index 525675f1a..ef974df97 100755
--- a/workflow/engine/classes/model/om/BaseInputDocumentPeer.php
+++ b/workflow/engine/classes/model/om/BaseInputDocumentPeer.php
@@ -25,7 +25,7 @@ abstract class BaseInputDocumentPeer
const CLASS_DEFAULT = 'classes.model.InputDocument';
/** The total number of columns. */
- const NUM_COLUMNS = 11;
+ const NUM_COLUMNS = 13;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -37,6 +37,12 @@ abstract class BaseInputDocumentPeer
/** the column name for the PRO_UID field */
const PRO_UID = 'INPUT_DOCUMENT.PRO_UID';
+ /** the column name for the INP_DOC_TITLE field */
+ const INP_DOC_TITLE = 'INPUT_DOCUMENT.INP_DOC_TITLE';
+
+ /** the column name for the INP_DOC_DESCRIPTION field */
+ const INP_DOC_DESCRIPTION = 'INPUT_DOCUMENT.INP_DOC_DESCRIPTION';
+
/** the column name for the INP_DOC_FORM_NEEDED field */
const INP_DOC_FORM_NEEDED = 'INPUT_DOCUMENT.INP_DOC_FORM_NEEDED';
@@ -75,10 +81,10 @@ abstract class BaseInputDocumentPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('InpDocUid', 'ProUid', 'InpDocFormNeeded', 'InpDocOriginal', 'InpDocPublished', 'InpDocVersioning', 'InpDocDestinationPath', 'InpDocTags', 'InpDocTypeFile', 'InpDocMaxFilesize', 'InpDocMaxFilesizeUnit', ),
- BasePeer::TYPE_COLNAME => array (InputDocumentPeer::INP_DOC_UID, InputDocumentPeer::PRO_UID, InputDocumentPeer::INP_DOC_FORM_NEEDED, InputDocumentPeer::INP_DOC_ORIGINAL, InputDocumentPeer::INP_DOC_PUBLISHED, InputDocumentPeer::INP_DOC_VERSIONING, InputDocumentPeer::INP_DOC_DESTINATION_PATH, InputDocumentPeer::INP_DOC_TAGS, InputDocumentPeer::INP_DOC_TYPE_FILE, InputDocumentPeer::INP_DOC_MAX_FILESIZE, InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT, ),
- BasePeer::TYPE_FIELDNAME => array ('INP_DOC_UID', 'PRO_UID', 'INP_DOC_FORM_NEEDED', 'INP_DOC_ORIGINAL', 'INP_DOC_PUBLISHED', 'INP_DOC_VERSIONING', 'INP_DOC_DESTINATION_PATH', 'INP_DOC_TAGS', 'INP_DOC_TYPE_FILE', 'INP_DOC_MAX_FILESIZE', 'INP_DOC_MAX_FILESIZE_UNIT', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
+ BasePeer::TYPE_PHPNAME => array ('InpDocUid', 'ProUid', 'InpDocTitle', 'InpDocDescription', 'InpDocFormNeeded', 'InpDocOriginal', 'InpDocPublished', 'InpDocVersioning', 'InpDocDestinationPath', 'InpDocTags', 'InpDocTypeFile', 'InpDocMaxFilesize', 'InpDocMaxFilesizeUnit', ),
+ BasePeer::TYPE_COLNAME => array (InputDocumentPeer::INP_DOC_UID, InputDocumentPeer::PRO_UID, InputDocumentPeer::INP_DOC_TITLE, InputDocumentPeer::INP_DOC_DESCRIPTION, InputDocumentPeer::INP_DOC_FORM_NEEDED, InputDocumentPeer::INP_DOC_ORIGINAL, InputDocumentPeer::INP_DOC_PUBLISHED, InputDocumentPeer::INP_DOC_VERSIONING, InputDocumentPeer::INP_DOC_DESTINATION_PATH, InputDocumentPeer::INP_DOC_TAGS, InputDocumentPeer::INP_DOC_TYPE_FILE, InputDocumentPeer::INP_DOC_MAX_FILESIZE, InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT, ),
+ BasePeer::TYPE_FIELDNAME => array ('INP_DOC_UID', 'PRO_UID', 'INP_DOC_TITLE', 'INP_DOC_DESCRIPTION', 'INP_DOC_FORM_NEEDED', 'INP_DOC_ORIGINAL', 'INP_DOC_PUBLISHED', 'INP_DOC_VERSIONING', 'INP_DOC_DESTINATION_PATH', 'INP_DOC_TAGS', 'INP_DOC_TYPE_FILE', 'INP_DOC_MAX_FILESIZE', 'INP_DOC_MAX_FILESIZE_UNIT', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
);
/**
@@ -88,10 +94,10 @@ abstract class BaseInputDocumentPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('InpDocUid' => 0, 'ProUid' => 1, 'InpDocFormNeeded' => 2, 'InpDocOriginal' => 3, 'InpDocPublished' => 4, 'InpDocVersioning' => 5, 'InpDocDestinationPath' => 6, 'InpDocTags' => 7, 'InpDocTypeFile' => 8, 'InpDocMaxFilesize' => 9, 'InpDocMaxFilesizeUnit' => 10, ),
- BasePeer::TYPE_COLNAME => array (InputDocumentPeer::INP_DOC_UID => 0, InputDocumentPeer::PRO_UID => 1, InputDocumentPeer::INP_DOC_FORM_NEEDED => 2, InputDocumentPeer::INP_DOC_ORIGINAL => 3, InputDocumentPeer::INP_DOC_PUBLISHED => 4, InputDocumentPeer::INP_DOC_VERSIONING => 5, InputDocumentPeer::INP_DOC_DESTINATION_PATH => 6, InputDocumentPeer::INP_DOC_TAGS => 7, InputDocumentPeer::INP_DOC_TYPE_FILE => 8, InputDocumentPeer::INP_DOC_MAX_FILESIZE => 9, InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT => 10, ),
- BasePeer::TYPE_FIELDNAME => array ('INP_DOC_UID' => 0, 'PRO_UID' => 1, 'INP_DOC_FORM_NEEDED' => 2, 'INP_DOC_ORIGINAL' => 3, 'INP_DOC_PUBLISHED' => 4, 'INP_DOC_VERSIONING' => 5, 'INP_DOC_DESTINATION_PATH' => 6, 'INP_DOC_TAGS' => 7, 'INP_DOC_TYPE_FILE' => 8, 'INP_DOC_MAX_FILESIZE' => 9, 'INP_DOC_MAX_FILESIZE_UNIT' => 10, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
+ BasePeer::TYPE_PHPNAME => array ('InpDocUid' => 0, 'ProUid' => 1, 'InpDocTitle' => 2, 'InpDocDescription' => 3, 'InpDocFormNeeded' => 4, 'InpDocOriginal' => 5, 'InpDocPublished' => 6, 'InpDocVersioning' => 7, 'InpDocDestinationPath' => 8, 'InpDocTags' => 9, 'InpDocTypeFile' => 10, 'InpDocMaxFilesize' => 11, 'InpDocMaxFilesizeUnit' => 12, ),
+ BasePeer::TYPE_COLNAME => array (InputDocumentPeer::INP_DOC_UID => 0, InputDocumentPeer::PRO_UID => 1, InputDocumentPeer::INP_DOC_TITLE => 2, InputDocumentPeer::INP_DOC_DESCRIPTION => 3, InputDocumentPeer::INP_DOC_FORM_NEEDED => 4, InputDocumentPeer::INP_DOC_ORIGINAL => 5, InputDocumentPeer::INP_DOC_PUBLISHED => 6, InputDocumentPeer::INP_DOC_VERSIONING => 7, InputDocumentPeer::INP_DOC_DESTINATION_PATH => 8, InputDocumentPeer::INP_DOC_TAGS => 9, InputDocumentPeer::INP_DOC_TYPE_FILE => 10, InputDocumentPeer::INP_DOC_MAX_FILESIZE => 11, InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT => 12, ),
+ BasePeer::TYPE_FIELDNAME => array ('INP_DOC_UID' => 0, 'PRO_UID' => 1, 'INP_DOC_TITLE' => 2, 'INP_DOC_DESCRIPTION' => 3, 'INP_DOC_FORM_NEEDED' => 4, 'INP_DOC_ORIGINAL' => 5, 'INP_DOC_PUBLISHED' => 6, 'INP_DOC_VERSIONING' => 7, 'INP_DOC_DESTINATION_PATH' => 8, 'INP_DOC_TAGS' => 9, 'INP_DOC_TYPE_FILE' => 10, 'INP_DOC_MAX_FILESIZE' => 11, 'INP_DOC_MAX_FILESIZE_UNIT' => 12, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
);
/**
@@ -196,6 +202,10 @@ abstract class BaseInputDocumentPeer
$criteria->addSelectColumn(InputDocumentPeer::PRO_UID);
+ $criteria->addSelectColumn(InputDocumentPeer::INP_DOC_TITLE);
+
+ $criteria->addSelectColumn(InputDocumentPeer::INP_DOC_DESCRIPTION);
+
$criteria->addSelectColumn(InputDocumentPeer::INP_DOC_FORM_NEEDED);
$criteria->addSelectColumn(InputDocumentPeer::INP_DOC_ORIGINAL);
diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml
index 07724680b..446dd72b4 100755
--- a/workflow/engine/config/schema.xml
+++ b/workflow/engine/config/schema.xml
@@ -621,6 +621,8 @@
+
+
diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql
index 30681a5c0..7b446b9cd 100755
--- a/workflow/engine/data/mysql/schema.sql
+++ b/workflow/engine/data/mysql/schema.sql
@@ -288,6 +288,8 @@ CREATE TABLE `INPUT_DOCUMENT`
(
`INP_DOC_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '0' NOT NULL,
+ `INP_DOC_TITLE` MEDIUMTEXT NOT NULL,
+ `INP_DOC_DESCRIPTION` MEDIUMTEXT,
`INP_DOC_FORM_NEEDED` VARCHAR(20) default 'REAL' NOT NULL,
`INP_DOC_ORIGINAL` VARCHAR(20) default 'COPY' NOT NULL,
`INP_DOC_PUBLISHED` VARCHAR(20) default 'PRIVATE' NOT NULL,
diff --git a/workflow/engine/methods/inputdocs/inputdocs_Save.php b/workflow/engine/methods/inputdocs/inputdocs_Save.php
index 8bda6c71c..d2b3d1c79 100755
--- a/workflow/engine/methods/inputdocs/inputdocs_Save.php
+++ b/workflow/engine/methods/inputdocs/inputdocs_Save.php
@@ -54,26 +54,14 @@ try {
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( InputDocumentPeer::INP_DOC_UID );
$oCriteria->add( InputDocumentPeer::PRO_UID, $sPRO_UID );
+ $oCriteria->add( InputDocumentPeer::INP_DOC_TITLE, $snameInput );
$oDataset = InputDocumentPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$flag = true;
- while ($oDataset->next() && $flag) {
- $aRow = $oDataset->getRow();
-
- $oCriteria1 = new Criteria( 'workflow' );
- $oCriteria1->addSelectColumn( 'COUNT(*) AS INPUTS' );
- $oCriteria1->add( ContentPeer::CON_CATEGORY, 'INP_DOC_TITLE' );
- $oCriteria1->add( ContentPeer::CON_ID, $aRow['INP_DOC_UID'] );
- $oCriteria1->add( ContentPeer::CON_VALUE, $snameInput );
- $oCriteria1->add( ContentPeer::CON_LANG, SYS_LANG );
- $oDataset1 = ContentPeer::doSelectRS( $oCriteria1 );
- $oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
- $oDataset1->next();
- $aRow1 = $oDataset1->getRow();
-
- if ($aRow1['INPUTS']) {
- $flag = false;
- }
+ $oDataset->next();
+ $aRow = $oDataset->getRow();
+ if ($aRow) {
+ $flag = false;
}
print $flag;
break;
@@ -88,16 +76,16 @@ try {
$aData = $_POST;
}
- //Validating the format of the allowed extentions
+ //Validating the format of the allowed extentions
//Allowed Types has to have this format -> *.pdf, .xls, *.docx, *.* or .* to all.
- $allowedTypes = explode(", ", $aData['INP_DOC_TYPE_FILE']);
- foreach ($allowedTypes as $types => $val) {
+ $allowedTypes = explode(", ", $aData['INP_DOC_TYPE_FILE']);
+ foreach ($allowedTypes as $types => $val) {
if ((preg_match("/^.*\.?[a-zA-Z0-9]{2,15}$/", $val)) || ($val == "*.*") || ($val == ".*")) {
- }else {
- $message = G::LoadTranslation( 'ID_UPLOAD_ERR_WRONG_ALLOWED_EXTENSION_FORMAT' );
- G::SendMessageText( $message, "ERROR" );
- die();
- }
+ }else {
+ $message = G::LoadTranslation( 'ID_UPLOAD_ERR_WRONG_ALLOWED_EXTENSION_FORMAT' );
+ G::SendMessageText( $message, "ERROR" );
+ die();
+ }
}
if ($aData['INP_DOC_UID'] == '') {
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/CaseTracker.php b/workflow/engine/src/ProcessMaker/BusinessModel/CaseTracker.php
index 6c6b9ab6e..04dfe49e5 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/CaseTracker.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/CaseTracker.php
@@ -200,24 +200,8 @@ class CaseTracker
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
- $criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
- $criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
-
- $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
- $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_DESCRIPTION);
$criteria->add(\InputDocumentPeer::PRO_UID, $processUid, \Criteria::EQUAL);
$criteria->add(\InputDocumentPeer::INP_DOC_UID, $arrayInputDocumentUid, \Criteria::NOT_IN);
@@ -229,7 +213,9 @@ class CaseTracker
if ($row["INP_DOC_TITLE"] . "" == "") {
//There is no transaltion for this Document name, try to get/regenerate the label
- $row["INP_DOC_TITLE"] = \Content::Load("INP_DOC_TITLE", "", $row["INP_DOC_UID"], SYS_LANG);
+ $inputDocument = new \InputDocument();
+ $inputDocumentObj = $inputDocument->load($row['INP_DOC_UID']);
+ $row["INP_DOC_TITLE"] = $inputDocumentObj['INP_DOC_TITLE'];
}
$arrayCaseTrackerObject[] = array(
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/InputDocument.php b/workflow/engine/src/ProcessMaker/BusinessModel/InputDocument.php
index 10060aa48..5afe47af8 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/InputDocument.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/InputDocument.php
@@ -110,22 +110,14 @@ class InputDocument
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
-
- $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$criteria->add(\InputDocumentPeer::PRO_UID, $processUid, \Criteria::EQUAL);
if ($inputDocumentUidExclude != "") {
$criteria->add(\InputDocumentPeer::INP_DOC_UID, $inputDocumentUidExclude, \Criteria::NOT_EQUAL);
}
- $criteria->add("CT.CON_VALUE", $inputDocumentTitle, \Criteria::EQUAL);
+ $criteria->add(\InputDocumentPeer::INP_DOC_TITLE, $inputDocumentTitle, \Criteria::EQUAL);
$rsCriteria = \InputDocumentPeer::doSelectRS($criteria);
@@ -461,13 +453,11 @@ class InputDocument
public function getInputDocumentCriteria()
{
try {
- $delimiter = \DBAdapter::getStringDelimiter();
-
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
- $criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
- $criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_DESCRIPTION);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_FORM_NEEDED);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_ORIGINAL);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_PUBLISHED);
@@ -477,22 +467,6 @@ class InputDocument
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TYPE_FILE);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT);
-
- $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
- $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
return $criteria;
} catch (\Exception $e) {
throw $e;
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Process.php b/workflow/engine/src/ProcessMaker/BusinessModel/Process.php
index 322b23b83..c8f2ea000 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Process.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Process.php
@@ -1456,7 +1456,7 @@ class Process
$criteria = $inputDocument->getInputDocumentCriteria();
$criteria->add(\InputDocumentPeer::PRO_UID, $processUid, \Criteria::EQUAL);
- $criteria->addAscendingOrderByColumn("INP_DOC_TITLE");
+ $criteria->addAscendingOrderByColumn(\InputDocumentPeer::INP_DOC_TITLE);
$rsCriteria = \InputDocumentPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php
index 5f99b63f1..d99187554 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/ProcessSupervisor.php
@@ -643,13 +643,7 @@ class ProcessSupervisor
$oCriteria = new \Criteria('workflow');
$oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
$oCriteria->addSelectColumn(\InputDocumentPeer::PRO_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(\InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\InputDocumentPeer::INP_DOC_UID, $aUIDS, \Criteria::NOT_IN);
$oDataset = \StepSupervisorPeer::doSelectRS($oCriteria);
@@ -722,17 +716,11 @@ class ProcessSupervisor
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_TYPE_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_UID_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_POSITION);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(\StepSupervisorPeer::STEP_UID_OBJ, \InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(\StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
$oCriteria->add(\StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
$oCriteria->addAscendingOrderByColumn(\StepSupervisorPeer::STEP_POSITION);
@@ -823,17 +811,11 @@ class ProcessSupervisor
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_TYPE_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_UID_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_POSITION);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(\StepSupervisorPeer::STEP_UID_OBJ, \InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(\StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
$oCriteria->add(\StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
$oCriteria->addAscendingOrderByColumn(\StepSupervisorPeer::STEP_POSITION);
@@ -878,17 +860,11 @@ class ProcessSupervisor
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_TYPE_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_UID_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_POSITION);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(\StepSupervisorPeer::STEP_UID_OBJ, \InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(\StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
$oCriteria->add(\StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\StepSupervisorPeer::STEP_UID, $sPuiUID);
$oCriteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
@@ -926,17 +902,10 @@ class ProcessSupervisor
foreach ($oCriteria as $oCriteria => $value) {
$aUIDS[] = $value["input_doc_uid"];
}
- $sDelimiter = \DBAdapter::getStringDelimiter();
$oCriteria = new \Criteria('workflow');
$oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
$oCriteria->addSelectColumn(\InputDocumentPeer::PRO_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$oCriteria->add(\InputDocumentPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\InputDocumentPeer::INP_DOC_UID, $aUIDS, \Criteria::NOT_IN);
$oDataset = \StepSupervisorPeer::doSelectRS($oCriteria);
@@ -1138,17 +1107,11 @@ class ProcessSupervisor
$sDelimiter = \DBAdapter::getStringDelimiter();
$oCriteria = new \Criteria('workflow');
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_UID);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(\StepSupervisorPeer::STEP_UID_OBJ, \InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(\StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
$oCriteria->add(\StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\StepSupervisorPeer::STEP_UID_OBJ, $sInputDocumentUID);
$oCriteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
@@ -1173,17 +1136,11 @@ class ProcessSupervisor
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_TYPE_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_UID_OBJ);
$oCriteria->addSelectColumn(\StepSupervisorPeer::STEP_POSITION);
- $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
- $oCriteria->addAlias('C', 'CONTENT');
+ $oCriteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
$aConditions = array();
$aConditions[] = array(\StepSupervisorPeer::STEP_UID_OBJ, \InputDocumentPeer::INP_DOC_UID);
$aConditions[] = array(\StepSupervisorPeer::STEP_TYPE_OBJ, $sDelimiter . 'INPUT_DOCUMENT' . $sDelimiter);
$oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
- $aConditions = array();
- $aConditions[] = array(\InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
- $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
- $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
- $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
$oCriteria->add(\StepSupervisorPeer::PRO_UID, $sProcessUID);
$oCriteria->add(\StepSupervisorPeer::STEP_UID_OBJ, $sInputDocumentUID);
$oCriteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, 'INPUT_DOCUMENT');
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php
index 1e8fbb876..bcf2cb74a 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php
@@ -574,24 +574,8 @@ class Task
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
- $criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
- $criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
-
- $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
- $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
- $arrayCondition = array();
- $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
- $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
- $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
- $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
-
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TITLE);
+ $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_DESCRIPTION);
$criteria->add(\InputDocumentPeer::PRO_UID, $processUid, \Criteria::EQUAL);
$criteria->add(\InputDocumentPeer::INP_DOC_UID, $arrayUid, \Criteria::NOT_IN);
@@ -603,7 +587,9 @@ class Task
if ($row["INP_DOC_TITLE"] . "" == "") {
//There is no transaltion for this Document name, try to get/regenerate the label
- $row["INP_DOC_TITLE"] = \Content::Load("INP_DOC_TITLE", "", $row["INP_DOC_UID"], SYS_LANG);
+ $oInputDocument = new \InputDocument;
+ $aRow = $oInputDocument->load($row['INP_DOC_UID']);
+ $row['INP_DOC_TITLE'] = $aRow['INP_DOC_TITLE'];
}
$arraydbStep[] = array(