diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 6f9fab67c3..08fa808b8a 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -342,7 +342,11 @@ } $GLOBALS['egw_info']['user']['kp3'] = $this->kp3; - $this->update_dla(); + // allow xajax / notifications to not update the dla, so sessions can time out again + if (!isset($GLOBALS['egw_info']['flags']['no_dla_update']) || !$GLOBALS['egw_info']['flags']['no_dla_update']) + { + $this->update_dla(); + } $this->account_id = $GLOBALS['egw']->accounts->name2id($this->account_lid,'account_lid','u'); if (!$this->account_id) { @@ -1431,7 +1435,22 @@ * @return bool did it suceed? */ function destroy($sessionid, $kp3) - {} + { + if (!$sessionid && $kp3) + { + return False; + } + $this->log_access($this->sessionid); // log logout-time + + error_log(__METHOD__."($sessionid,$kp3) parent::destroy()=$ret"); + + $GLOBALS['egw']->hooks->process(array( + 'location' => 'session_destroyed', + 'sessionid' => $sessionid, + ),'',true); // true = run hooks from all apps, not just the ones the current user has perms to run + + return true; + } /** * Functions for appsession data and session cache diff --git a/phpgwapi/inc/class.sessions_php4.inc.php b/phpgwapi/inc/class.sessions_php4.inc.php index 6c8eb9d30e..bad8ebf441 100644 --- a/phpgwapi/inc/class.sessions_php4.inc.php +++ b/phpgwapi/inc/class.sessions_php4.inc.php @@ -133,13 +133,10 @@ class sessions extends sessions_ function destroy($sessionid, $kp3) { - if (!$sessionid && $kp3) + if (!parent::destroy($sessionid,$kp3)) { - return False; + return false; } - - $this->log_access($this->sessionid); // log logout-time - // Only do the following, if where working with the current user if ($sessionid == $GLOBALS['egw_info']['user']['sessionid']) { diff --git a/xajax.php b/xajax.php index 44479e1147..45a33982bc 100644 --- a/xajax.php +++ b/xajax.php @@ -103,6 +103,7 @@ function doXMLHTTP() 'disable_Template_class' => True, 'autocreate_session_callback' => 'xajax_redirect', 'no_exception_handler' => true, // we already installed our own + 'no_dla_update' => $appName == 'notifications', // otherwise session never time out ) ); include('./header.inc.php');