API Removed deprecated Session::set_config()

This commit is contained in:
Ingo Schommer 2017-05-08 21:07:16 +12:00 committed by Damian Mooyman
parent 1d438d3fb5
commit 81e5c7ac40
2 changed files with 2 additions and 23 deletions

View File

@ -1283,6 +1283,7 @@ After (`mysite/_config/config.yml`):
- `getModules`
- `getConfigDirs`
- `getConfigs`
* Removed `Session::set_config()` and `Session::get_config()`. Use the `Session.timeout` config setting instead
#### <a name="overview-general-deprecated"></a>General and Core Deprecated API

View File

@ -544,26 +544,4 @@ class Session
{
self::current_session()->inst_destroy($removeCookie);
}
/**
* Set the timeout of a Session value
*
* @deprecated 4.0 Use the "Session.timeout" config setting instead
*
* @param int $timeout Time until a session expires in seconds. Defaults to expire when browser is closed.
*/
public static function set_timeout($timeout)
{
Deprecation::notice('4.0', 'Use the "Session.timeout" config setting instead');
Config::inst()->update('SilverStripe\\Control\\Session', 'timeout', (int) $timeout);
}
/**
* @deprecated 4.0 Use the "Session.timeout" config setting instead
*/
public static function get_timeout()
{
Deprecation::notice('4.0', 'Use the "Session.timeout" config setting instead');
return Config::inst()->get('SilverStripe\\Control\\Session', 'timeout');
}
}