Skip to content
Snippets Groups Projects
Commit e317e7d7 authored by Peter Rotich's avatar Peter Rotich
Browse files

Support packing system messages into the session

Messages are extracted on post-action redirect.
parent 45e009dc
No related branches found
No related tags found
No related merge requests found
...@@ -43,4 +43,12 @@ $_POST=Format::strip_slashes($_POST); ...@@ -43,4 +43,12 @@ $_POST=Format::strip_slashes($_POST);
$_GET=Format::strip_slashes($_GET); $_GET=Format::strip_slashes($_GET);
$_REQUEST=Format::strip_slashes($_REQUEST); $_REQUEST=Format::strip_slashes($_REQUEST);
} }
// extract system messages
$errors = array();
$msg=$warn=$sysnotice='';
if ($_SESSION['::sysmsgs']) {
extract($_SESSION['::sysmsgs']);
unset($_SESSION['::sysmsgs']);
}
?> ?>
...@@ -110,9 +110,6 @@ $_SESSION['TZ_DST']=$thisstaff->observeDaylight(); ...@@ -110,9 +110,6 @@ $_SESSION['TZ_DST']=$thisstaff->observeDaylight();
define('PAGE_LIMIT', $thisstaff->getPageLimit()?$thisstaff->getPageLimit():DEFAULT_PAGE_LIMIT); define('PAGE_LIMIT', $thisstaff->getPageLimit()?$thisstaff->getPageLimit():DEFAULT_PAGE_LIMIT);
//Clear some vars. we use in all pages.
$errors=array();
$msg=$warn=$sysnotice='';
$tabs=array(); $tabs=array();
$submenu=array(); $submenu=array();
$exempt = in_array(basename($_SERVER['SCRIPT_NAME']), array('logout.php', 'ajax.php', 'logs.php', 'upgrade.php')); $exempt = in_array(basename($_SERVER['SCRIPT_NAME']), array('logout.php', 'ajax.php', 'logs.php', 'upgrade.php'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment