aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php31
-rw-r--r--include/common.inc.php1
-rw-r--r--include/page_messages.php2
3 files changed, 4 insertions, 30 deletions
diff --git a/admin.php b/admin.php
index a27d4e72c..53b449918 100644
--- a/admin.php
+++ b/admin.php
@@ -156,16 +156,6 @@ else
$page['page'] = 'intro';
}
-$page['errors'] = array();
-$page['infos'] = array();
-$page['warnings'] = array();
-
-if (isset($_SESSION['page_infos']))
-{
- $page['infos'] = array_merge($page['infos'], $_SESSION['page_infos']);
- unset($_SESSION['page_infos']);
-}
-
$link_start = PHPWG_ROOT_PATH.'admin.php?page=';
$conf_link = $link_start.'configuration&section=';
@@ -290,27 +280,8 @@ if (
trigger_action('loc_begin_admin_page');
include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php');
-// +-----------------------------------------------------------------------+
-// | Errors, Infos & Warnings |
-// +-----------------------------------------------------------------------+
-
$template->assign('ACTIVE_MENU', get_active_menu($page['page']));
-if (count($page['errors']) != 0)
-{
- $template->assign('errors', $page['errors']);
-}
-
-if (count($page['infos']) != 0)
-{
- $template->assign('infos', $page['infos']);
-}
-
-if (count($page['warnings']) != 0)
-{
- $template->assign('warnings', $page['warnings']);
-}
-
// +-----------------------------------------------------------------------+
// | Sending html code |
// +-----------------------------------------------------------------------+
@@ -322,6 +293,8 @@ include(PHPWG_ROOT_PATH.'include/page_header.php');
trigger_action('loc_end_admin');
+include(PHPWG_ROOT_PATH.'include/page_messages.php');
+
$template->pparse('admin');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
diff --git a/include/common.inc.php b/include/common.inc.php
index 7c645a236..40e176dea 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -64,6 +64,7 @@ $conf = array();
$page = array(
'infos' => array(),
'errors' => array(),
+ 'warnings' => array(),
);
$user = array();
$lang = array();
diff --git a/include/page_messages.php b/include/page_messages.php
index aea8d7afd..58cd5d0a0 100644
--- a/include/page_messages.php
+++ b/include/page_messages.php
@@ -24,7 +24,7 @@
// messages only if no redirection
if ($template->get_template_vars('page_refresh') === null)
{
- foreach (array('errors','infos') as $mode)
+ foreach (array('errors','infos','warnings') as $mode)
{
if (isset($_SESSION['page_'.$mode]))
{