aboutsummaryrefslogtreecommitdiffstats
path: root/include/page_header.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-12-18 21:46:24 +0000
committermistic100 <mistic@piwigo.org>2011-12-18 21:46:24 +0000
commitca230a6f53e3a102faf5cb3633465ee8fc326663 (patch)
tree9613ef04023af2927ed452c370af4814fb866fc5 /include/page_header.php
parentf5004995306cb603d63724c98af2d657c3c4a64b (diff)
feature:2538 Make a unified messages management
use only $page['infos'] and $page['errors'] vars and and necessary template to all main pages git-svn-id: http://piwigo.org/svn/trunk@12764 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/page_header.php')
-rw-r--r--include/page_header.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/page_header.php b/include/page_header.php
index 506e93920..55dc3f5c5 100644
--- a/include/page_header.php
+++ b/include/page_header.php
@@ -98,6 +98,22 @@ if ( isset( $refresh ) and intval($refresh) >= 0
));
}
+
+// messages
+foreach (array('errors','infos') as $mode)
+{
+ if (isset($_SESSION['page_'.$mode]))
+ {
+ $page[$mode] = array_merge($page[$mode], $_SESSION['page_'.$mode]);
+ unset($_SESSION['page_'.$mode]);
+ }
+
+ if (count($page[$mode]) != 0)
+ {
+ $template->assign($mode, $page[$mode]);
+ }
+}
+
trigger_action('loc_end_page_header');
header('Content-Type: text/html; charset='.get_pwg_charset());