mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API Removed deprecated Session::set_config()
This commit is contained in:
parent
1d438d3fb5
commit
81e5c7ac40
@ -1283,6 +1283,7 @@ After (`mysite/_config/config.yml`):
|
|||||||
- `getModules`
|
- `getModules`
|
||||||
- `getConfigDirs`
|
- `getConfigDirs`
|
||||||
- `getConfigs`
|
- `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
|
#### <a name="overview-general-deprecated"></a>General and Core Deprecated API
|
||||||
|
|
||||||
|
@ -544,26 +544,4 @@ class Session
|
|||||||
{
|
{
|
||||||
self::current_session()->inst_destroy($removeCookie);
|
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');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user