summaryrefslogtreecommitdiff
path: root/inc/init.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-09-29 22:38:31 +0200
committerAndreas Gohr <andi@splitbrain.org>2008-09-29 22:38:31 +0200
commit14a122de545fca1815592d0eed00cfc9245333b0 (patch)
tree7098a19a24f1309a0ef9ef2767a51540b5e97c37 /inc/init.php
parent7fe75c1e1693320739c324c882a0dadf5532ac51 (diff)
downloadrpg-14a122de545fca1815592d0eed00cfc9245333b0.tar.gz
rpg-14a122de545fca1815592d0eed00cfc9245333b0.tar.bz2
keep undisplayed messages over redirects
When act_redirect is executed (post data was received and mode show is called) all undisplayed messages (from calls to msg()) are saved in the session now. These messages are then revived in inc/init.php. This makes sure no errors that occured before the redirect are lost. darcs-hash:20080929203831-7ad00-d0869fd3093f57c1ea64ccbaf05d7fd98f68c5e1.gz
Diffstat (limited to 'inc/init.php')
-rw-r--r--inc/init.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/init.php b/inc/init.php
index def5d7997..6c3f54e16 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -118,6 +118,12 @@
session_set_cookie_params(0,DOKU_REL,'',($conf['securecookie'] && is_ssl()));
}
session_start();
+
+ // load left over messages
+ if(isset($_SESSION[DOKU_COOKIE]['msg'])){
+ $MSG = $_SESSION[DOKU_COOKIE]['msg'];
+ unset($_SESSION[DOKU_COOKIE]['msg']);
+ }
}
// kill magic quotes