JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: fix download_tar() (stylus not less)
[wfpl.git] / run2.php
index c67c27e..5e23216 100644 (file)
--- a/run2.php
+++ b/run2.php
@@ -1,8 +1,8 @@
-<?php
+<?php  # For new template API
 
 #  2006 Public Domain
 #
-#  This file was placed into the public domain on November 16th, 2008 by it's
+#  This file was placed into the public domain on November 16th, 2008 by its
 #  sole author Jason Woofenden
 
 # This file facilitates making a site with mixed PHP and html files. All URLs
@@ -116,7 +116,7 @@ function run_php($dest = false) {
                        run_php('404');
                        return;
                } else {
-                       echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
+                       echo '<!DOCTYPE html><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
                        exit();
                }
        }
@@ -136,8 +136,8 @@ function run_php($dest = false) {
        if(file_exists("template.html")) {
                $template = parse_template_file("template.html");
                if($html_exists) {
-                       $subs = parse_template_file($html_file);
-                       $template = merge_templates($template, $subs);
+                       $page_template = parse_template_file($html_file);
+                       $template = merge_templates($template, $page_template);
                }
        } elseif($html_exists) {
                $template = parse_template_file("$html_file");