Merged in gproly/processmaker/HOR-196A (pull request #3759)

HOR-196A
This commit is contained in:
Julio Cesar Laura Avendaño
2016-03-01 19:07:31 -04:00

View File

@@ -2916,9 +2916,10 @@ function PMFSaveCurrentData ()
* @name PMFTasksListByProcessId * @name PMFTasksListByProcessId
* @label PMF Tasks List By Process Id * @label PMF Tasks List By Process Id
* @param string | $processId | ID Process | To get the current process id, use the system variable @@PROCESS * @param string | $processId | ID Process | To get the current process id, use the system variable @@PROCESS
* @param string | $lang | Language | Is the language of the text, that must be the same to the column: "CON_LANG" of the CONTENT table
* @return array | $result | Array result | Array of associative arrays which contain the unique task ID and title * @return array | $result | Array result | Array of associative arrays which contain the unique task ID and title
*/ */
function PMFTasksListByProcessId($processId) function PMFTasksListByProcessId($processId, $lang = 'en')
{ {
$result = array(); $result = array();
$criteria = new Criteria("workflow"); $criteria = new Criteria("workflow");
@@ -2927,6 +2928,7 @@ function PMFTasksListByProcessId($processId)
$criteria->addSelectColumn(ContentPeer::CON_LANG); $criteria->addSelectColumn(ContentPeer::CON_LANG);
$criteria->addJoin(TaskPeer::TAS_UID, ContentPeer::CON_ID, Criteria::INNER_JOIN); $criteria->addJoin(TaskPeer::TAS_UID, ContentPeer::CON_ID, Criteria::INNER_JOIN);
$criteria->add(ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL); $criteria->add(ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL);
$criteria->add(ContentPeer::CON_LANG, $lang, Criteria::EQUAL);
$criteria->add(TaskPeer::PRO_UID, $processId, Criteria::EQUAL); $criteria->add(TaskPeer::PRO_UID, $processId, Criteria::EQUAL);
$ds = TaskPeer::doSelectRS($criteria); $ds = TaskPeer::doSelectRS($criteria);
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC); $ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);