mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
parent
cffc36e4e0
commit
c96e364cbb
1 changed files with 2 additions and 0 deletions
|
@ -137,6 +137,8 @@ class DatabaseSession implements CakeSessionHandlerInterface {
|
|||
public function gc($expires = null) {
|
||||
if (!$expires) {
|
||||
$expires = time();
|
||||
} else {
|
||||
$expires = time() - $expires;
|
||||
}
|
||||
return $this->_model->deleteAll(array($this->_model->alias . ".expires <" => $expires), false, false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue