eTemplate/app apps: if PHP session lifetime is bigger then default eTemplate request lifetime of 4h use session lifetime

This commit is contained in:
Ralf Becker 2015-10-19 11:36:56 +00:00
parent c200c1ccc3
commit bf97b85056

View File

@ -140,7 +140,9 @@ class etemplate_request_cache extends etemplate_request
{
//error_log(__METHOD__."() saving $this->id".($this->data_modified?'':' data NOT modified, just keeping session alife'));
$this->data['last_saved'] = time();
if (!egw_cache::setTree($GLOBALS['egw_info']['server']['install_id'].'_etemplate', $this->id, $this->data, self::EXPIRATION))
if (!egw_cache::setTree($GLOBALS['egw_info']['server']['install_id'].'_etemplate', $this->id, $this->data,
// use bigger one of our own self::EXPIRATION=4h and session lifetime (session.gc_maxlifetime) as expiration time
max(self::EXPIRATION, ini_get('session.gc_maxlifetime'))))
{
error_log("Error storing etemplate request data for id=$this->id!");
}