Revision 2332,
1.1 KB
checked in by niltonneto, 14 years ago
(diff) |
Ticket #926 - Corrigido ajuste para atualizar session_dla.
|
Rev | Line | |
---|
[1040] | 1 | <?php |
---|
[1061] | 2 | session_start( ); |
---|
| 3 | $sess = $_SESSION[ 'phpgw_session' ]; |
---|
[2329] | 4 | $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199); |
---|
| 5 | |
---|
| 6 | if ( empty($_SESSION['phpgw_session']['session_id']) || |
---|
| 7 | ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id) |
---|
| 8 | ) |
---|
| 9 | { |
---|
| 10 | if($_SESSION['connection_db_info']['user_auth'] && !strstr($_SERVER['SCRIPT_URL'],"/controller.php")) |
---|
| 11 | error_log( '[ INVALID SESSION ] >>>>' . implode('',$_SESSION['connection_db_info']['user_auth']) . '<<<< - >>>>' . $connection_id . '<<<<', 0 ); |
---|
[1040] | 12 | |
---|
[1161] | 13 | setcookie("PHPSESSID","",0); |
---|
[2065] | 14 | setcookie ("sessionid","",0); |
---|
[2329] | 15 | unset($_SESSION); |
---|
[2332] | 16 | // From ExpressoAjax response "nosession" |
---|
[2329] | 17 | if(strstr($_SERVER['SCRIPT_URL'],"/controller.php")){ |
---|
| 18 | echo serialize(array("nosession" => true)); |
---|
| 19 | exit; |
---|
| 20 | } |
---|
[1040] | 21 | } |
---|
[2329] | 22 | else{ |
---|
| 23 | // Keep Alive session user. |
---|
| 24 | if ( isset( $_COOKIE[ 'sessionid' ] ) ) |
---|
| 25 | session_id( $_COOKIE[ 'sessionid' ] ); |
---|
[2332] | 26 | // From ExpressoAjax update session_dla (datetime last access). |
---|
| 27 | if(strstr($_SERVER['SCRIPT_URL'],"/controller.php")) |
---|
| 28 | $_SESSION['phpgw_session']['session_dla'] = time(); |
---|
[2329] | 29 | } |
---|
| 30 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.