JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed pulldowns, metaform suppors zip and decimal, run.php supports straight html...
[wfpl.git] / dwt.php
diff --git a/dwt.php b/dwt.php
index d07abd8..82629ff 100644 (file)
--- a/dwt.php
+++ b/dwt.php
@@ -18,7 +18,7 @@
 #  along with wfpl; if not, write to the Free Software Foundation, Inc., 51
 #  Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-require_once('code/wfpl/misc.php');
+require_once('code/wfpl/file.php');
 
 function dwt_reset() {
        $GLOBALS['_dwt_keys'] = array('<!-- TemplateEndEditable -->');
@@ -32,11 +32,15 @@ function dwt_init() {
        dwt_reset();
 }
 
-function dwt_load($filename) {
-       $GLOBALS['_dwt_template'] = read_whole_file($filename);
+function dwt_load_str($str) {
+       $GLOBALS['_dwt_template'] = $str;
        dwt_init();
 }
 
+function dwt_load($filename) {
+       dwt_load_str(read_whole_file($filename));
+}
+
 function dwt_set_raw($name, $value) {
        $GLOBALS['_dwt_keys'][] = $name;
        $GLOBALS['_dwt_values'][] = $value;