Commit a11c456f authored by Taylor Otwell's avatar Taylor Otwell

Fix keep method and added started method.

parent 498a83ab
......@@ -71,6 +71,16 @@ class Session {
return is_null(static::$session) or ($idle > ($lifetime * 60));
}
/**
* Determine if session handling has been started for the request.
*
* @return bool
*/
public static function started()
{
return is_array(static::$session);
}
/**
* Determine if the session or flash data contains an item.
*
......@@ -156,7 +166,12 @@ class Session {
*/
public static function keep($keys)
{
foreach ((array) $keys as $key) static::flash($key, static::get($key));
foreach ((array) $keys as $key)
{
$key = str_replace(array(':old:', ':new:'), '', $key);
static::flash($key, static::get($key));
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment