diff --git a/data/config.ini b/data/config.ini
index 9fe2e4f6..e178b64a 100644
--- a/data/config.ini
+++ b/data/config.ini
@@ -1,5 +1,5 @@
[chibi]
-prettyPrint=1
+enableCache=1
[main]
dbDriver = "sqlite"
diff --git a/lib/chibi-core b/lib/chibi-core
index 9653960e..4628a3d8 160000
--- a/lib/chibi-core
+++ b/lib/chibi-core
@@ -1 +1 @@
-Subproject commit 9653960e235c2c932bce404d3fe8ff4ea3990e08
+Subproject commit 4628a3d8dde54b411294be6c07b62a163cd9c774
diff --git a/src/Bootstrap.php b/src/Bootstrap.php
index 9e2cb4ce..6b581cfc 100644
--- a/src/Bootstrap.php
+++ b/src/Bootstrap.php
@@ -3,24 +3,10 @@ class Bootstrap
{
public function render($callback = null)
{
- if ($callback === null)
- {
- $callback = function()
- {
- (new \Chibi\View())->renderFile($this->context->layoutName);
- };
- }
-
- if ($this->context->layoutName == 'layout-normal')
- {
- ob_start(['LayoutHelper', 'transformHtml']);
+ if ($callback !== null)
$callback();
- ob_end_flush();
- }
else
- {
- $callback();
- }
+ (new \Chibi\View())->renderFile($this->context->layoutName);
}
public function workWrapper($workCallback)
@@ -29,7 +15,7 @@ class Bootstrap
session_start();
$this->context->handleExceptions = false;
- LayoutHelper::setTitle($this->config->main->title);
+ CustomAssetViewDecorator::setTitle($this->config->main->title);
$this->context->json = isset($_GET['json']);
$this->context->layoutName = $this->context->json
@@ -48,6 +34,8 @@ class Bootstrap
return;
}
+ $this->context->viewDecorators []= new CustomAssetViewDecorator();
+ $this->context->viewDecorators []= new \Chibi\PrettyPrintViewDecorator();
try
{
$this->render($workCallback);
diff --git a/src/Helpers/CustomAssetViewDecorator.php b/src/Helpers/CustomAssetViewDecorator.php
new file mode 100644
index 00000000..86acb35c
--- /dev/null
+++ b/src/Helpers/CustomAssetViewDecorator.php
@@ -0,0 +1,40 @@
+';
+ $headSnippet .= '';
+ if (!empty(self::$pageThumb))
+ $headSnippet .= '';
+
+ $bodySnippet = '';
+
+ $html = str_replace('', $headSnippet . '', $html);
+ $html = str_replace('