mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 19:29:58 +03:00
replaced page_messages.php with a function to call
git-svn-id: http://piwigo.org/svn/trunk@20609 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
e86d61a4d2
commit
ec50a59f75
15 changed files with 35 additions and 55 deletions
|
@ -614,4 +614,26 @@ function get_element_url_protection_handler($url, $infos)
|
|||
return get_action_url($infos['id'], 'e', false);
|
||||
}
|
||||
|
||||
|
||||
function flush_page_messages()
|
||||
{
|
||||
global $template, $page;
|
||||
if ($template->get_template_vars('page_refresh') === null)
|
||||
{
|
||||
foreach (array('errors','infos','warnings') 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue