From: jason Date: Wed, 21 May 2008 21:19:02 +0000 (-0400) Subject: added dwt_get(), messages only display once X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=98059dfc3252905f407bd9870e546deba2db686d;hp=0848aa3606b38ec51701960b9cbd84bea0fbd8ce;p=wfpl.git added dwt_get(), messages only display once --- 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.