From 0181f02104c2e7068dfe8d66353cf8502e34a379 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 13 Jun 2010 11:33:12 +0200 Subject: Store undisplayed msg's in session on redirect --- inc/common.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc/common.php') diff --git a/inc/common.php b/inc/common.php index ec27d8a85..25d743e0b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1464,6 +1464,14 @@ function is_mem_available($mem,$bytes=1048576){ * @author Andreas Gohr */ function send_redirect($url){ + //are there any undisplayed messages? keep them in session for display + global $MSG; + if (isset($MSG) && count($MSG) && !defined('NOSESSION')){ + //reopen session, store data and close session again + @session_start(); + $_SESSION[DOKU_COOKIE]['msg'] = $MSG; + } + // always close the session session_write_close(); -- cgit v1.2.3