From d632be3fd4a471ac95b7098e9698544123b4247c Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Tue, 1 Mar 2011 13:52:00 -0500 Subject: [PATCH 1/6] Added new $options parameter to Kostache::_stache() which will appear in v6.0.0 of mustache.php --- classes/kohana/kostache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/kohana/kostache.php b/classes/kohana/kostache.php index 2ceb2d7..956f992 100644 --- a/classes/kohana/kostache.php +++ b/classes/kohana/kostache.php @@ -209,7 +209,9 @@ abstract class Kohana_Kostache { */ protected function _stash($template, Kostache $view, array $partials) { - return new Mustache($template, $view, $partials); + return new Mustache($template, $view, $partials, array( + 'charset' => Kohana::$charset, + )); } /** From cbdd16bcb276385bd015743034a5a314237cd3fb Mon Sep 17 00:00:00 2001 From: czukowski Date: Wed, 16 Mar 2011 10:43:49 +0100 Subject: [PATCH 2/6] Mustache class extension --- classes/kohana/kostache.php | 2 +- classes/kohana/mustache.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 classes/kohana/mustache.php diff --git a/classes/kohana/kostache.php b/classes/kohana/kostache.php index d6409c6..8759f78 100644 --- a/classes/kohana/kostache.php +++ b/classes/kohana/kostache.php @@ -215,7 +215,7 @@ abstract class Kohana_Kostache { */ protected function _stash($template, Kostache $view, array $partials) { - return new Mustache($template, $view, $partials, array( + return new Kohana_Mustache($template, $view, $partials, array( 'charset' => Kohana::$charset, )); } diff --git a/classes/kohana/mustache.php b/classes/kohana/mustache.php new file mode 100644 index 0000000..11b497f --- /dev/null +++ b/classes/kohana/mustache.php @@ -0,0 +1,3 @@ + Date: Wed, 16 Mar 2011 09:16:53 -0500 Subject: [PATCH 3/6] Added missing newline to EOF --- classes/kohana/mustache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/kohana/mustache.php b/classes/kohana/mustache.php index 11b497f..49ed1ec 100644 --- a/classes/kohana/mustache.php +++ b/classes/kohana/mustache.php @@ -1,3 +1,3 @@ Date: Tue, 29 Mar 2011 10:55:03 -0500 Subject: [PATCH 4/6] Check $this->_template before detecting the template, fixes #19 --- classes/kohana/kostache.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/classes/kohana/kostache.php b/classes/kohana/kostache.php index 8759f78..a178bb3 100644 --- a/classes/kohana/kostache.php +++ b/classes/kohana/kostache.php @@ -60,8 +60,16 @@ abstract class Kohana_Kostache { { if ( ! $template) { - // Detect the template for this class - $template = $this->_detect_template(); + if ($this->_template) + { + // Load the template defined in the view + $template = $this->_template; + } + else + { + // Detect the template for this class + $template = $this->_detect_template(); + } } // Load the template From cf6882212117a5435be5dcd482ae57eabdd984ff Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Tue, 29 Mar 2011 10:58:36 -0500 Subject: [PATCH 5/6] Use Kohana exception ::handler() rather than just ::text() to display the exception, fixes #18 --- classes/kohana/kostache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/kohana/kostache.php b/classes/kohana/kostache.php index a178bb3..34fcbb8 100644 --- a/classes/kohana/kostache.php +++ b/classes/kohana/kostache.php @@ -111,7 +111,7 @@ abstract class Kohana_Kostache { ob_start(); // Render the exception - Kohana_Exception::text($e); + Kohana::exception_handler($e); return (string) ob_get_clean(); } From 9b4ac1c1a1d4ca7d637bc36762689372819417d6 Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Tue, 29 Mar 2011 10:59:44 -0500 Subject: [PATCH 6/6] Preparing v2.0.2 release --- classes/kohana/kostache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/kohana/kostache.php b/classes/kohana/kostache.php index 34fcbb8..2cb2289 100644 --- a/classes/kohana/kostache.php +++ b/classes/kohana/kostache.php @@ -12,7 +12,7 @@ */ abstract class Kohana_Kostache { - const VERSION = '2.0.1'; + const VERSION = '2.0.2'; /** * Factory method for Kostache views. Accepts a template path and an