X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/27850f5b260560bdf75f3fca169ec5950ed00b22..2c13f7538d3e22d07bbdf3d8aec3e16d8c156986:/cx/lib/template.php?ds=inline diff --git a/cx/lib/template.php b/cx/lib/template.php index 76e5318..004c2ab 100644 --- a/cx/lib/template.php +++ b/cx/lib/template.php @@ -1,5 +1,52 @@ = $file_modified_time) { + http_response_code(304); + return; + } + } + + $fp = fopen($full_path, 'rb'); + fpassthru($fp); + fclose($fp); +} + function cx_template_render($class, $name, $variables = null) { global $cx_template_base, $cx_template_content; @@ -7,7 +54,7 @@ function cx_template_render($class, $name, $variables = null) { $output = ''; while ($name != null) { - $segments = array(CX_PATH, 'templates', $class, $name . '.php'); + $segments = array(CX_PATH, 'templates', $class, 'pages', $name . '.php'); $path = join(DIRECTORY_SEPARATOR, $segments); $base_template = null;