X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=run.php;h=27918526de258bad5c9afc0cec412d42043eb60e;hb=cc3a6b27d3a041f1a8f351df2941b705191aadee;hp=bb9bed55f42fff4e23fccac457cb0558a1e1876d;hpb=b4bc48b5a6e331e1984922057b46915875099c15;p=wfpl.git diff --git a/run.php b/run.php index bb9bed5..2791852 100644 --- 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,19 +89,13 @@ 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: - # 1) false to indicate that there's no cms content for this basename - # 2) a string to indicate a soft/full redirect just as foo_main() - # 3) a hash of key/value pairs to be tem_set() on the template + # 1) true to indicate that there is cms content (so no 404) + # 2) false to indicate that there's no cms content for this basename + # 3) a string to indicate a soft/full redirect just as foo_main() if(function_exists('cms_display')) { $cms_content = cms_display($basename, $GLOBALS['wfpl_main_template']); if(is_string($cms_content)) { @@ -119,7 +113,7 @@ function run_php($dest = false) { run_php('error_404'); return; } else { - echo '404

404 File Not Found

'; + echo '404

404 File Not Found

'; exit(); } }