From 98059dfc3252905f407bd9870e546deba2db686d Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 21 May 2008 17:19:02 -0400 Subject: [PATCH] added dwt_get(), messages only display once --- dwt.php | 13 +++++++++++++ messages.php | 1 + session.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dwt.php b/dwt.php index d347753..1849778 100644 --- a/dwt.php +++ b/dwt.php @@ -97,6 +97,19 @@ function dwt_prepend($name, $value) { dwt_prepend_raw("", $value); } +function dwt_get_raw($name) { + $index = dwt_find_raw($name); + if($index !== null) { + return $GLOBALS['_dwt_values'][$index]; + } else { + return false; + } +} + +function dwt_get($name) { + return dwt_get_raw(""); +} + function dwt_output($filename = null) { if($filename !== null) { dwt_load($filename); diff --git a/messages.php b/messages.php index 187f083..c238951 100644 --- a/messages.php +++ b/messages.php @@ -89,6 +89,7 @@ function display_messages($template = 0) { $template->sub('message_box'); } $template->sub('message_container'); + unset($GLOBALS['wfpl_messages']); } } diff --git a/session.php b/session.php index 4efec20..c99ba3f 100644 --- a/session.php +++ b/session.php @@ -48,7 +48,7 @@ if(!isset($GLOBALS['wfpl_db_handle'])) { # generate a new random 16-character string function session_generate_key() { - $character_set = "abcdefghijklmnopqrstuvwqyzABCDEFGHIJKLMNOPQRSTUVWQYZ0123456789"; + $character_set = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; $id = " "; # PHP 4.2.0 and up seed the random number generator for you. -- 1.7.10.4