Commit 285a744f by Taylor Otwell

Only reflash flashed items.

parent e8561ca9
...@@ -155,7 +155,17 @@ class Session { ...@@ -155,7 +155,17 @@ class Session {
*/ */
public static function reflash() public static function reflash()
{ {
static::keep(array_keys(static::$session['data'])); $flash = array();
foreach (static::$session['data'] as $key => $value)
{
if (strpos($key, ':old:') === 0)
{
$flash[] = str_replace(':old:', '', $key);
}
}
static::keep($flash);
} }
/** /**
...@@ -168,8 +178,6 @@ class Session { ...@@ -168,8 +178,6 @@ class Session {
{ {
foreach ((array) $keys as $key) foreach ((array) $keys as $key)
{ {
$key = str_replace(array(':old:', ':new:'), '', $key);
static::flash($key, static::get($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