mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-01 22:17:55 -05:00
After $config['sess_time_to_update'] expires the session will be destroyed if concurrent AJAX calls are made to the framework. Original discussion on this problem can be found on the following URL http://stackoverflow.com/questions/7980193/codeigniter-session-bugging-out-with-ajax-calls
20 lines
493 B
PHP
20 lines
493 B
PHP
<?php
|
|
class MY_Session extends CI_Session {
|
|
|
|
/**
|
|
* Update an existing session
|
|
*
|
|
* @access public
|
|
* @return void
|
|
*/
|
|
function sess_update() {
|
|
// skip the session update if this is an AJAX call! This is a bug in CI; see:
|
|
// https://github.com/EllisLab/CodeIgniter/issues/154
|
|
// http://codeigniter.com/forums/viewthread/102456/P15
|
|
if ( !($this->CI->input->is_ajax_request()) ) {
|
|
parent::sess_update();
|
|
}
|
|
}
|
|
}
|
|
|