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
This commit is contained in:
mistic100
2011-12-18 21:46:24 +00:00
parent f500499530
commit ca230a6f53
25 changed files with 83 additions and 186 deletions
+16
View File
@@ -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());