BUG 11037 Hook for session time setting SOLVED
- A hook is needed for a plugin to configure the session timeout. - Added hook for session of the time setting & Added setting of the Maximum lifetime cleaned up in the System option.
This commit is contained in:
@@ -44,6 +44,11 @@ class Admin extends Controller
|
|||||||
// $c = new Configurations();
|
// $c = new Configurations();
|
||||||
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||||
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
// $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( 'skinsList', $skins );
|
||||||
$this->setJSVar( 'languagesList', $languagesList );
|
$this->setJSVar( 'languagesList', $languagesList );
|
||||||
@@ -90,7 +95,8 @@ class Admin extends Controller
|
|||||||
$fields = $calendarObj->getCalendarInfoE( $CalendarUid );
|
$fields = $calendarObj->getCalendarInfoE( $CalendarUid );
|
||||||
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
|
$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['CALENDAR_UID'] = $CalendarUid;
|
||||||
$fields['OLD_NAME'] = '';
|
$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_START'] = "09:00";
|
||||||
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17: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_UID'] = G::GenerateUniqueID();
|
||||||
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
|
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
|
||||||
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
|
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
|
||||||
|
|||||||
@@ -86,6 +86,13 @@ class adminProxy extends HttpProxyController
|
|||||||
$updatedConf['proxy_pass'] = G::encrypt($httpData->proxy_pass, 'proxy_pass');
|
$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 ($updateRedirector) {
|
||||||
if (!file_exists(PATH_HTML . 'index.html')) {
|
if (!file_exists(PATH_HTML . 'index.html')) {
|
||||||
throw new Exception('The index.html file is not writable on workflow/public_html directory.');
|
throw new Exception('The index.html file is not writable on workflow/public_html directory.');
|
||||||
|
|||||||
@@ -101,12 +101,26 @@ Ext.onReady(function(){
|
|||||||
name : 'memory_limit',
|
name : 'memory_limit',
|
||||||
fieldLabel: _('ID_MEMORY_LIMIT'),
|
fieldLabel: _('ID_MEMORY_LIMIT'),
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
|
autoCreate: {tag: "input", type: "text", autocomplete: "off", maxlength: 15 },
|
||||||
value: sysConf.memory_limit,
|
value: sysConf.memory_limit,
|
||||||
listeners:{
|
listeners:{
|
||||||
change: function(){
|
change: function(){
|
||||||
changeSettings();
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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_UPLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/uploadProcess' );
|
||||||
define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download' );
|
define( 'PML_DOWNLOAD_URL', PML_SERVER . '/syspmLibrary/en/green/services/download' );
|
||||||
|
|
||||||
|
$config = Bootstrap::getSystemConfiguration();
|
||||||
// starting session
|
// 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)) {
|
if (is_null($timelife)) {
|
||||||
$timelife = 1440;
|
$timelife = 1440;
|
||||||
}
|
}
|
||||||
@@ -232,7 +237,6 @@ ini_set('session.gc_maxlifetime', $timelife);
|
|||||||
ini_set('session.cookie_lifetime', $timelife);
|
ini_set('session.cookie_lifetime', $timelife);
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
$config = Bootstrap::getSystemConfiguration();
|
|
||||||
|
|
||||||
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
||||||
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
||||||
|
|||||||
Reference in New Issue
Block a user