mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch '2.0' into 2.1
Conflicts: lib/Cake/Model/Datasource/CakeSession.php
This commit is contained in:
commit
a275555297
2 changed files with 4 additions and 4 deletions
|
@ -114,7 +114,7 @@ class CakeSession {
|
|||
|
||||
/**
|
||||
* Number of requests that can occur during a session time without the session being renewed.
|
||||
* This feature is only used when `Session.autoRegenerate` is set to true.
|
||||
* This feature is only used when config value `Session.autoRegenerate` is set to true.
|
||||
*
|
||||
* @var integer
|
||||
* @see CakeSession::_checkValid()
|
||||
|
@ -629,14 +629,13 @@ class CakeSession {
|
|||
$sessionConfig = Configure::read('Session');
|
||||
|
||||
if (self::_validAgentAndTime()) {
|
||||
$time = $config['time'];
|
||||
self::write('Config.time', self::$sessionTime);
|
||||
if (isset($sessionConfig['autoRegenerate']) && $sessionConfig['autoRegenerate'] === true) {
|
||||
$check = $config['countdown'];
|
||||
$check -= 1;
|
||||
self::write('Config.countdown', $check);
|
||||
|
||||
if (time() > ($time - ($sessionConfig['timeout'] * 60) + 2) || $check < 1) {
|
||||
if ($check < 1) {
|
||||
self::renew();
|
||||
self::write('Config.countdown', self::$requestCountdown);
|
||||
}
|
||||
|
@ -683,4 +682,4 @@ class CakeSession {
|
|||
self::$error[$errorNumber] = $errorMessage;
|
||||
self::$lastError = $errorNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -285,6 +285,7 @@ class CacheHelper extends AppHelper {
|
|||
";
|
||||
} else {
|
||||
$file .= "
|
||||
App::uses('{$this->_View->plugin}AppController', '{$this->_View->plugin}.Controller');
|
||||
App::uses('{$this->_View->name}Controller', '{$this->_View->plugin}.Controller');
|
||||
";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue