public
Created

  • Download Gist
chip.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/lib/chippino/apps/chippino/template/chip/node/header.php b/lib/chippino/apps/chippino/template/chip/node/header.php
index d51b5ae..aeff84a 100644
--- a/lib/chippino/apps/chippino/template/chip/node/header.php
+++ b/lib/chippino/apps/chippino/template/chip/node/header.php
@@ -9,7 +9,9 @@ class ChipHeader_PXHTMLNode extends PXHTMLNode {
$replace = (strtolower($node->getAttribute('replace')) == "false") ? FALSE : TRUE;
while ($node->firstChild) {
if ($node->firstChild->nodeType == XML_TEXT_NODE) {
- header(trim($node->firstChild->wholeText)."\n\n", $replace);
+ $str = 'header(trim("'.$node->firstChild->wholeText.'")."\n\n", '.$replace.');';
+ $php_inst_st = $this->createProcessingInstruction($str);
+ $node->parentNode->insertBefore($php_inst_st, $node);
}
$node->removeChild($node->firstChild);
}
diff --git a/lib/chippino/apps/chippino/template/init.php b/lib/chippino/apps/chippino/template/init.php
index e79ee65..fa797d3 100644
--- a/lib/chippino/apps/chippino/template/init.php
+++ b/lib/chippino/apps/chippino/template/init.php
@@ -29,6 +29,8 @@ $_chip_pxhtml_cache_file = chip($cache.'/'.$chk)->getFilePath().'.php';
define('PXHTML_SIGNATURE_HASH', $chk);
+header('X-Chippino-File-Checksum: '.PXHTML_SIGNATURE_HASH."\n\n");
+
// begin output buffering
// check for zlib.output_compression
// open proper output bufer
@@ -40,7 +42,8 @@ else {
}
if (file_exists($_chip_pxhtml_cache_file)) {
- return include $_chip_pxhtml_cache_file;
+ include $_chip_pxhtml_cache_file;
+ return '';
}
$content = PXHTML::parse($file, null);
@@ -55,3 +58,4 @@ unset($chk);
include $_chip_pxhtml_cache_file;
// $output = trim(ob_get_contents());
ob_end_flush();
+return '';

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.