mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-20 16:42:59 +02:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user