#3073: BC workarounds for sess_use_database, sess_expire_on_close
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 518dc28..bdcde1e 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -70,6 +70,11 @@
{
$this->_driver = $driver;
}
+ // Note: BC workaround
+ elseif (config_item('sess_use_database'))
+ {
+ $this->_driver = 'database';
+ }
if (($class = $this->_ci_load_classes($this->_driver)) === FALSE)
{
diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php
index c46ca3a..cc35b66 100644
--- a/system/libraries/Session/Session_driver.php
+++ b/system/libraries/Session/Session_driver.php
@@ -133,6 +133,12 @@
if ($this->_expiration)
{
ini_set('session.gc_maxlifetime', $this->_expiration);
+ ini_set('session.cookie_lifetime', $this->_expiration);
+ }
+ // BC workaround for setting cookie lifetime
+ elseif (config_item('sess_expire_on_close'))
+ {
+ ini_set('session.cookie_lifetime', 0);
}
// Security is king