Merge branch 'master' into michelangelo
This commit is contained in:
@@ -5289,25 +5289,45 @@ class Cases
|
||||
$delIndex = array();
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
if ($USER_RELATION == 1) {
|
||||
//Users
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
|
||||
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
|
||||
if ($aCase['APP_STATUS'] != 'COMPLETED') {
|
||||
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
}
|
||||
}
|
||||
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
|
||||
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
|
||||
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
|
||||
if ($aCase['APP_STATUS'] != 'COMPLETED') {
|
||||
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$delIndex[] = $aRow['DEL_INDEX'];
|
||||
$oDataset->next();
|
||||
}
|
||||
} else {
|
||||
//Groups
|
||||
$oCriteria->addJoin(GroupUserPeer::USR_UID, AppDelegationPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(GroupUserPeer::GRP_UID, $USER);
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
|
||||
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
|
||||
if ($aCase['APP_STATUS'] != 'COMPLETED') {
|
||||
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
}
|
||||
}
|
||||
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$delIndex[] = $aRow['DEL_INDEX'];
|
||||
$oDataset->next();
|
||||
}
|
||||
}
|
||||
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
|
||||
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$delIndex[] = $aRow['DEL_INDEX'];
|
||||
$oDataset->next();
|
||||
}
|
||||
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
|
||||
|
||||
break;
|
||||
case 'DYNAFORM':
|
||||
$oCriteria = new Criteria('workflow');
|
||||
@@ -5415,25 +5435,41 @@ class Cases
|
||||
$delIndex = array();
|
||||
if ($TASK_SOURCE != "" && (int)$TASK_SOURCE != 0) {
|
||||
$oCriteria = new Criteria('workflow');
|
||||
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
|
||||
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
|
||||
if ($aCase['APP_STATUS'] != 'COMPLETED') {
|
||||
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
if ($USER_RELATION == 1) {
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
|
||||
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
|
||||
if ($aCase['APP_STATUS'] != 'COMPLETED') {
|
||||
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
}
|
||||
}
|
||||
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$delIndex[] = $aRow['DEL_INDEX'];
|
||||
$oDataset->next();
|
||||
}
|
||||
} else {
|
||||
//Groups
|
||||
$oCriteria->addJoin(GroupUserPeer::USR_UID, AppDelegationPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(GroupUserPeer::GRP_UID, $USER);
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $APP_UID);
|
||||
$oCriteria->add(AppDelegationPeer::PRO_UID, $PRO_UID);
|
||||
if ($aCase['APP_STATUS'] != 'COMPLETED') {
|
||||
if ($TASK_SOURCE != '' && $TASK_SOURCE != "0" && $TASK_SOURCE != 0) {
|
||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $TASK_SOURCE);
|
||||
}
|
||||
}
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$delIndex[] = $aRow['DEL_INDEX'];
|
||||
$oDataset->next();
|
||||
}
|
||||
}
|
||||
$oCriteria->add(AppDelegationPeer::USR_UID, $USER);
|
||||
|
||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$delIndex[] = $aRow['DEL_INDEX'];
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
$RESULT['MSGS_HISTORY'] = array_merge(array('DEL_INDEX' => $delIndex), $RESULT['MSGS_HISTORY']);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -950,8 +950,8 @@ class processMap
|
||||
$aRow['DYN_TITLE'] = Content::Load("DYN_TITLE", "", $aRow['DYN_UID'], SYS_LANG);
|
||||
}
|
||||
$aBB[] = array('STEP_UID' => $aRow['DYN_UID'], 'STEP_TITLE' => $aRow['DYN_TITLE'], 'STEP_TYPE_OBJ' => 'DYNAFORM', 'STEP_MODE' => '<select id="STEP_MODE_' . $aRow['DYN_UID'] . '">
|
||||
<option value="EDIT">Edit</option>
|
||||
<option value="VIEW">View</option>
|
||||
<option value="EDIT">' . G::LoadTranslation('ID_EDIT') . '</option>
|
||||
<option value="VIEW">' . G::LoadTranslation('ID_VIEW') . '</option>
|
||||
</select>'
|
||||
);
|
||||
$oDataset->next();
|
||||
@@ -4549,7 +4549,7 @@ class processMap
|
||||
{
|
||||
try {
|
||||
$oTask = new Task();
|
||||
$oNewTask->label = 'Sub-Process'; //G::LoadTranslation('ID_TASK');
|
||||
$oNewTask->label = G::LoadTranslation('ID_SUBPROCESS');
|
||||
$oNewTask->uid = $oTask->create(array('PRO_UID' => $sProcessUID, 'TAS_TITLE' => $oNewTask->label, 'TAS_POSX' => $iX, 'TAS_POSY' => $iY, 'TAS_TYPE' => 'SUBPROCESS' ));
|
||||
//$oJSON = new Services_JSON();
|
||||
|
||||
|
||||
@@ -1244,11 +1244,11 @@ class AppCacheView extends BaseAppCacheView
|
||||
$sql = "SHOW TABLES";
|
||||
$rs1 = $stmt->executeQuery($sql, ResultSet::FETCHMODE_NUM);
|
||||
$rs1->next();
|
||||
$found = G::LoadTranslation('ID_FALSE');//false;
|
||||
$found = false;
|
||||
|
||||
while (is_array($row = $rs1->getRow()) && !$found) {
|
||||
if (strtolower($row[0]) == 'app_cache_view') {
|
||||
$found = G::LoadTranslation('ID_TRUE');//true;
|
||||
$found = true;
|
||||
}
|
||||
|
||||
$rs1->next();
|
||||
@@ -1261,7 +1261,7 @@ class AppCacheView extends BaseAppCacheView
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$count = AppCacheViewPeer::doCount($oCriteria);
|
||||
}
|
||||
|
||||
$found = $found ? G::LoadTranslation('ID_TRUE') : G::LoadTranslation('ID_FALSE');
|
||||
return array('found' => $found, 'count' => $count);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,10 +106,10 @@ class CalendarDefinition extends BaseCalendarDefinition
|
||||
$tr = CalendarDefinitionPeer::retrieveByPK( $CalendarUid );
|
||||
|
||||
$defaultCalendar['CALENDAR_UID'] = "00000000000000000000000000000001";
|
||||
$defaultCalendar['CALENDAR_NAME'] = "Default";
|
||||
$defaultCalendar['CALENDAR_NAME'] = G::LoadTranslation('ID_DEFAULT_CALENDAR');
|
||||
$defaultCalendar['CALENDAR_CREATE_DATE'] = date( "Y-m-d" );
|
||||
$defaultCalendar['CALENDAR_UPDATE_DATE'] = date( "Y-m-d" );
|
||||
$defaultCalendar['CALENDAR_DESCRIPTION'] = "Default";
|
||||
$defaultCalendar['CALENDAR_DESCRIPTION'] = G::LoadTranslation('ID_DEFAULT_CALENDAR');
|
||||
$defaultCalendar['CALENDAR_STATUS'] = "ACTIVE";
|
||||
$defaultCalendar['CALENDAR_WORK_DAYS'] = "1|2|3|4|5";
|
||||
$defaultCalendar['CALENDAR_WORK_DAYS'] = explode( "|", "1|2|3|4|5" );
|
||||
@@ -151,10 +151,10 @@ class CalendarDefinition extends BaseCalendarDefinition
|
||||
//if exists the row in the database propel will update it, otherwise will insert.
|
||||
$tr = CalendarDefinitionPeer::retrieveByPK( $CalendarUid );
|
||||
$defaultCalendar['CALENDAR_UID'] = "00000000000000000000000000000001";
|
||||
$defaultCalendar['CALENDAR_NAME'] = "Default";
|
||||
$defaultCalendar['CALENDAR_NAME'] = G::LoadTranslation('ID_DEFAULT_CALENDAR');
|
||||
$defaultCalendar['CALENDAR_CREATE_DATE'] = date( "Y-m-d" );
|
||||
$defaultCalendar['CALENDAR_UPDATE_DATE'] = date( "Y-m-d" );
|
||||
$defaultCalendar['CALENDAR_DESCRIPTION'] = "Default";
|
||||
$defaultCalendar['CALENDAR_DESCRIPTION'] = G::LoadTranslation('ID_DEFAULT_CALENDAR');
|
||||
$defaultCalendar['CALENDAR_STATUS'] = "ACTIVE";
|
||||
$defaultCalendar['CALENDAR_WORK_DAYS'] = "1|2|3|4|5";
|
||||
$defaultCalendar['CALENDAR_WORK_DAYS'] = explode( "|", "1|2|3|4|5" );
|
||||
@@ -244,7 +244,7 @@ class CalendarDefinition extends BaseCalendarDefinition
|
||||
$defaultCalendars[] = '00000000000000000000000000000001';
|
||||
if (in_array( $aData['CALENDAR_UID'], $defaultCalendars )) {
|
||||
$CalendarStatus = 'ACTIVE';
|
||||
$CalendarName = 'Default';
|
||||
$CalendarName = G::LoadTranslation('ID_DEFAULT_CALENDAR');
|
||||
}
|
||||
$CalendarWorkDays = isset( $aData['CALENDAR_WORK_DAYS'] ) ? implode( "|", $aData['CALENDAR_WORK_DAYS'] ) : "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user