Skip to content

Commit

Permalink
Fixing flash messages availability in views
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrice Luraine committed Jul 18, 2009
1 parent 493abee commit 5d11e0b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/limonade.php
Expand Up @@ -375,10 +375,7 @@ function render_limonade_file()
# 5.3 Call before function
call_if_exists('before');

# 5.4 Make flash messages available in view
set('flash', flash_now());

# 5.5 Call matching controller function and output result
# 5.4 Call matching controller function and output result
if($output = call_user_func($route['function']))
{
echo after(error_notices_render() . $output);
Expand Down Expand Up @@ -1255,6 +1252,7 @@ function render($content_or_func, $layout = '', $locals = array())
$content_or_func = array_shift($args);
$layout = count($args) > 0 ? array_shift($args) : layout();
$view_path = file_path(option('views_dir'),$content_or_func);
set('flash', flash_now());
$vars = array_merge(set(), $locals);
$infinite_loop = false;

Expand Down

0 comments on commit 5d11e0b

Please sign in to comment.