Merge remote-tracking branch 'upstream/3.1' into HOR-1087

Conflicts:
	workflow/engine/classes/class.derivation.php
This commit is contained in:
Dheeyi William
2016-06-08 12:19:39 -04:00
13 changed files with 75 additions and 25 deletions

View File

@@ -1344,14 +1344,15 @@ class Derivation
$flag = false;
//check if there is any paused thread
$existThareadPause = false;
$existThreadPaused = false;
if (isset($arraySiblings['pause'])) {
if (!empty($arraySiblings['pause'])) {
$existThareadPause = true;
$existThreadPaused = true;
}
}
if ($openThreads == 0 && !$existThareadPause) {
if ($openThreads == 0 && !$existThreadPaused) {
//Close case
$appFields["APP_STATUS"] = "COMPLETED";
$appFields["APP_FINISH_DATE"] = "now";

View File

@@ -57,6 +57,7 @@ class System
'wsdl_cache' => 1,
'memory_limit' => "256M",
'time_zone' => 'America/New_York',
'expiration_year' => '1',
'memcached' => 0,
'memcached_server' => '',
'default_skin' => 'neoclassic',

View File

@@ -64,6 +64,10 @@ class adminProxy extends HttpProxyController
$updatedConf['time_zone'] = $httpData->time_zone;
}
if ($sysConf['expiration_year'] != $httpData->expiration_year) {
$updatedConf['expiration_year'] = $httpData->expiration_year;
}
$httpData->memory_limit .= 'M';
if ($sysConf['memory_limit'] != $httpData->memory_limit) {
$updatedConf['memory_limit'] = $httpData->memory_limit;

View File

@@ -13,6 +13,16 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize) {
$uploadMaxSize = $postMaxSize;
}
//Add year by expiration date
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = $sysConf['expiration_year'];
}
}
$languageManagement = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
@@ -31,6 +41,7 @@ $oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
G::RenderPage( 'publish', 'extJs' );

View File

@@ -28,6 +28,16 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize) {
$uploadMaxSize = $postMaxSize;
}
//Add year by expiration date
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = $sysConf['expiration_year'];
}
}
$languageManagement = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
@@ -51,6 +61,7 @@ $oHeadPublisher->assign( 'MODE', '' );
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
G::RenderPage( 'publish', 'extJs' );

View File

@@ -16,6 +16,15 @@ $uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize) {
$uploadMaxSize = $postMaxSize;
}
//Add year by expiration date
$expirationDate = 1;
$envFile = PATH_CONFIG . 'env.ini';
if (file_exists($envFile) ) {
$sysConf = System::getSystemConfiguration($envFile);
if(isset($sysConf['expiration_year']) && $sysConf['expiration_year']>0){
$expirationDate = $sysConf['expiration_year'];
}
}
$languageManagement = 0;
@@ -36,6 +45,7 @@ $oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
$oHeadPublisher->assign('SYSTEM_TIME_ZONE', $arraySystemConfiguration['time_zone']);
$oHeadPublisher->assign('TIME_ZONE_DATA', array_map(function ($value) { return [$value, $value]; }, DateTimeZone::listIdentifiers()));
$oHeadPublisher->assign('__SYSTEM_UTC_TIME_ZONE__', (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__'])? 1 : 0);
$oHeadPublisher->assign('EXPIRATION_DATE', (int)$expirationDate);
$oHeadPublisher->assign('LANGUAGE_MANAGEMENT', $languageManagement);
G::RenderPage( 'publish', 'extJs' );

View File

@@ -7,6 +7,7 @@ use Criteria;
use UsersPeer;
use AppDelegationPeer;
use AppDelayPeer;
use ProcessMaker\Util\DateTime;
class Light
{
@@ -89,7 +90,7 @@ class Light
$dynaForm = \DynaformPeer::retrieveByPK($form['step_uid_obj']);
$newForm[$c]['formId'] = $form['step_uid_obj'];
$newForm[$c]['formUpdateDate'] = $dynaForm->getDynUpdateDate();
$newForm[$c]['formUpdateDate'] = DateTime::convertUtcToIso8601($dynaForm->getDynUpdateDate());
$newForm[$c]['index'] = $c+1;
$newForm[$c]['title'] = $form['obj_title'];
$newForm[$c]['description'] = $form['obj_description'];

View File

@@ -109,24 +109,7 @@ class Light extends Api
{
try {
$oMobile = new \ProcessMaker\BusinessModel\Light();
$processListStartCase = $oMobile->getProcessListStartCase($this->getUserId());
$processListStartCaseFrm = $processListStartCase[0]['forms'];
foreach ($processListStartCaseFrm as $key => $value) {
$valueAux = $value;
if (array_key_exists('formUpdateDate', $valueAux)) {
$valueAux['formUpdateDate'] = \ProcessMaker\Util\DateTime::convertUtcToIso8601($valueAux['formUpdateDate']);
}
$value = array_replace($value, $valueAux);
$processListStartCaseFrm[$key] = $value;
}
$processListStartCase[0]['forms'] = $processListStartCaseFrm;
$startCase = $processListStartCase;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));

View File

@@ -36,14 +36,14 @@ class Common extends \Maveriks\Util\Common
return;
}
$numc = 100;
$numc = 50;
switch ($option) {
case "BAR":
echo "\r" . "| " . $data . str_repeat(" ", $numc - 2 - strlen($data));
break;
case "TEXT":
echo "\r" . "| " . $data . str_repeat(" ", $numc - 2 - strlen($data)) . "\n";
echo "\r" . '| ' . $data . "\n";
break;
default:
//START, END

View File

@@ -30,6 +30,8 @@ class ElementTranslation
'OUT_DOC_TITLE' => ['table'=>'OUTPUT_DOCUMENT', 'uid'=>'OUT_DOC_UID', 'ownedByProcess'=>true, 'className'=>'OutputDocument'],
'PER_NAME' => ['table'=>'RBAC_PERMISSIONS', 'uid'=>'PER_UID', 'ownedByProcess'=>false, 'className'=>'Permissions'],
'ROL_NAME' => ['table'=>'RBAC_ROLES', 'uid'=>'ROL_UID', 'ownedByProcess'=>false, 'className'=>'Roles'],
'TRI_TITLE' => ['table' => 'TRIGGERS', 'uid' => 'TRI_UID', 'ownedByProcess' => true, 'className' => 'Triggers'],
'TRI_DESCRIPTION' => ['table' => 'TRIGGERS', 'uid' => 'TRI_UID', 'ownedByProcess' => true, 'className' => 'Triggers'],
];
protected function getClassNameFrom($category)

View File

@@ -85,6 +85,31 @@ Ext.onReady(function(){
cmbTimeZone.setValue(sysConf.time_zone);
txtExpirationYear = new Ext.form.TextField({
xtype: 'numberfield',
id : 'expiration_year',
name : 'expiration_year',
fieldLabel: _('ID_DEFAULT_EXPIRATION_YEAR'),
allowBlank: false,
allowNegative: false,
value: 1,
maxlength: 15,
minValue: 1,
validator: function(value){
if(value > 0) {
return true;
} else {
PMExt.error( _('ID_ERROR'), _('ERROR_ONLY_POSITIVE_NUMBER'));
}
},
listeners:{
change: function(){
changeSettings();
}
}
});
txtExpirationYear.setValue(sysConf.expiration_year);
saveButton = new Ext.Action({
text : _('ID_SAVE_SETTINGS'),
disabled : true,
@@ -122,6 +147,7 @@ Ext.onReady(function(){
}
}
}
,txtExpirationYear
]
});

View File

@@ -260,7 +260,7 @@ cron.application = {
});
var renderStatus = function(val) {
if (val == 'action') {
if (/^(action|timereventcron)$/i.test(val)) {
return _('ID_COMPLETED');
} else {
return _('ID_FAILED');

View File

@@ -320,7 +320,7 @@ Ext.onReady(function () {
editable : false,
readOnly : readMode,
width : 120,
value : (new Date().add(Date.YEAR, 1)).format("Y-m-d")
value : (new Date().add(Date.YEAR, EXPIRATION_DATE)).format("Y-m-d")
});
storeCalendar = new Ext.data.Store({