JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: php refactor, opt_public_*
[wfpl.git] / run.php
diff --git a/run.php b/run.php
index 32aebef..2791852 100644 (file)
--- a/run.php
+++ b/run.php
@@ -78,7 +78,7 @@ function run_php($dest = false) {
                }
        }
 
-       $GLOBALS['basename'] = $basename;
+       $GLOBALS['wfpl_basename'] = $basename;
 
        $html_file = "$basename.html";
        $php_file = "$basename.php";
@@ -89,13 +89,7 @@ function run_php($dest = false) {
        if(file_exists('template.html')) {
                $GLOBALS['wfpl_main_template'] = new tem();
                $GLOBALS['wfpl_main_template']->load("template.html");
-               $GLOBALS['wfpl_main_template']->set('basename', $basename);
-
-               # This helps put in a stylesheet link if you have pages with custom css
-               if(file_exists("$basename.css")) {
-                       $GLOBALS['wfpl_main_template']->set('css_link', "$basename.css");
-                       $GLOBALS['wfpl_main_template']->sub('css_links');
-               }
+               $GLOBALS['wfpl_main_template']->set('wfpl_basename', $basename);
        }
 
        # cms_get can return one of:
@@ -119,7 +113,7 @@ function run_php($dest = false) {
                        run_php('error_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();
                }
        }