diff --git a/workflow/engine/controllers/admin.php b/workflow/engine/controllers/admin.php index a43cc3f54..dc556b438 100644 --- a/workflow/engine/controllers/admin.php +++ b/workflow/engine/controllers/admin.php @@ -44,6 +44,11 @@ class Admin extends Controller // $c = new Configurations(); // $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']); // $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; + if (isset($sysConf["session.gc_maxlifetime"])) { + $sysConf["session_gc_maxlifetime"] = $sysConf["session.gc_maxlifetime"]; + } else { + $sysConf["session_gc_maxlifetime"] = ini_get('session.gc_maxlifetime'); + } $this->setJSVar( 'skinsList', $skins ); $this->setJSVar( 'languagesList', $languagesList ); @@ -90,7 +95,8 @@ class Admin extends Controller $fields = $calendarObj->getCalendarInfoE( $CalendarUid ); $fields['OLD_NAME'] = $fields['CALENDAR_NAME']; } - if (! isset( $fields['CALENDAR_UID'] )) { //For a new Calendar + // For a new Calendar + if (! isset( $fields['CALENDAR_UID'] )) { $fields['CALENDAR_UID'] = $CalendarUid; $fields['OLD_NAME'] = ''; @@ -99,7 +105,8 @@ class Admin extends Controller $fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00"; $fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00"; } - if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { // Copy Calendar + // Copy Calendar + if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { $fields['CALENDAR_UID'] = G::GenerateUniqueID(); $fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME']; $fields['OLD_NAME'] = $fields['CALENDAR_NAME']; diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php index faea555d4..470f60586 100644 --- a/workflow/engine/controllers/adminProxy.php +++ b/workflow/engine/controllers/adminProxy.php @@ -86,6 +86,13 @@ class adminProxy extends HttpProxyController $updatedConf['proxy_pass'] = G::encrypt($httpData->proxy_pass, 'proxy_pass'); } + $sessionGcMaxlifetime = ini_get('session.gc_maxlifetime'); + if (($httpData->max_life_time != "") && ($sessionGcMaxlifetime != $httpData->max_life_time)) { + if (!isset($sysConf['session.gc_maxlifetime']) || ($sysConf['session.gc_maxlifetime'] != $httpData->max_life_time)) { + $updatedConf['session.gc_maxlifetime'] = $httpData->max_life_time; + } + } + if ($updateRedirector) { if (!file_exists(PATH_HTML . 'index.html')) { throw new Exception('The index.html file is not writable on workflow/public_html directory.'); diff --git a/workflow/engine/templates/admin/system.js b/workflow/engine/templates/admin/system.js index bc94e88cd..2d7ee926a 100644 --- a/workflow/engine/templates/admin/system.js +++ b/workflow/engine/templates/admin/system.js @@ -101,12 +101,26 @@ Ext.onReady(function(){ name : 'memory_limit', fieldLabel: _('ID_MEMORY_LIMIT'), allowBlank: false, + autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 }, value: sysConf.memory_limit, listeners:{ change: function(){ changeSettings(); } } + }, { + xtype: 'numberfield', + id : 'max_life_time', + name : 'max_life_time', + fieldLabel: _('ID_MAX_LIFETIME'), + // allowBlank: false, + autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 }, + value: sysConf.session_gc_maxlifetime, + listeners:{ + change: function(){ + changeSettings(); + } + } } ] }); diff --git a/workflow/public_html/sysGeneric.php b/workflow/public_html/sysGeneric.php index 9270dce25..2233bef8b 100755 --- a/workflow/public_html/sysGeneric.php +++ b/workflow/public_html/sysGeneric.php @@ -223,8 +223,13 @@ define( 'PML_WSDL_URL', PML_SERVER . '/syspmLibrary/en/green/services/wsdl' ); define( 'PML_UPLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/uploadProcess' ); define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download' ); +$config = Bootstrap::getSystemConfiguration(); // starting session -$timelife = ini_get('session.gc_maxlifetime'); +if (isset($config['session.gc_maxlifetime'])) { + $timelife = $config['session.gc_maxlifetime']; +} else { + $timelife = ini_get('session.gc_maxlifetime'); +} if (is_null($timelife)) { $timelife = 1440; } @@ -232,7 +237,6 @@ ini_set('session.gc_maxlifetime', $timelife); ini_set('session.cookie_lifetime', $timelife); session_start(); -$config = Bootstrap::getSystemConfiguration(); $e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL; $e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;