Created
December 14, 2015 12:50
-
-
Save sotoz/cf2e3e5c379af745e129 to your computer and use it in GitHub Desktop.
Session fix for codeigniter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
require_once BASEPATH . '/libraries/Session.php'; | |
class MY_Session extends CI_Session | |
{ | |
function __construct() | |
{ | |
parent::__construct(); | |
$this->CI->session = $this; | |
} | |
function sess_update() | |
{ | |
// Do NOT update an existing session on AJAX calls. | |
if (!$this->CI->input->is_ajax_request()) | |
return parent::sess_update(); | |
} | |
} | |
/* End of file MY_Session.php */ | |
/* Location: ./application/libraries/MY_Session.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment