From 1c73ca8b0b9e369568112ff0b59340c8a239c756 Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Tue, 29 Mar 2011 10:55:03 -0500 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 From 185e9d490544684b71e9de59467e79a01515c1e0 Mon Sep 17 00:00:00 2001 From: Woody Gilk Date: Tue, 29 Mar 2011 11:03:43 -0500 Subject: [PATCH 4/4] Fixes cf6882212117a5435be5dcd482ae57eabdd984ff for Kohana 3.1 compatibility --- 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 2cb2289..fd2245c 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_handler($e); + Kohana_Exception::handler($e); return (string) ob_get_clean(); }