From ec50a59f75f8799b50d178ce4c7e8f4a14906874 Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 7 Feb 2013 21:17:08 +0000 Subject: replaced page_messages.php with a function to call git-svn-id: http://piwigo.org/svn/trunk@20609 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_html.inc.php | 22 ++++++++++++++++++++++ include/page_messages.php | 42 ------------------------------------------ 2 files changed, 22 insertions(+), 42 deletions(-) delete mode 100644 include/page_messages.php (limited to 'include') diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index b29f214ef..5b6a5079b 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -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]); + } + } + } +} + ?> \ No newline at end of file diff --git a/include/page_messages.php b/include/page_messages.php deleted file mode 100644 index 7da0a71f6..000000000 --- a/include/page_messages.php +++ /dev/null @@ -1,42 +0,0 @@ -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]); - } - } -} - -?> \ No newline at end of file -- cgit v1.2.3