summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-12-11 02:06:25 +0000
committerDries Buytaert <dries@buytaert.net>2010-12-11 02:06:25 +0000
commit1b073521dfbb61428e0c44a18e659de273482232 (patch)
tree3f61541c202d3a748e419b7d14661d3bfdfc2737 /includes/theme.inc
parent4f1f28ae4c80b532348abee9e413fa4b37e8a021 (diff)
downloadbrdo-1b073521dfbb61428e0c44a18e659de273482232.tar.gz
brdo-1b073521dfbb61428e0c44a18e659de273482232.tar.bz2
- Patch #982814 by sun: messages are generated too early.
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index f3ace1368..44946cf53 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2257,7 +2257,6 @@ function template_preprocess_page(&$variables) {
$variables['language'] = $GLOBALS['language'];
$variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
$variables['logo'] = theme_get_setting('logo');
- $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : '';
$variables['main_menu'] = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
$variables['secondary_menu'] = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
$variables['action_links'] = menu_local_actions();
@@ -2295,6 +2294,12 @@ function template_process_page(&$variables) {
if (!isset($variables['title'])) {
$variables['title'] = drupal_get_title();
}
+
+ // Generate messages last in order to capture as many as possible for the
+ // current page.
+ if (!isset($variables['messages'])) {
+ $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : '';
+ }
}
/**