From 3ba2aa1e54fe9e97628364ef24010d5c7222a6bd Mon Sep 17 00:00:00 2001 From: Mark Wunsch Date: Wed, 1 Sep 2010 22:09:58 -0400 Subject: [PATCH] Passing meta options into the parser --- theme.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/theme.php b/theme.php index 9c7c1eb..7cb5059 100644 --- a/theme.php +++ b/theme.php @@ -4,6 +4,9 @@ $DATA = 'demo.yml'; $THEME = 'themes/'.$_GET['theme']; +$options = $_REQUEST; + +unset($options['theme'], $options['auto-refresh']); $last_modified_time = filemtime($THEME); $etag = md5_file($THEME); @@ -12,12 +15,12 @@ header("Etag: $etag"); if (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time || - trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { - header("HTTP/1.1 304 Not Modified"); - exit; + trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { + header("HTTP/1.1 304 Not Modified"); + exit; } $theme = new ThimbleParser(file_get_contents('data/'.$DATA)); -echo $theme->parse(file_get_contents($THEME)); +echo $theme->parse(file_get_contents($THEME), $options); -?> \ No newline at end of file +?>