X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=messages.php;h=9db80a136431c9c378fed518fce37509788a1244;hb=48bc8c7ca2448555a225b5996effcc9d41bdcfed;hp=326ed1695ba8371fb6c5b288a6220aef2b9d7b2e;hpb=651c6826f68583dcd7c7ddfb5b02f14bcf2200d8;p=wfpl.git diff --git a/messages.php b/messages.php index 326ed16..9db80a1 100644 --- a/messages.php +++ b/messages.php @@ -2,21 +2,18 @@ # Copyright (C) 2007 Jason Woofenden # -# This file is part of wfpl. -# -# wfpl is free software; you can redistribute it and/or modify it under the -# terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 2.1 of the License, or (at your option) -# any later version. -# -# wfpl is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for -# more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with wfpl; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . @@ -74,6 +71,10 @@ function display_messages($template = 0) { $template = &$template->ref; } + if(function_exists('session_restore_messages')) { + session_restore_messages(); + } + if($GLOBALS['wfpl_messages']) { foreach($GLOBALS['wfpl_messages'] as $msg) { if($first) { @@ -85,6 +86,7 @@ function display_messages($template = 0) { $template->sub('message_box'); } $template->sub('message_container'); + unset($GLOBALS['wfpl_messages']); } }